Weewx 5.0 FTP and Rsync not even attempting to upload what's going on?

107 views
Skip to first unread message

Kevin Key

unread,
Jun 15, 2024, 11:07:29 PMJun 15
to weewx-user
I have FTP and Rsync enabled and the servers and credentials specified, but no uploads and no errors in the log. Any suggestions? The local files are created, but there is nothing on the log to indicate any upload attempts. I have debug = 1.

gjr80

unread,
Jun 16, 2024, 12:40:21 AMJun 16
to weewx-user
The clue will be in the log, sometimes it is what is not in the log rather than an error message that provides the clue. I suggest you leave debug = 1, restart WeeWX and post a log extract showing the full WeeWX startup and at least a couple of report cycles.

Gary
Message has been deleted

vince

unread,
Jun 16, 2024, 5:14:51 PMJun 16
to weewx-user
[[RSYNC]] # rsync'ing to a webserver is treated as just another report skin = Belchertown HTML_ROOT = /var/www/html/weewx/rsync

Should be skin = Rsync 

(you posted your forecast credentials in your belchertown section of debug.txt so you might want to generate a new key for that..)

On Sunday, June 16, 2024 at 1:36:12 PM UTC-7 Kevin Key wrote:
Here ya go. The only lines that, IMHO, stand out:

Jun 16 13:24:25 linux weewxd[1930780]: DEBUG weewx.reportengine: Running report 'FTP'
Jun 16 13:24:25 linux weewxd[1930780]: DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Belchertown/skin.conf for report 'FTP'
Jun 16 13:24:25 linux weewxd[1930780]: DEBUG weewx.reportengine: Invalid report_timing setting for report 'FTP', running report anyway
Jun 16 13:24:25 linux weewxd[1930780]: DEBUG weewx.reportengine:        ****  Invalid field 'minutes' in 'minutes hours day_of_month months day_of_week'
Jun 16 13:24:25 linux weewxd[1930780]: DEBUG weewx.reportengine: Running generators for report 'FTP' in directory '/etc/weewx/skins/Belchertown'

Kevin Key

unread,
Jun 16, 2024, 5:35:30 PMJun 16
to weewx-user
Thanks.

Kevin Key

unread,
Jun 16, 2024, 6:29:56 PMJun 16
to weewx-user
Thanks Vince. I'm getting closer. For some reason, the connection via weewx gets rejected but not when I do so via the command line:


Jun 16 15:27:54 linux weewxd[2084707]: DEBUG weeutil.rsyncupload: rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e', 'ssh', '/var/www/html/weewx/belchertown/', 'kevi...@192.254.224.66:/home2/kevinphy/kevinkeyphotography.com']]
Jun 16 15:27:54 linux weewxd[2084707]: ERROR weeutil.rsyncupload: rsync reported errors. Original command: ['rsync', '--archive', '--stats', '-e', 'ssh', '/var/www/html/weewx/belchertown/', 'kevi...@192.254.224.66:/home2/kevinphy/kevinkeyphotography.com']
Jun 16 15:27:54 linux weewxd[2084707]: ERROR weeutil.rsyncupload: **** Host key verification failed.
Jun 16 15:27:54 linux weewxd[2084707]: ERROR weeutil.rsyncupload: **** rsync: connection unexpectedly closed (0 bytes received so far) [sender]
Jun 16 15:27:54 linux weewxd[2084707]: ERROR weeutil.rsyncupload: **** rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]
^X^C
kevin@linux:/usr/share/weewx/weeutil$

This works fine via command line:

rsync -arP /var/www/html/weewx/  kevi...@192.254.224.66:/home2/kevinphy/kevinkeyphotography.com/weewx

On Sunday, June 16, 2024 at 2:14:51 PM UTC-7 vince wrote:

vince

unread,
Jun 16, 2024, 7:07:36 PMJun 16
to weewx-user
Host key verification failed......

Remember weewx runs as user 'weewx' and not your typical user (in your case 'kevinphy')....

You need to ssh into the remote host as the user weewx runs as 'once', accept the remote host's system key when prompted, and weewx will be able to rsync over ssh as 'its' user.  It can be a little convoluted to do this typically, so I usually cheat a little....

# temporarily let weewx run a shell
sudo chsh -s /bin/bash weewx

# su to the weewx account
su - weewx
(you will be in a shell as weewx)

# seed its known_hosts file and set permissions correctly
ssh your_remote_host_or_ip
(answer yes for the host key prompt, then ^C to exit)
(and exit your weewx shell)

# (re)set weewx's shell to nologin
sudo chsh -s /usr/sbin/nologin weewx

There is undoubtedly many ways to do it, but this worked for me.

Kevin Key

unread,
Jun 16, 2024, 7:51:53 PMJun 16
to weewx-user
And now I keep getting this ""Received disconnect from 192.254.224.66 port 2222:2: Too many authentication failures". Do I need to delete everything and start over?

Kevin Key

unread,
Jun 16, 2024, 8:02:57 PMJun 16
to weewx-user

weewx@linux:~$ ssh we...@192.254.224.66 -p2222
we...@192.254.224.66's password:

Received disconnect from 192.254.224.66 port 2222:2: Too many authentication failures
Disconnected from 192.254.224.66 port 2222
weewx@linux:~$

Kevin Key

unread,
Jun 16, 2024, 8:39:51 PMJun 16
to weewx-user
All good now. I had to have my web hosting company take care of some issues.
Reply all
Reply to author
Forward
0 new messages