Project

General

Profile

[Solved] Lighttpd freeses after change timezone and time.

Added by misarm 6 months ago

I am using lighttpd/1.4.58 (ssl) on embedded device (buildroot). After (bad) Timezone and time settings, lighttpd freezes and refuses to send anything. I am on UTC-1 timezone. Problem appears, for example, if I set bad time zone to +1200 NRT and set time back to local time. After short time web gets unresponsive state.

In this state I can see http and https ports open (with nmap). If I try to open webpage from Firefox or Chromium I can see with wireshark on PC the redirection from http to https, then TLS handshake, but nothing more.

I can't see anything relevant in lighttpd.error.log or lighttpd.log
Lighttpd restart will solve the issue.


Replies (9)

RE: Lighttpd freezes after change timezone and time. - Added by misarm 6 months ago

Previously used version - lighttpd/1.4.49 (ssl) did not have this issue (we only needed to perform auto-log-out after TZ/time change from web, not to restart whole web server).

RE: Lighttpd freeses after change timezone and time. - Added by gstrauss 6 months ago

Best practices are that your hardware clock is UTC and that your software system clock be UTC.

For individual users, set TZ as you like it. Huzzah.

If you drastically change the time on the system, you should restart most daemons, including crond.

If you see lighttpd perform the TLS handshake, then lighttpd is responding and there is something else that is not handling the time change well. (If you only see the Client Hello from the client, and you do not see a response from the lighttpd server, then lighttpd is not responding. strace -p pid on the lighttpd pid and see if lighttpd is calling accept after you try to make a connection from the client.

RE: Lighttpd freeses after change timezone and time. - Added by misarm 5 months ago

I am not using cron (it is not needed), it is embedded device.
Problem is, that also after restart of device, lighttpd starts and after then NTP changes the system time and lighttpd also gets this unresponsive state. Problem is, that I don't know when exactly NTP gets and changes the time (in case of later internet connection). Unfortunatelly I don't have strace binary on embedded device.

RE: Lighttpd freeses after change timezone and time. - Added by gstrauss 5 months ago

Properly configure your startup script dependencies.

RE: Lighttpd freeses after change timezone and time. - Added by misarm 5 months ago

Thanks. But it is even possible, that user want access device without device's succesfull internet connection (local network / firewall).
Maybe I have to monitor local time and if it changes unexpectedly, restart the lihgttpd.

RE: Lighttpd freeses after change timezone and time. - Added by gstrauss 5 months ago

Have you bothered reading the man page for your ntpd?

RE: Lighttpd freeses after change timezone and time. - Added by misarm 5 months ago

On device is no man pages due spare of the nand space, but yes finally I have found that it is possible to configure it to call some script when time changes. So thank you, I will try to solve it using this.
I hoped that it can be solved in another way (by setting somehow lighttpd), when 2yrs old version did not suffer with such problem. Progress can't be stopped...
It's a pity that I can't debug it more.

    (1-9/9)