• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Service does not start correctly when booting
#1
Bug 
Hello,

I've got pilight 6.0 (stable) running on an Raspberry Pi 2 on Raspbian. Everything is working fine if I start/restart pilight manually. I can connect to the Web-Interfaces and can control my configured switches.

But if I reboot my Raspberry, I identified, that the pilight service is not startet correctly. If I do a ps aux | grep pilight direct after booting the Pi I get the following processes:
Code:
root      2049  1.0  0.3 134752  2968 ?        Sl   20:17   0:03 /usr/local/sbin/pilight-daemon
root      2122  0.0  0.1   1764  1232 ?        Ss   20:17   0:00 startpar -f -- pilight


It seems as if the startpar process is not executed correctly and does not start pilight correctly (according to various sources in the Internet the process should not exist when booting is completed).

In /var/log/pilight.log I get the following error (just when pilight gets started directly after booting the Pi - started manually there is no error in the logs):
Code:
[Apr 29 20:07:49:580257] pilight-daemon: ERROR: cannot bind to the ssdp multicast network
[Apr 29 20:07:49:609034] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51141
[Apr 29 20:07:49:709339] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51142
[Apr 29 20:07:49:719258] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51143

When I try to Connect to the pilight web server in this state I get the following error messages in /var/log/pilight.err

Code:
[Apr 29 20:11:09:678777] pilight-daemon: -- STACKTRACE (3 FRAMES) --
[Apr 29 20:11:09:682896] pilight-daemon: __default_sa_restorer_v2       ip = 0x76b9f160, sp = 0x708fac10
[Apr 29 20:11:09:686301] pilight-daemon: gsignal                        ip = 0x76b9df50, sp = 0x708faf00

Does anone has similiar problems or any hint how to solve the issue?

I already tried to change the dependencies in /etc/init.d/pilight to

Code:
# Required-Start:    networking ifupdown $local_fs $syslog

but unfortunately without success.

I appreciate any hint.

Thanks a lot,
Stephan
 
Reply
#2
Got the same problems here:

Quote:But if I reboot my Raspberry, I identified, that the pilight service is not started correctly.
Same problem, except that when running ps aux, there is no output at all and there is no pilight-daemon running. However, using sudo service pilight start says that it is already running. So I found out that it didn't delete the PID file from last time. Upon deleting the file and rebooting, pilight starts.
But this time, the log said that it could not bind to ssdp multicast network, so I added sleep 10 into /etc/init.d/pilight just before do_start is called around line 81. This fixes the ssdp errors.
However, it frequently crashes with stacktraces upon receiving signals (will post backtrace later).
 
Reply
#3
I'm also experiencing the same problem. When the raspberry PI boots, tools such as pilight-receive exit with an error stating that they cannot bind to the SSDP port.

Would this problem be solved by waiting until the network is correctly set? What about changing the priority of the init script? By default the init script in RC2.d is named "S02pilight". Maybe chaning it to "S99pilight" can change this problem.
 
Reply
#4
By the time you are able to run pilight-send, network should by fully initialized. The problem is at boot time, when the pilight-daemon is started but the network has not been fully started up yet.

Can you check your /etc/network/interfaces file to check that it has defined a loopback device? There should be a line like:
Code:
iface lo inet loopback
 
Reply
#5
The loopback interface is definitely configured correctly.
 
Reply
#6
Hi,

I also just double-checked the network settings and and the loopback is set up correctly. There are also no iptables rules defined.

@pilino1234: The workaround with sleep 10 in /etc/init.d/pilight works for me.

@UndeadKernel: I already tried to change the pilight init script priority by changing the the Required-Start -Line to:

Code:
# Required-Start:    $all

after an "update-rc pilight defaults" the priority was changed right before rc.local, that is usually the last script that is run.

Unfortunately I could not figure out which process is not started correctly when pilight init script is run during startup. thus I think I have to use the sleep-Workaround mentioned before.

Thanks a lot
Stephan
 
Reply
#7
Just figured out, that sleep 10 in /etc/init.d/pilight doesn't fix the problem for me reliably.

Thus I added

Code:
sleep 10
service pilight restart

in /etc/rc.local as a workaround.

Cheers
Stephan
 
Reply
#8
*Bump*

For everyone experiencing problems, a fix is available in the development branch Smile
 
Reply
#9
Can someone confirm this? Because for my setup the error still exists with the latest development release (7.0.114-g6fa4b8b) Surprised

Still have to stop and start manually to prevent the ssdp notice caused by receive and send command....
 
Reply
#10
(04-18-2016, 11:35 PM)JPM Wrote: Can someone confirm this? Because for my setup the error still exists with the latest development release (7.0.114-g6fa4b8b) Surprised

Still have to stop and start manually to prevent the ssdp notice caused by receive and send command....

Yes I can confirm I have this problem on a raspberry2 with openhabianpi and pilight-control v8.0.8.
I also used now the workaround with:

sleep 20
service pilight restart
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Real 433Mhz Remote is disturbed by pilight service henne111 2 565 10-06-2019, 06:18 PM
Last Post: wo_rasp
  cant configure or even start pilight on raspi 3b Xvnx23 2 712 05-06-2019, 09:47 PM
Last Post: fourty2
  pilight-daemon does not start since 8.1.3-21 robertkrause 1 739 11-05-2018, 07:01 PM
Last Post: robertkrause
  [SOLVED] pilight wont start since update from 8.0.8 to 8.1.2 pukington 5 2,071 08-08-2018, 05:34 PM
Last Post: curlymo
  Can't start pilight service Thorben653 19 10,459 06-28-2018, 11:09 AM
Last Post: LeoTheLion
  Cannot start service after update to 8.0.8 mezen 5 1,143 05-24-2018, 07:46 PM
Last Post: curlymo
  Don't understand where to start debuging madmoses 3 911 01-19-2018, 11:17 PM
Last Post: madmoses
  pilight does no longer start because of hardware error stratege-0815 2 1,245 12-27-2017, 11:16 PM
Last Post: stratege-0815
  pilight-receive does not work correctly docingo 4 1,411 12-11-2017, 08:34 PM
Last Post: docingo
  pilight service doesn't start jjlf 4 4,569 01-23-2017, 12:43 AM
Last Post: jjlf

Forum Jump:


Browsing: 1 Guest(s)