• 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
pilight WebGui not working after reboot
#1
Moin,
Linux PI1 4.1.15-v7+ #830 SMP Tue Dec 15 17:02:45 GMT 2015 armv7l GNU/Linux
Root / pi / myuser has a Password
interfaces lo and wlan0 exists, 192.168.178.* and 127.0.0.1 in whitelist
pilight 7 stable from 2015-11-27 22:08
config.json OK ( hard work )
3 * elro_800_switch and 3 * DS18B20 working in bash
Reveive OK
In WebGui Switches works, and Temp seems legit

if i do
login > sudo su > service pilight restart

all is working, WebGui Ok

After Reboot the Daemon seems running, pid from boottime, but no response on 192.168.178.30:5001

In my opinion the /etc/init.d/pilight may have a Problem:
If opend in mcedit (Midnightcommander with Syntaxhiligting) the row:
Code:
<------>PIDFILE=$(sed -ne 's/\(.*\)"pid-file":[\ ]\{0,\}"\(.*\)",/\2/p' /etc/pilight/config.json);

There is after /\2/p' all green = Text

I tried 3 different files from Internet or nightly version, no success.
i tried an own rc3.d script with S99...., no sucess
I tried a cronjob every 10 minutes service pilight restart, no success.
i tried restart in rc.local ( post in this forum ), no success.

It works only on login and manual restart from root, what is going wrong?

Bye
 
Reply
#2
What does
Code:
sudo pilight-daemon -D
output?
 
Reply
#3
1.)
I suspect that this is a distribution/kernel issue, in particular when you have done a complete fresh install (a fresh install of raspbian jessie drops all backward compatibility with former sysvinit and uses systemd only).

2.)
Could it be that the filesystem is corrupted ? Have you done a filesystem check of your SD card ?

3.)
Are you opeating multiple Pi's with pilight installed ?

I have the following raspbian jessie distributions up and running:
- Linux md_pi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
- Linux wf_pi2 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux

I am still using rc.local to call some homebrew monitoring scripts.
 
Reply
#4
Hi

@wo_rasp
1) all fresh , all new installed 12.01.2016
2) I will check, but i don't think so......edit Check OK
3) No, first pi

Quote:i tried restart in rc.local ( post in this forum ), no success.

@pilino1234
I will post tomorrow.
 
Reply
#5
Hi,

pilight-daemon -D is working well...

...because startet from root manual....

thats my Problem!

There is a Problem with the /etc/init.d/pilight, my opinion..

I use WLAN, remember?
The workaround wit rc.local can't work on my Pi, because syslog says:
17:23:11 my logger from rc-local
17:23:15 dhcpcd... wlan0..rebinding lease ....

The network starts after rc.local!

Bye
 
Reply
#6
Check /lib/systemd/system/rc-local.service.
I am still using rc.local to start some monitoring script files.
One of the scripts is monitoring my wlan environment another one my vpn tunnel setup.
Thus i do need to ensure that rc.local is only executed after the network is started (the correponding parameter is After=network.target).

The following setup in /lib/systemd/system/rc-local.service is working for me:
Code:
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
 
Reply
#7
Hi

sorry for late answer...
Code:
[Install]
WantedBy=multi-user.target

- don't understand
- don't work

Is a version from nightly working with Wlan?

Bye
 
Reply
#8
Yes, WLAN does work for me with the latest nightly.

It is not a pilight-nightly issue, it is an issue of your kernel and your distribution.
There are changes in the startup behaviour of your kernel, in particular the handling of WLAN configuration (wpa_supplicant, and interfaces).

If you upgrade for example from wheezy to jessie, some files are retained from previous installations, if you do a fresh jessie install, those files are removed in order to enforce the usage of systemd.

You stated that you have a problem with rc.local running before the network is started.
To fix this you do need to state in the unit section After=network.target.

This is the status i get when i enter from a command prompt "systemctl status":
Code:
● md_pi
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Do 1970-01-01 01:00:02 CET; 46 years 1 months ago
   CGroup: /
           ├─1 /sbin/init
           └─system.slice
             ├─avahi-daemon.service
             │ ├─340 avahi-daemon: running [mdpi.local
             │ └─352 avahi-daemon: chroot helpe
             ├─dbus.service
             │ └─344 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
             ├─cron.service
             │ └─328 /usr/sbin/cron -f
             ├─rc-local.service
             │ ├─ 681 /bin/bash /home/wolfgang/init_wlan01.sh
             │ └─6326 sleep 293
             ├─dhcpcd.service
             │ └─663 /sbin/dhcpcd -q -w
             ├─system-openvpn.slice
             │ └─openvpn@client.service
             │   └─345 /usr/sbin/openvpn --daemon ovpn-client --status /run/openvpn/client.status 10 --cd /etc/openvpn --conf
             ├─system-serial\x2dgetty.slice
             │ └─serial-getty@ttyAMA0.service
             │   └─688 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
             ├─systemd-journald.service
             │ └─93 /lib/systemd/systemd-journald
             ├─ssh.service
             │ ├─ 664 /usr/sbin/sshd -D
             │ ├─6328 sshd: pi [priv]
             │ ├─6339 sshd: pi@pts/0
             │ ├─6342 -bash
             │ ├─6354 systemctl status
             │ └─6355 pager
             ├─systemd-logind.service
             │ └─330 /lib/systemd/systemd-logind
             ├─system-getty.slice
             │ └─getty@tty1.service
             │   └─686 /sbin/agetty --noclear tty1 linux
             ├─pilight.service
             │ └─4183 /usr/local/sbin/pilight-daemon
             ├─systemd-udevd.service
             │ └─95 /lib/systemd/systemd-udevd
             ├─system-ifup.slice
             │ └─ifup@wlan0.service
             │   └─364 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_suppl
             ├─rsyslog.service
             │ └─401 /usr/sbin/rsyslogd -n
             ├─triggerhappy.service
             │ └─363 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /
             └─ntp.service
               └─678 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 107:112
lines 11-53/53 (END)
As said before, i am using my own script file (init_wlan01.sh) to ensure that my VPN tunnel is up and that wlan is up. If either one is not i do some additional checks (for example if_up, if_down), and if all fails and i do not get the network back online connected to the internet, and do not obtain a valid VPN tunnel link, i reboot the machine in order to get the whole network link back online.
My problem was that the wlan adapter would connect to the hotspot, but the hotspot was not creating an active HSDPA mobile link, resulting in a lost communication link between sites. As the VPN tunnel needs to get initiatalized from the client side, i got this approach working reliably......

----

You stated that you have an issue of rc.local being started before the network is up, that what i fixed with the configuration file posted.
With systemctl, systemctl status, systemctl --failed, systemctl list-units you get more information on the services.

If aforementioned file does exist, please let us know what the differences of that file are compared to what i have posted.
If it does not exist, I would create it with the content i have posted.
Reboot the machine and please report the results.

----

You said that "pilight-daemon -D" is working, is "start daemon pilight" not working ?
If not, what is the content of /var/log/pilight.log and /var/log/pilight.err ?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 55 08-13-2019, 05:43 PM
Last Post: curlymo
  pilight Nano USB interface curlymo 228 94,237 07-10-2019, 06:14 PM
Last Post: curlymo
  problems compiling pilight on Odroid C2 WitchDoctor 101 8,702 03-14-2019, 09:01 PM
Last Post: curlymo
  pilight 8 what chages for custom protocols? polo 11 2,675 02-15-2019, 06:22 PM
Last Post: polo
  pilight-debug shows nothing minhdomanh 3 477 10-18-2018, 07:01 AM
Last Post: felfert
  pilight-send and pilight-daemon DieterK 0 510 06-20-2018, 12:44 AM
Last Post: DieterK
  Lights not switched on or off by rules in pilight 8.1.0 rorie 22 2,303 06-12-2018, 03:56 PM
Last Post: curlymo
  WebGUI emtpy since 8.0.8 Dergo 14 2,072 02-24-2018, 01:09 PM
Last Post: Dergo
  check API in pilight 8 stratege-0815 4 1,283 02-11-2018, 09:34 AM
Last Post: stratege-0815
  433 mhz receiver working on Raspberry pi with a hack knex 3 1,743 01-21-2018, 06:28 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)