weewx.pid and systemd

53 views
Skip to first unread message

gary....@gmail.com

unread,
Aug 4, 2020, 10:03:06 PM8/4/20
to weewx-user
I had a strange thing happen today. Power failed during the tropical storm.
I shut down the server as the UPS will only hold for 30 minutes.
However, after 25 minutes, the power returned and I started the server.
After a couple of hours, I checked my weather page and found it hadn't updated since right before the shutdown.
So, I checked logs and found little past this:

Aug  4 20:35:50 srvr systemd[1]: /etc/systemd/system/weewx.service:13: PIDFile= references a path below legacy directory /var/run/, updating /var/run/weewx.pid → /run/weewx.pid; please update the unit file accordingly.

Surely that wouldn't stop weewx from running, so I restarted the server. Same behavior.
I also noticed that mosquitto didn't seem to run properly.:

FIFO /tmp/dlt cannot be opened. Retrying later...

Eventually after unproductively chasing the mosquitto/dlt error, I stopped weewxd then started from the command line. It ran and produced loop data. CTL-C out and started the service.

Runs fine.

Beyond my level for sure. Any ideas/requests for logs, etc would be appreciated.

Greg from Oz

unread,
Aug 4, 2020, 10:35:07 PM8/4/20
to weewx-user
Edit /etc/systemd/system/weewx.service
If the above file doesn't exist then edit /etc/init.d/weewx 
Wherever /var/run is change to /run/
Restart and see what happens.


Graham Eddy

unread,
Aug 4, 2020, 11:34:27 PM8/4/20
to weewx...@googlegroups.com
/run and /tmp are both (usually) tmpfs file systems - maybe something screwed up tmpfs then the files/dirs/symlinks meant to be auto-created by tmpfiles.d didn’t happen - would be interested to see `mount | grep tmpfs` and also, if /run and /tmp mounted correctly, what is under them pre-mount (which is hard for these particular mount points because of running system dependencies)

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/51c4a7ba-855d-47c0-b428-aa21d2a7003bn%40googlegroups.com.

Graham Eddy

unread,
Aug 4, 2020, 11:37:54 PM8/4/20
to weewx...@googlegroups.com
> On 5 Aug 2020, at 12:03 pm, gary....@gmail.com <gary....@gmail.com> wrote:

> Aug 4 20:35:50 srvr systemd[1]: /etc/systemd/system/weewx.service:13: PIDFile= references a path below legacy directory /var/run/, updating /var/run/weewx.pid → /run/weewx.pid; please update the unit file accordingly.

normal - can be ignored

> FIFO /tmp/dlt cannot be opened. Retrying later…

not normal, hence my previous comments about /tmp

gary....@gmail.com

unread,
Aug 5, 2020, 5:50:55 AM8/5/20
to weewx-user
mount | grep tmpfs
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=8118412k,nr_inodes=2029603,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1632724k,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1632720k,mode=700,uid=1000,gid=1000)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=1632720k,mode=700)

Graham Eddy

unread,
Aug 5, 2020, 7:01:10 AM8/5/20
to weewx...@googlegroups.com
i meant it would have been good to see this when the problem was manifesting… in particular whether /run and /tmp were writeable at the time and whether they were on root volume or tmpfs volumes

well, /tmp is not on tmpfs now so that should be fixed regardless (but system will function without it) - if it is already configured to automount /tmp on tmpfs then this is smoking gun that something broke (and is still broken), otherwise mounting it is just an improvement

Reply all
Reply to author
Forward
0 new messages