You are not logged in.

#1 2011-05-16 17:02:30

maddog39
Member
From: Philadelphia, PA
Registered: 2007-06-03
Posts: 73
Website

/etc/rc.d/lighttpd does not start, stop, or restart lighty

Hey everyone,

I cannot for the life of me determine whether this particular issue (as briefly described in the subject) is a bug or simply user error on my part. For some reason, the daemon script provided with the lighttpd package seems to have absolutely no effect what so ever. If I do /etc/rc.d/lighttpd start, it claims to have started the daemon successfully and then the daemon is never started. Thus forcing me to start the daemon manually via: lighttpd -f /etc/lighttpd/lighttpd.conf. Okay. Though now if I attempt to stop or restart from the daemon script it also claims to complete successfully and then never does anything.

I noticed that when looking into the contents of the daemon script that it attempts to start lighttpd via another program lighttpd-angel (never come accross this before) and logs errors to /var/log/lighttpd/lighttpd-angel.conf, okay, accept that presumably is something went wrong during lighty startup I'd assume there would be either an error logged there or somewhere else on the system. Except that I have yet to find a single error logged anywhere from this script.

Any thoughts? Lighty works perfectly fine when managed manually, except that it doesn't launch at system boot, which is a tad bit of a problem since this is a production server in many respects.

Thanks!
Alec

Offline

#2 2011-08-31 11:42:56

veox
Member
Registered: 2008-10-28
Posts: 49
Website

Re: /etc/rc.d/lighttpd does not start, stop, or restart lighty

I have ran into this error also recently, with very similar symptoms.

/var/run/lighttpd/lighttpd-angel.pid and /run/daemons/lighttpd are created, sometimes I can even `ps aux | grep lighttpd` and see lighttpd-angel if I'm fast enough.

Looks like the daemon crashes or something, but it doesn't happen if started manually, and there's no error output if started through a script.

Offline

#3 2011-08-31 11:52:05

veox
Member
Registered: 2008-10-28
Posts: 49
Website

Re: /etc/rc.d/lighttpd does not start, stop, or restart lighty

maddog39 wrote:

I noticed that when looking into the contents of the daemon script that it attempts to start lighttpd via another program lighttpd-angel (never come accross this before)

OK, lighttpd-angel is run as user 'root' and starts lighttpd as user 'http'.

Also, removing 'nohup' from the 'start' function seems to help. Perhaps an issue with terminal redirection? I've noticed no other rc script uses the same start line.

Last edited by veox (2011-08-31 11:57:03)

Offline

#4 2011-10-21 14:45:13

KrimReaper
Member
Registered: 2010-05-03
Posts: 5

Re: /etc/rc.d/lighttpd does not start, stop, or restart lighty

Looking at this - http://redmine.lighttpd.net/boards/2/topics/914

It appears that if you want to run lighttpd as root then do not set "server.username" or "server.groupname".

Offline

Board footer

Powered by FluxBB