0

I want to start a service via xinetd but it does not work. That means immediately after starting the service it is stopped again:

Sep 23 19:16:39 sektor xinetd[556]: START: service pid=559 from=xx.xx.xx.xx
Sep 23 19:16:39 sektor xinetd[556]: EXIT: service status=1 pid=559 duration=0(sec)

Is there any way to get error messages from the service to track down the problem?

I found something for x11vnc that says to use -o /path/to/separate/logfile, but I would like to know if this works with every (x)inetd-able service or if it even is a flag of xinetd itself.

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
  • `-o` is an argument to the `x11vnc` command specifically. – u1686_grawity Sep 26 '11 at 07:29
  • @grawity so it is up to the services to provide logging whilst running under (x)inetd? – Nobody moving away from SE Sep 26 '11 at 09:16
  • It is *always* up to the services - most use syslog, some log to files, others nowhere - not dependent on xinetd. – u1686_grawity Sep 26 '11 at 09:45
  • @grawity: Ok maybe logging was the wrong word. When I start for example x11vnc on commandline it gives me a lot of output on stdout. Of course this is not possible under xinetd, because the stdout is reserved for the communication. So a service that runs under xinetd should always provide some possibility to get the output that "normally" would be on stdout? – Nobody moving away from SE Sep 26 '11 at 09:52
  • In such cases, a properly written service is supposed to use Syslog (or its own log file, if necessary). Also, by the way, most programs use *stderr* for such messages, and a smarter version of inetd (such as systemd) could redirect stderr to a log while keeping stdin/out with the socket. – u1686_grawity Sep 26 '11 at 11:52

1 Answers1

0

Take a look into /var/log/messages or into the service specific logfile (found in /var/log too, if it exist).

Which service do you try to start?

ercpe
  • 101
  • 2
  • It is x11vnc and the lines I posted were the only ones that I found in the log (I redirected xinetd's output to /var/log/xinetd.log to not bloat my messages file). But the messages file also does not say anything. – Nobody moving away from SE Sep 23 '11 at 17:50
  • Try starting xinetd with the `-d` option. The man page says: "Enables debug mode. This produces a lot of debugging output, and it makes it possible to use a debugger on xinetd.". This should give you a hint. – ercpe Sep 24 '11 at 04:52