1

I was installing Solr with Jetty using these instructions. Basically, those instructions made you download the Jetty startup script and copy it to /etc/init.d/jetty.

But it was not working. Each time I was starting Jetty, I had a "FAILED" message and nothing to understand why it was happening. I decided to open up the /etc/init.d/jetty script to understand what was happening. I saw that this script was using start-stop-daemon to launch jetty. After a couple of time of debugging, I discovered that removing the --daemon option at the end of the start-stop-daemon call was fixing my problem.

I did a couple of research and discovered that this guy had the same problem and resolved it like I did: my removing the --daemon option.

What is weird is that the switch does not seem to be specific to start-stop-daemon, because it is not documented in the man page. Also, I've seen it used for other commands.

So what is that --daemon option doing? And why removing it resolved my problem?

Note that I am working on Ubuntu 10.04.2 LTS.

1 Answer 1

1

I still don't know what the --daemon flag does and have never found an answer. From my experience it looked like the --daemon flag was being appended to the command as an option. The command fails so nothing happens. In your case, using the -b option causes the process to fork, which I believe gave it a new standard error & output, so you don't see the resulting error from the --daemon flag being thrown. The -b option also prevents start-stop-daemon from knowing if the process failed or not.

1
  • Yes, it seems like -b and --daemon are doing the same thing. Nov 18, 2011 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .