• 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
Can't start pilight service
#11
(10-20-2017, 10:20 AM)curlymo Wrote: Can you reinstall pilight with:
Code:
apt-get install --reinstall pilight
And check if the /etc/pilight/config.json file is not empty anymore?

@area2051, can you tell me a bit more about your findings?

Oh thanks, now there is something in.
http://prntscr.com/gzt0pn

New output for 'pilight-daemon -D':

Code:
[Oct 20 14:00:47:435978] pilight-daemon: INFO: version v8.0
[Oct 20 14:00:47:436283] pilight-daemon: DEBUG: ssdp sent search
[Oct 20 14:00:47:533425] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Oct 20 14:00:47:533878] pilight-daemon: INFO: daemon listening to port: 41735
[Oct 20 14:00:47:534994] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Oct 20 14:00:47:535572] pilight-daemon: DEBUG: new thread ssdp, 2 threads running
[Oct 20 14:00:47:535706] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 35760
[Oct 20 14:00:47:535711] pilight-daemon: DEBUG: new thread sender, 3 threads running
[Oct 20 14:00:47:536606] pilight-daemon: DEBUG: client fd: 10
[Oct 20 14:00:47:536678] pilight-daemon: DEBUG: client id: 1
[Oct 20 14:00:47:536595] pilight-daemon: DEBUG: new thread broadcaster, 4 threads running
[Oct 20 14:00:47:537317] pilight-daemon: DEBUG: new thread receive parser, 5 threads running
[Oct 20 14:00:47:537519] pilight-daemon: DEBUG: new thread events client, 6 threads running
[Oct 20 14:00:47:537699] pilight-daemon: DEBUG: new thread events loop, 7 threads running
[Oct 20 14:00:47:537794] pilight-daemon: DEBUG: webserver listening to port 5001
[Oct 20 14:00:47:537895] pilight-daemon: DEBUG: ssdp sent search
[Oct 20 14:00:47:537984] pilight-daemon: DEBUG: new thread webserver worker #0, 8 threads running
[Oct 20 14:00:47:538159] pilight-daemon: DEBUG: new thread webserver client, 9 threads running
[Oct 20 14:00:47:538385] pilight-daemon: DEBUG: new thread webserver broadcast, 10 threads running
[Oct 20 14:00:47:538709] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.879151%
[Oct 20 14:00:47:539005] pilight-daemon: DEBUG: ssdp sent notify
[Oct 20 14:00:47:539306] pilight-daemon: DEBUG: ssdp sent search
[Oct 20 14:00:47:539447] pilight-daemon: DEBUG: ssdp sent notify
[Oct 20 14:00:47:633734] pilight-daemon: INFO: new client, ip: 192.168.178.60, port: 33487
[Oct 20 14:00:47:633848] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}

[Oct 20 14:00:47:633870] pilight-daemon: DEBUG: client fd: 12
[Oct 20 14:00:47:633965] pilight-daemon: DEBUG: client id: 2
[Oct 20 14:00:47:634083] pilight-daemon: INFO: new client, ip: 192.168.178.60, port: 33486
[Oct 20 14:00:47:634240] pilight-daemon: DEBUG: client fd: 13
[Oct 20 14:00:47:634323] pilight-daemon: DEBUG: client id: 3
[Oct 20 14:00:47:634522] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
[Oct 20 14:00:47:634557] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"core":1},"media":"web"}

[Oct 20 14:00:47:634852] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

[Oct 20 14:00:47:635035] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"core":1},"media":"web"}
[Oct 20 14:00:47:635272] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

[Oct 20 14:00:50:540701] pilight-daemon: DEBUG: cpu: 0.066745%, ram: 0.879151%
[Oct 20 14:00:50:541342] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0667449292255097,"ram":0.8791514900836945},"origin":"core","type":-1,"uu                                                                          id":"0000-b8-27-eb-c3f378"}

[Oct 20 14:00:50:541396] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0667449292255097,"ram":0.8791514900836945},"origin":"core","type":-1,"uuid":"0000-b                                                                          8-27-eb-c3f378"}
[Oct 20 14:00:53:542663] pilight-daemon: DEBUG: cpu: 0.064699%, ram: 0.879151%
[Oct 20 14:00:53:543297] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0646993611750934,"ram":0.8791514900836945},"origin":"core","type":-1,"uu                                                                          id":"0000-b8-27-eb-c3f378"}

It keeps looping the last 3 messages.

If i type in
Code:
service pilight start
it still says
Code:
Failed to start pilight.service: Unit pilight.service not found.

Now i tried the solution from @area2051 and it worked, it's lo longer giving me the error.
But i think there is still a problem with pilight because if i try to run 'pilight-receive' i get
Code:
[Oct 20 14:07:55:813536] pilight-receive: NOTICE: no pilight ssdp connections found
 
Reply
#12
Check the FAQ for possible SSDP not found errors.

The systemd issue is that we're currently only installing a init.d script. If someone can update the deb scripts to install the right script based on the init system i'm happy to implement it.
 
Reply
#13
Hey guys,

I had the same issue and could solve it with @area2051 's solution...
Well, at least I could define the service. But calling the service to start does not start pilight-daemon. "service pilight status" shows the output

Code:
Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2017-10-21 15:06:19 CEST; 366ms ago
  Process: 2006 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 2006 (code=exited, status=0/SUCCESS)

If I run the daemon manually, everything runs fine and I can connect to it with another clientized daemon. Could it be that the /etc/systemd/system/pilight.service file provided area2051 may be slightly incorrect?
 
Reply
#14
Maybe the systemd script should be told the daemon forks or daemonizes.
 
Reply
#15
(10-21-2017, 02:11 PM)TheWiso Wrote: Hey guys,

I had the same issue and could solve it with @area2051 's solution...
Well, at least I could define the service. But calling the service to start does not start pilight-daemon. "service pilight status" shows the output

Code:
Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2017-10-21 15:06:19 CEST; 366ms ago
  Process: 2006 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 2006 (code=exited, status=0/SUCCESS)

If I run the daemon manually, everything runs fine and I can connect to it with another clientized daemon. Could it be that the /etc/systemd/system/pilight.service file provided area2051 may be slightly incorrect?

I have the exact same issue as TheWiso. Just can't get the service working. Using the daemon work perfectly fine.
 
Reply
#16
So you are all running a systemd system? If so try:
Code:
[Unit]
Description=pilight
After=network-online.target

[Service]
ExecStart=/usr/local/sbin/pilight-daemon
Type=forking

[Install]
WantedBy=multi-user.target
 
Reply
#17
Thank you curlymo, tried out your hint and pilight serivce is working now!!!
 
Reply
#18
Question 
Hi,
I tried to use the script from curlymo in combination with the Restart-parameter, but it doesn't work.
So, I need your help.
I have done it in the following way:

create the Service-Starter:
Code:
nano /etc/systemd/system/multi-user.target.wants/pilight.service

PHP Code:
[Unit]
Description=pilight
After
=network-online.target

[Service]
ExecStart=/usr/local/sbin/pilight-daemon
Type
=forking
Restart
=always
RestartSec
=3

[Install]
WantedBy=multi-user.target 

enable the service:
Code:
sudo systemctl enable pilight.service

sudo systemctl daemon-reload
sudo systemctl restart pilight.service

# Test:
ps -ef | grep pilight
sudo kill -9 0000
watch "ps -ef | grep pilight"

After that I waited for some minutes, to verify that the service is back online, but nothing happens.
 
Reply
#19
Have you checked the logs:
https://manual.pilight.org/faq.html#pili...tely-exits
 
Reply
#20
(06-28-2018, 06:19 AM)curlymo Wrote: Have you checked the logs:
***s://manual.pilight.org/faq.html#pilight-doesn-t-start-or-immediately-exits

Should I use the pilight-log? Smile 

Maybe I made an anclear description.
pilight starts normaly and works fine for days, but maybe one or two times in a month the daemon freezes.
So I tried to enable a automatic restart-function in the starter-file, but the restart doesn't work if I manually kill the pilight-daemon.

Do you know wich logs are used?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Starting pilight on boot: "cannot bind to the SSDP multicast network" pilino1234 3 166 08-31-2019, 10:41 PM
Last Post: curlymo
Tongue pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 4 351 08-17-2019, 01:04 PM
Last Post: curlymo
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 2,028 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 465 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 348 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 2,344 06-29-2019, 08:58 PM
Last Post: curlymo
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 717 06-11-2019, 05:19 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 625 06-09-2019, 06:02 PM
Last Post: curlymo
  Google Assistant coupled to pilight hansrijn2 4 1,104 05-29-2019, 06:54 PM
Last Post: curlymo
  pilight-send does not stop (terminate) va13 3 606 05-15-2019, 06:06 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)