Project

General

Profile

Actions

Bug #2186

closed

lack of output when lighttpd fails to start

Added by lightning over 14 years ago. Updated almost 9 years ago.

Status:
Fixed
Priority:
Low
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

I have an as yet undetermined issued that is preventing lighttpd from starting. Part of the reason it remains unresolved is that lack of output.

lighttpd -f /etc/lighttpd/lighttpd.conf
configfile.c.828: 0, (null)

That's it. Not even an indication that is did fail, certainly no output related to the failure.

ls ail /www/apache/logs/err*
1249 -rw-rw-rw
1 root root 29779 May 10 2009 /www/apache/logs/error_log

This is 13th April. Nothing was added to the error_log. So it could be said that there is one indication all is not well since normally the "error log" would contain a non error msg logging that the server had started.

lightpd -p -f <config file> shows that file parsed OK and the error log is as expected. Also the config worked when this fs image was used via nfs.

There is apparently some anomally since this fs was committed to flash on the device.

The bug is not whatever is the cause of the problem but the lack of information to determine what it is.

"configfile.c.828: 0, (null)" was also output during the successful nfs boot and is singularly uninformative. It appears to be a debugging message.

If the program fails to start this is a pretty big issue . Why does it remain silent about the failure? It seems a curious strategy

re. lighttpd-1.4.22

(PS sorry can't get any sense out of this wiki's formatting for inline code )

Actions #1

Updated by nitrox over 14 years ago

  • Status changed from New to Need Feedback
  • Priority changed from Normal to Low

This is sounds more like a support question, but anyway...

Your error.log hasn´t been updated for a year now, so it never worked?

Reason for that might be:
- permission problem (you run lighty as user/group? log directory is owned by?)
- several error.log´s defined (only one error.log is allowed!)?

To debug use:

strace -ff -s 1024 -o foo.txt lighttpd -Df /etc/lighttpd/lighttpd.conf

This might either write sth. more to the screen or hopefully sth. useful to foo.txt.

1.4.22 is quite a few versions behind, current is 1.4.26.

Actions #2

Updated by lightning over 14 years ago

I don't have strace available, this is a minimal embedded installation but your suggestion of -D does show the problem.

lighttpd -Df /etc/lighttpd/lighttpd.conf
configfile.c.828: 0, (null)
2010-04-13 17:42:24: (log.c.84) opening errorlog '/www/apache/logs/error_log' failed: Permission denied
2010-04-13 17:42:24: (server.c.893) Opening errorlog failed. Going down.

But as I posted in the original report that log file has a+w permissions. This was the most obvious thing to check.

ls -ail /www/apache/logs/error_log
1249 -rw-rw-rw- 1 root root 29779 May 10 2009 /www/apache/logs/error_log

However, for some reason, in copying the fs image to the flash device, the root directory was created without x permission for all users. I'll look into why that happens.

chmod a+x /

fixed!

Very simple once I had enough output for the program to know why it was failing. This is what I stated as being point of this bug report, not "user help".

What I needed to know was that -D would give me more console output: the output that I was expecting from a program that fails before it gets off the ground.

lighttpd -h
-D don't go to background (default: go to background)

So probably the conclusion to this issue is maybe it needs to find out whether it does actually start before going into background and ceasing to send it's output anywhere where it may be of use.

So finally, thanks for replying with the -D suggestion. Though I was aware of that option it did not seem relevant to this issue.

best regards.

Actions #3

Updated by gstrauss almost 9 years ago

Please close ticket.

Unable to reproduce problem with current version of trunk.

When I chmod a-x tmp and manually run lighttpd (without -D)
2016-02-13 03:27:12: (log.c.148) opening errorlog '.../tests/tmp/lighttpd/logs/lighttpd.error.log' failed: Permission denied

Running lighttpd -D is still a good step to take when troubleshooting startup problems.

Actions #4

Updated by stbuehler almost 9 years ago

  • Status changed from Need Feedback to Fixed
Actions

Also available in: Atom