-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PID file location #499
Comments
Think I have the same problem. Pid file is created and deleted in ebusd main see: If you are logged in as "user" you don’t have permissions to read and write the pid file and this creates the issue. |
This is happening even if I'm not "logged-in", I mean if I do a "sudo reboot" and not log in immediately. So I'm not sure it is related to the user permissions. |
To test if it is a permission issue you could try following. Stop the ebus service Manual create your /run/ebusd.pid file with 777 permission. If the file exist ebusd will write the PID number in it. |
I can't reproduce this on a RPi buster with 21.3. maybe this is related to the umask? you might want to check this. |
Same problem even if I've created the pid file in both directories (/run and /var/run). Only because I've monit service to restart the services it comes up after a few seconds. The interesting thing is that the PID in both dirs has the same value. I'm not sure to understand why, if I'm using --pidfile=/run/ebusd.pid |
/run and /var/run are usually symlinked to each other. |
Yes, I was thinking they are symlinked, but I was surprised by the error message "references path below legacy directory /var/run/, updating /var/run/ebusd.pid → /run/ebusd.pid", may be the error message is outdated. When the rpi is rebooted, it starts with the service, I believe that means user root ... when it is restarted by monit, it start as root. eBuscheck process eBus matching "ebusd" ps -ef | grep ebusd |
Would it not be easier to change the permissions in main.cpp to avoid issues with clean PI installs? 660 pidFile = fopen(opt.pidFile, "w+"); Just created the ebusd.pid file in the /var/run/ folder with Changed permissions like in main.ccp sudo chmod 755 ebusd.pid sudo chmod 777 ebusd.pid So PI like I’m logged in now has only “other” permissions. |
Ok Managed to login as root, but under root the desktop taskbar is missing!!! Think I have to build ebusd myself and change permission in line 662 to 777 so I can run ebusd as “PI” user. The missing taskbar under root seems to be intended and not easy to fix. Ron |
guys, I really don't know what you're doing here. |
Hi John, Problem is that default Pi OS if you are logged in as “root” doesn’t have a taskbar on the desktop. For a final standalone application ebusd works fine, but if you have to do a lot of debugging on ebus messages it is not real practical. Other thing I noticed is if you install by deb file the file ebusd.log in folder /var/log/ is not created, had to manual create this file to get ebusd working. Ron |
I always ssh as user "pi", not root, but ebusd is installed by default, so I guess it runs as root? pi@iot:~ $ ls -la /usr/bin/ebusd default start script: pi@iot:~ $ cat /etc/init.d/ebusd BEGIN INIT INFOProvides: ebusdRequired-Start: $network $remote_fs $syslogRequired-Stop: $network $remote_fs $syslogDefault-Start: 2 3 4 5Default-Stop: 0 1 6Short-Description: controls ebusd, the daemon for communication with eBUS heating systems.END INIT INFODAEMON=/usr/bin/ebusd if test -f /lib/lsb/init-functions; then
fi [ -r /etc/default/ebusd ] && . /etc/default/ebusd if [ ! -x $DAEMON ]; then ALL_OPTS=${!EBUSD_OPTS*} start_instance () { stop_instance () { case $1 in |
hi changing the file /etc/systemd/system/ebusd.service manually from to eliminates the warning in messages #502 created |
I’m totally unknown with Linux but you already noticed that. Do change the permissions in the terminal with "sudo su" In the past I stopped ebusd with “service ebusd stop” and manual started it again to reload the csv files after modification. Looked in “/etc/systemd/system/” but I don’t see the file "ebisd.service" does this causes this behaviour? Where can I find the ebusd.service file? Did installed ebusd by deb file! |
@rhellenbrand to be honest i do not see any connection between your problem and the original one. can you please open a new ticket and try to summarize, what is not working for you? Have you tried to reinstall the ebusd package? Can you include the output into the new ticket? |
I've realized that when I reboot my system, I got several errors like:
systemd[1]: /lib/systemd/system/ebusd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/ebusd.pid → /run/ebusd.pid; please update the unit file accordingly.
before ebusd starts.
If I restart the system manually, it doesn't happen.
I've tried adding --pidfile=/run/ebusd.pid into the ebus.conf file, but the problem is the same, so it looks like the raspbian is starting the service "initially" ignoring the config file?
The text was updated successfully, but these errors were encountered: