# xinetd not starting need help ! [SOLVED ]

## sleepingsun

I try to start xinetd but it failed ! 

I use amd64 gentoo 2008 ! 

```
 /etc/init.d/xinetd start

 * Caching service dependencies ...                                       [ ok ]

 * Starting xinetd ...

/sbin/start-stop-daemon: --start needs --exec or --startas

Try `/sbin/start-stop-daemon --help' for more information.                [ !! ]
```

My /etc/xinetd.conf

```
#

# This is the master xinetd configuration file. Settings in the

# default section will be inherited by all service configurations

# unless explicitly overridden in the service configuration. See

# xinetd.conf in the man pages for a more detailed explanation of

# these attributes.

defaults

{

# The next two items are intended to be a quick access place to

# temporarily enable or disable services.

#

#       enabled         =

#       disabled        =

# Define general logging characteristics.

        log_type        = SYSLOG daemon info

        log_on_failure  = HOST

        log_on_success  = PID HOST DURATION EXIT

# Define access restriction defaults

#

#       no_access       =

#       only_from       =

#       max_load        = 0

        cps             = 50 10

        instances       = 50

        per_source      = 10

# Address and networking defaults

#

#       bind            =

#       mdns            = yes

        v6only          = no

# setup environmental attributes

#

#       passenv         =

        groups          = yes

        umask           = 002

# Generally, banners are not used. This sets up their global defaults

#

#       banner          =

#       banner_fail     =

#       banner_success  =

}

includedir /etc/xinetd.d
```

----------

## richard.scott

which xinetd ebuild have you used i.e.

```
# emerge -s xinetd

Searching...

[ Results for search key : xinetd ]

[ Applications found : 1 ]

*  sys-apps/xinetd

      Latest version available: 2.3.14

      Latest version installed: 2.3.14

      Size of files: 294 kB

      Homepage:      http://www.xinetd.org/

      Description:   powerful replacement for inetd

      License:       BSD
```

Actually the version I have installed doesn't use the /sbin/start-stop-daemon tool to start xinetd?

Did you remember to etc-update?

----------

## sleepingsun

Same xinetd ! I use AMD64 Gentoo 2008.0 on intel quadcore processor ! 

```
Searching...

[ Results for search key : xinetd ]

[ Applications found : 1 ]

*  sys-apps/xinetd

      Latest version available: 2.3.14

      Latest version installed: 2.3.14

      Size of files: 294 kB

      Homepage:      http://www.xinetd.org/

      Description:   powerful replacement for inetd

      License:       BSD
```

----------

## richard.scott

is this the same on your system?

```
# cat /etc/init.d/xinetd

#!/sbin/runscript

# Copyright 1999-2004 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6,v 1.19 2005/07/30 07:34:26 vapier Exp $

opts="start stop reload restart dump check"

depend() {

        use net

}

start() {

        ebegin "Starting xinetd"

        (

        # workaround for #25754

        unset -f `declare -F | sed 's:declare -f::g'`

        /usr/sbin/xinetd -pidfile /var/run/xinetd.pid ${XINETD_OPTS}

        )

        eend $?

}

stop() {

        ebegin "Stopping xinetd"

        start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid

        eend $?

}

reload(){

        ebegin "Reloading configuration"

        killall -HUP xinetd &>/dev/null

        eend $?

}

dump(){

        ebegin "Dumping configuration"

        killall -USR1 xinetd &>/dev/null

        eend $?

}

check(){

        ebegin "Performing Consistency Check"

        killall -IOT xinetd &>/dev/null

        eend $?

}
```

----------

## sleepingsun

mine is :

```
#!/sbin/runscript

# Copyright 1999-2008 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6,v 1.20 2008/12/31 09:06:44 vapier Exp $

opts="reload dump check"

depend() {

   use net

}

start() {

   ebegin "Starting xinetd"

   start-stop-daemon --start --pidfile /var/run/xinetd.pid -- \

      xinetd -pidfile /var/run/xinetd.pid ${XINETD_OPTS}

   eend $?

}

stop() {

   ebegin "Stopping xinetd"

   start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid

   eend $?

}

reload() {

   ebegin "Reloading configuration"

   killall -HUP xinetd &>/dev/null

   eend $?

}

dump() {

   ebegin "Dumping configuration"

   killall -USR1 xinetd &>/dev/null

   eend $?

}

check() {

   ebegin "Performing Consistency Check"

   killall -IOT xinetd &>/dev/null

   eend $?

}
```

----------

## cach0rr0

 *sleepingsun wrote:*   

> mine is :
> 
> ```
> 
> opts="reload dump check"
> ...

 

weird. You're missing a few key pieces from opts

 *Quote:*   

> 
> 
> opts="start stop reload restart dump check" 
> 
> 

 

is what both myself and the other poster (whose name I forget, but will look at in a sec) have. 

Try simply adding start and stop to your opts, see if it gives you any joy

it's griping because you're passing it an unknown opt

/sbin/runscript is part of baselayout. When's the last time this would have been updated?

that's just weird ;x

----------

## cach0rr0

aha!

check this out

http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6?r1=1.19&r2=1.20

methinks that difference in opts is unintentional, especially since the start()/stop() functions are still left in the runscript (plus, it doesnt make any sense to remove them!)Last edited by cach0rr0 on Fri Jan 02, 2009 4:14 pm; edited 1 time in total

----------

## sleepingsun

yeserday i made update and install whole system yesterday !

And what i need to do ? 

Mine status is confused ! 

Maybe that I downgrade this ?

----------

## cach0rr0

 *sleepingsun wrote:*   

> yeserday i made update and install whole system yesterday !

 

no worries, methinks that commit was faulty

just change opts to include start and stop....see if it works - it should

Am also thinking that typo is a buglet.

----------

## sleepingsun

```
/etc/init.d/xinetd restart

bash: /etc/init.d/xinetd: Permission denied
```

I try to re-emerge this !

edit:

when i change permiison to file its give me same resoult like original file and automatic change again permision to access denied ! 

I re-emerge tham and try it and in some resons this script is not work do you know how to downgrade tham ?

----------

## cach0rr0

 *sleepingsun wrote:*   

> 
> 
> ```
> /etc/init.d/xinetd restart
> 
> ...

 

are you doing the restart as root ?

sorry if it's a silly question, but as root you shouldn't get permissions issues trying to run an init script

also: have you edited and changed opts in /etc/init.d/xinetd as prescribed?

Your /etc/init.d/xinetd should look like this now:

```

#!/sbin/runscript

# Copyright 1999-2008 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6,v 1.20 2008/12/31 09:06:44 vapier Exp $

opts="start stop reload restart dump check"

depend() {

        use net

}

start() {

   ebegin "Starting xinetd"

   start-stop-daemon --start --pidfile /var/run/xinetd.pid -- \

      xinetd -pidfile /var/run/xinetd.pid ${XINETD_OPTS}

   eend $?

}

stop() {

        ebegin "Stopping xinetd"

        start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid

        eend $?

}

reload(){

        ebegin "Reloading configuration"

        killall -HUP xinetd &>/dev/null

        eend $?

}

dump(){

        ebegin "Dumping configuration"

        killall -USR1 xinetd &>/dev/null

        eend $?

}

check(){

        ebegin "Performing Consistency Check"

        killall -IOT xinetd &>/dev/null

        eend $?

}

```

----------

## sleepingsun

yap i do and same resoults but as i write in some reasons i change permission on that file but gentoo automatic back after first start ! 

Loged in  root

I change like you told me set permission and when i do 

```
/etc/init.d/xinetd start 
```

nothing happend just give me 

and its not started !

yes its look like that :

and same error 

```
isp # /etc/init.d/xinetd start

 * Starting xinetd ...

/sbin/start-stop-daemon: --start needs --exec or --startas

Try `/sbin/start-stop-daemon --help' for more information.                                                                                           [ !! ]

isp #    
```

----------

## sleepingsun

I solved this problem ! 

I unmerge xinetd and completley remove all conf files and go to portage and delete that ebuild also ! 

Than i made  *Quote:*   

> emerge --sync

  and after that i emerge xinetd and startem without error with  *Quote:*   

> /etc/inet.d/xinet.d start 

  and put tham on  *Quote:*   

> rc-update add xinetd default

   ! 

Problem solved !

----------

