Hi everyone,
This has probably been discussed somewhere already but I couldn't find exactly the same behavior nor a sufficient explanation for a fix or workaround to try out, so sorry if this is a double post and feel free to refer me to an existing thread.
Problem description: I have a RPi3B, clean up-to-date Raspian Buster installation and installed prebuilt pilight stable (v8.1.5) from the repo. Now I have following behavior: pilight automatically starts on boot and the service seems to be running:
When I try to access the pilight webserver (HimbeerBox3:5001) it seems to try and connect but then hangs. A website refresh shows no connection anymore. Checking for the status of the service:
After doing a "sudo service pilight start" again, the service seems to run stable
I could imagine something like the service being started too early on boot so not all networking is available or something like that but I'm not experienced enough to check for that. I have exactly the same setup and config running on a RPi1B+ successfully and stable (but fairly slow, that's why I want to migrate).
The content in /var/log/pilight.log:
Looks like the only difference between the autostart and manual start is the print of the timezone detection. Not sure if that helps somehow.
/var/log/pilight.err doesn't show any relevant messages.
Any input and things to try out would be great to get as I'd obviously like this to work directly after boot. I could probably try something like force a restart at the end of the boot sequence or somehow delay the start of the service, I just wanted to check if this might be an actual bug that should be fixed somewhere in the code.
Thanks!
Vrah
This has probably been discussed somewhere already but I couldn't find exactly the same behavior nor a sufficient explanation for a fix or workaround to try out, so sorry if this is a double post and feel free to refer me to an existing thread.
Problem description: I have a RPi3B, clean up-to-date Raspian Buster installation and installed prebuilt pilight stable (v8.1.5) from the repo. Now I have following behavior: pilight automatically starts on boot and the service seems to be running:
Code:
pi@HimbeerBox3:~ $ sudo service pilight status
? pilight.service - pilight
Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-12-13 10:35:03 GMT; 1min 46s ago
Process: 354 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 455 (pilight-daemon)
Tasks: 13 (limit: 2200)
Memory: 15.5M
CGroup: /system.slice/pilight.service
mq455 /usr/local/sbin/pilight-daemon
Dec 13 10:34:58 HimbeerBox3 systemd[1]: Starting pilight...
Dec 13 10:35:03 HimbeerBox3 systemd[1]: Started pilight.
When I try to access the pilight webserver (HimbeerBox3:5001) it seems to try and connect but then hangs. A website refresh shows no connection anymore. Checking for the status of the service:
Code:
pi@HimbeerBox3:~ $ sudo service pilight status
? pilight.service - pilight
Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2019-12-13 10:42:29 GMT; 29s ago
Process: 354 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 455 (code=killed, signal=ABRT)
Dec 13 10:34:58 HimbeerBox3 systemd[1]: Starting pilight...
Dec 13 10:35:03 HimbeerBox3 systemd[1]: Started pilight.
Dec 13 10:42:29 HimbeerBox3 pilight-daemon[354]: pilight-daemon: /home/pilight/source/daemon-dev/libs/pilight/core/json.c:1147: emit_string: Assertion `utf8_validate(str)' failed.
Dec 13 10:42:29 HimbeerBox3 systemd[1]: pilight.service: Main process exited, code=killed, status=6/ABRT
Dec 13 10:42:29 HimbeerBox3 systemd[1]: pilight.service: Failed with result 'signal'.
After doing a "sudo service pilight start" again, the service seems to run stable
Code:
pi@HimbeerBox3:~ $ sudo service pilight status
? pilight.service - pilight
Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-12-13 10:46:53 GMT; 1s ago
Process: 695 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 696 (pilight-daemon)
Tasks: 13 (limit: 2200)
Memory: 5.4M
CGroup: /system.slice/pilight.service
mq696 /usr/local/sbin/pilight-daemon
Dec 13 10:46:53 HimbeerBox3 systemd[1]: Starting pilight...
Dec 13 10:46:53 HimbeerBox3 systemd[1]: Started pilight.
I could imagine something like the service being started too early on boot so not all networking is available or something like that but I'm not experienced enough to check for that. I have exactly the same setup and config running on a RPi1B+ successfully and stable (but fairly slow, that's why I want to migrate).
The content in /var/log/pilight.log:
Code:
=== FORCED REBOOT ===
(/home/pilight/source/daemon-dev/daemon.c #2588) [Dec 13 10:34:51:866394] INFO: Interrupt signal received. Please wait while pilight is shutting down
(/home/pilight/source/daemon-dev/daemon.c #2381) [Dec 13 10:34:51:879000] INFO: removed stale pid_file /var/run/pilight.pid
=== AUTOSTART ON BOOT ===
(/home/pilight/source/daemon-dev/libs/pilight/config/rules.c #117) [Dec 13 10:35:03:838807] INFO: rule #6 everything_off_manual was parsed in 0.003026 seconds
(/home/pilight/source/daemon-dev/libs/pilight/config/rules.c #117) [Dec 13 10:35:03:841783] INFO: rule #7 everything_on_manual was parsed in 0.002912 seconds
(/home/pilight/source/daemon-dev/daemon.c #3082) [Dec 13 10:35:03:956860] INFO: version v8.1.5
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #168) [Dec 13 10:35:03:969298] INFO: daemon listening to port: 35055
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Dec 13 10:35:03:973520] INFO: new client, ip: 127.0.0.1, port: 44816
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1889) [Dec 13 10:35:03:985060] INFO: secured webserver started on port: 5002 (fd 16)
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1892) [Dec 13 10:35:03:985155] INFO: regular webserver started on port: 5001 (fd 17)
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2137) [Dec 13 10:35:04:87779] NOTICE: no pilight ssdp connections found
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Dec 13 10:35:04:88307] INFO: new client, ip: 127.0.0.1, port: 44818
^^^^ last entry before crash -> client connected to webui
=== MANUAL RESTART OF pilight SERVICE ===
(/home/pilight/source/daemon-dev/libs/pilight/protocols/API/datetime.c #362) [Dec 13 10:46:53:723239] INFO: datetime time 13.737300:51.045700 seems to be in timezone: Europe/Berlin
^^^^ this line is missing in the former run????
(/home/pilight/source/daemon-dev/libs/pilight/config/rules.c #117) [Dec 13 10:46:53:755338] INFO: rule #6 everything_off_manual was parsed in 0.002190 seconds
(/home/pilight/source/daemon-dev/libs/pilight/config/rules.c #117) [Dec 13 10:46:53:757761] INFO: rule #7 everything_on_manual was parsed in 0.002403 seconds
(/home/pilight/source/daemon-dev/daemon.c #3082) [Dec 13 10:46:53:798472] INFO: version v8.1.5
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #168) [Dec 13 10:46:53:809179] INFO: daemon listening to port: 40279
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Dec 13 10:46:53:813003] INFO: new client, ip: 127.0.0.1, port: 52354
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1889) [Dec 13 10:46:53:822392] INFO: secured webserver started on port: 5002 (fd 16)
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1892) [Dec 13 10:46:53:822494] INFO: regular webserver started on port: 5001 (fd 17)
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2137) [Dec 13 10:46:53:930648] NOTICE: no pilight ssdp connections found
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Dec 13 10:46:53:931199] INFO: new client, ip: 127.0.0.1, port: 52356
^^^^ client connected, service still running
/var/log/pilight.err doesn't show any relevant messages.
Any input and things to try out would be great to get as I'd obviously like this to work directly after boot. I could probably try something like force a restart at the end of the boot sequence or somehow delay the start of the service, I just wanted to check if this might be an actual bug that should be fixed somewhere in the code.
Thanks!
Vrah