weewx won't start

70 views
Skip to first unread message

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 3:41:40 AM1/15/18
to weewx-user
I recently installed weewx 3.8.0 on a raspberry using setup.py. 
However, it won't start if I use sudo /etc/init.d/weewx start.
weewx is there, it has the correct permissions - just nothing happens, nothing in log file.
Works fine, if I do cd /home/weewx and sudo ./bin/weewxd weewx.conf
?

gjr80

unread,
Jan 15, 2018, 3:49:43 AM1/15/18
to weewx-user
Hi,k

Are you sure there is nothing at all in the log? After you installed weeWX did you execute the following:

cd /home/weewx
sudo cp util
/init.d/weewx.debian /etc/init.d/weewx
sudo chmod
+x /etc/init.d/weewx
sudo update
-rc.d weewx defaults 98
sudo
/etc/init.d/weewx start

Gary

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 3:59:18 AM1/15/18
to weewx-user
Yes. 
I just tried to delete /etc/init.d/weewx and then repeated the procedure exactly as you state - same result.
There is also no delay after sudo /etc/init.d/weewx start - and nothing in log (debug=1)

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/QifZZ_cx18Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Milner

unread,
Jan 15, 2018, 4:05:04 AM1/15/18
to weewx-user
which log file are you looking at??

have you directed weewx output to a separate logfile or are you looking in syslog??
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 4:07:41 AM1/15/18
to weewx-user
Looking at syslog, sudo tail -f /var/log/syslog 

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

gjr80

unread,
Jan 15, 2018, 4:10:54 AM1/15/18
to weewx-user
Can you capture the screen when you execute those commands and the try to start weeWX. Not doubting you but find it surprising that something isn't spitting out an error somewhere.

Gary

Andrew Milner

unread,
Jan 15, 2018, 4:12:37 AM1/15/18
to weewx-user
are you sure you haven't redirected the log to /var/log/weewx.log?

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 4:18:40 AM1/15/18
to weewx-user
Andrew: I haven't done that, no weewx.log
gjr80: 
jjk@raspberrypi:~ $ sudo /etc/init.d/weewx start
jjk@raspberrypi:~ $ sudo tail -f /var/log/syslog
Jan 15 09:06:37 raspberrypi systemd[1767]: Reached target Default.
Jan 15 09:06:37 raspberrypi systemd[1767]: Startup finished in 47ms.
Jan 15 09:06:37 raspberrypi systemd[1]: Started User Manager for UID 1001.
Jan 15 09:11:01 raspberrypi CRON[1833]: (root) CMD (/home/jjk/raspi.sh)
Jan 15 09:11:01 raspberrypi sendmail[1835]: My unqualified host name (raspberrypi) unknown; sleeping for retry
Jan 15 09:12:01 raspberrypi sendmail[1835]: unable to qualify my own domain name (raspberrypi) -- using short name
Jan 15 09:12:01 raspberrypi sendmail[1835]: w0F9C1M3001835: from=root, size=332, class=0, nrcpts=1, msgid=<201801150912.w0F9C1M3001835@raspberrypi>, bodytype=8BITMIME, relay=root@localhost
Jan 15 09:12:01 raspberrypi sm-mta[1836]: w0F9C1PR001836: from=<root@raspberrypi>, size=576, class=0, nrcpts=1, msgid=<201801150912.w0F9C1M3001835@raspberrypi>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jan 15 09:12:01 raspberrypi sendmail[1835]: w0F9C1M3001835: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30332, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w0F9C1PR001836 Message accepted for delivery)
Jan 15 09:12:02 raspberrypi sm-mta[1837]: w0F9C1PR001836: to=<root@raspberrypi>, ctladdr=<root@raspberrypi> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30771, dsn=2.0.0, stat=Sent
^C
jjk@raspberrypi:~ $ sudo /etc/init.d/weewx start
jjk@raspberrypi:~ $ sudo tail -f /var/log/syslog
Jan 15 09:06:37 raspberrypi systemd[1767]: Reached target Default.
Jan 15 09:06:37 raspberrypi systemd[1767]: Startup finished in 47ms.
Jan 15 09:06:37 raspberrypi systemd[1]: Started User Manager for UID 1001.
Jan 15 09:11:01 raspberrypi CRON[1833]: (root) CMD (/home/jjk/raspi.sh)
Jan 15 09:11:01 raspberrypi sendmail[1835]: My unqualified host name (raspberrypi) unknown; sleeping for retry
Jan 15 09:12:01 raspberrypi sendmail[1835]: unable to qualify my own domain name (raspberrypi) -- using short name
Jan 15 09:12:01 raspberrypi sendmail[1835]: w0F9C1M3001835: from=root, size=332, class=0, nrcpts=1, msgid=<201801150912.w0F9C1M3001835@raspberrypi>, bodytype=8BITMIME, relay=root@localhost
Jan 15 09:12:01 raspberrypi sm-mta[1836]: w0F9C1PR001836: from=<root@raspberrypi>, size=576, class=0, nrcpts=1, msgid=<201801150912.w0F9C1M3001835@raspberrypi>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jan 15 09:12:01 raspberrypi sendmail[1835]: w0F9C1M3001835: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30332, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w0F9C1PR001836 Message accepted for delivery)
Jan 15 09:12:02 raspberrypi sm-mta[1837]: w0F9C1PR001836: to=<root@raspberrypi>, ctladdr=<root@raspberrypi> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30771, dsn=2.0.0, stat=Sent

The only thing I change from the standard installation, is that I installed in /home/jjk/weewx instead og /home/weewx

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

--

gjr80

unread,
Jan 15, 2018, 4:20:40 AM1/15/18
to weewx-user
I suspect the issue is that the daemon is not even starting hence no log output, but let's clear up the logging side. When you run weeWX directly (sudo ./bin/weewxd etc) do you see weeWX log entries in syslog? If so logging is fine and the issue is with starting the daemon, if not you need to find where the weeWX log is going.

Also, what linux are you running ? Rapsbian stretch?

Gary

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 4:29:13 AM1/15/18
to weewx-user
Yes, what is wrong is that the demon is not starting. If I start it directly, all is fine.
Linux: strech-lite
inux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux


Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

--

gjr80

unread,
Jan 15, 2018, 4:45:53 AM1/15/18
to weewx-user
On Monday, 15 January 2018 19:18:40 UTC+10, Jens-Jørgen Kjærgaard wrote:

The only thing I change from the standard installation, is that I installed in /home/jjk/weewx instead og /home/weewx

Well there is the problem, the weewx.debian script is looking for weewx in /home/weewx and there is nothing there. You will need to change the paths in the weewx.debian script or install under weeWX /home/weewx.

Gary

Andrew Milner

unread,
Jan 15, 2018, 4:47:22 AM1/15/18
to weewx-user
A silly idea - since you have installed in a different (non-standard) location - have you checked that /etc/init.d/weewx is actually pointing to the correct directory for starting weewx and weewx.conf?
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 4:51:52 AM1/15/18
to weewx-user
Gary and Andrew, of course.
I modified the script, everything is working now.
It has just been several years since I did a clean install - so I forgot.
Thanks!

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 5:04:34 AM1/15/18
to weewx-user
Well, not quite. Now it apparently starts: 

jjk@raspberrypi:~/weewx $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.

- but still nothing in syslog? And if try to start again, I get the same message?

What I modified:
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
WEEWX_BIN=/home/jjk/weewx/bin/weewxd
WEEWX_CFG=/home/jjk/weewx/weewx.conf
WEEWX_USER=root:root 
DESC="weewx weather system"


Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

gjr80

unread,
Jan 15, 2018, 5:06:27 AM1/15/18
to weewx-user
Good to hear, just remember if you modified the script in weewx/util/init.d any future weeWX upgrades will overwrite your changes. You could place a copy elsewhere and change the link to point to that copy of the script, but then any future chnages to weewx.debian would not be passed on to your install, probably unlikely to be too many changes to weewx.debain but it does happen occassionally.

Gary

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 5:10:15 AM1/15/18
to weewx-user
Did you read my latest?

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Jens-Jørgen Kjærgaard

unread,
Jan 15, 2018, 5:18:00 AM1/15/18
to weewx-user
Forget it. Because I disabled the hardware clock, weewx doesn't start immediately - I think. 

Jens-Jørgen Kjærgaard
Sønderstrand 5
9300 Sæby

gjr80

unread,
Jan 15, 2018, 5:29:03 AM1/15/18
to weewx-user
Our posts must have crossed.

So has your RPi picked up a sensible time? From memory weeWX will wait until the system time is after 1 January 2000 before starting fully, but this check is done in the weeWX python code and it's failure will be logged. If you are not seeing anything in syslog then it appears that weeWX is not getting to this stage.

Gary

vk3...@gmail.com

unread,
Jan 15, 2018, 8:40:59 PM1/15/18
to weewx-user
You can get around the issue with the clock by switching from the old 'init.d' approach to the systemctl equivalent. (With the versions of Raspbian - which I assume you are using on the RPi - any files in the 'init.d' directories are automatically converted to a (roughly) equivalent systemctl script anyway which is then used.)
Using systemctl you can make sure that weewx does not start up until the network system time etc. are all set and available - as far as I know you cannot do this with the old way.
Susan
Reply all
Reply to author
Forward
0 new messages