no ftp upload

133 views
Skip to first unread message

Ralf Buck

unread,
Feb 2, 2016, 1:53:31 PM2/2/16
to weewx-user
hello,

im new in weewx.

i have problems to upload via ftp. my html folder on my webserver is empty.

part of the config
    [[FTP]]
       
# FTP'ing the results to a webserver is treated as just another report,
       
# albeit one with an unusual report generator!
        skin
= Ftp
       
       
# If you wish to use FTP, uncomment and fill out the next four lines.
        user
= USERNAME
        password
= PASSWORT
        server
= srvXX.sysproserver.de
       
#path = /
        path
= /var/www/web01/html
       
       
# Set to True for a secure FTP (SFTP) connection. Not all servers
       
# support this.
        secure_ftp
= False
       
       
# To upload files from something other than what HTML_ROOT is set
       
# to above, specify a different HTML_ROOT here.
       
#HTML_ROOT = public_html
       
       
# Most FTP servers use port 21
        port
= 21
       
       
# Set to 1 to use passive mode, zero for active mode
        passive
= 1

if i connect via FILEZILLA, i have no connection problems.
i had try both path, "/" and "/var/www/web01/html"

a second question:
the folder /home/weewx/skins/Ftp ist empty, only one
file skin.conf is there.

###############################################################################
# Copyright (c) 2010 Tom Keffer <tke...@gmail.com>                           #
#                                                                             #
# FTP CONFIGURATION FILE                                                      #
#   This 'report' does not generate any files. Instead, we use the report     #
#   engine to invoke FTP, which copies files to another location.             #
###############################################################################

[Generators]
    generator_list
= weewx.reportengine.FtpGenerator

is that right or must i copy some other files in this directoty?

regard
       

Ralf Buck

unread,
Feb 2, 2016, 2:04:53 PM2/2/16
to weewx-user
Debug is enable, but i found no infos about FTP ACCESS or FTP ULOAD in the syslog

System is 2015-11-21-raspbian-jessie

Ralf Buck

unread,
Feb 2, 2016, 4:33:06 PM2/2/16
to weewx-user
is this normal?

a) No DEBUG
b) Failed to read data

Feb  2 21:14:38 raspberrypi kernel: [ 2919.868470] usb 1-1.2: reset low-speed USB device number 4 using dwc_otg
Feb  2 21:14:38 raspberrypi weewx[2257]: te923: read: address 0x0000fc
Feb  2 21:14:41 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:41 raspberrypi weewx[2257]: te923: Failed attempt 1 of 5 to read data: Bad header byte: c0 != 5a
Feb  2 21:14:41 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:14:45 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:45 raspberrypi weewx[2257]: te923: Failed attempt 2 of 5 to read data: Bad header byte: 94 != 5a
Feb  2 21:14:45 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:14:49 raspberrypi systemd[1]: Starting Session c14 of user pi.
Feb  2 21:14:49 raspberrypi systemd[1]: Started Session c14 of user pi.
Feb  2 21:14:49 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:49 raspberrypi weewx[2257]: te923: Failed attempt 3 of 5 to read data: Bad header byte: c1 != 5a
Feb  2 21:14:49 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:14:53 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:53 raspberrypi weewx[2257]: te923: Failed attempt 4 of 5 to read data: Bad header byte: 47 != 5a
Feb  2 21:14:53 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:14:57 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:57 raspberrypi weewx[2257]: te923: Failed attempt 5 of 5 to read data: Bad header byte: 70 != 5a
Feb  2 21:14:57 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:15:00 raspberrypi weewx[2257]: engine: Unable to load driver: Read failed after 5 tries
Feb  2 21:15:00 raspberrypi weewx[2257]:     ****  Exiting...
Feb  2 21:16:14 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:17:44 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:16:14 raspberrypi systemd[1]: Starting Session c15 of user pi.
Feb  2 21:16:14 raspberrypi systemd[1]: Started Session c15 of user pi.
Feb  2 21:17:01 raspberrypi CRON[2309]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb  2 21:17:42 raspberrypi systemd[1]: Started LSB: weewx weather system.
Feb  2 21:22:12 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:23:42 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:27:28 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:28:58 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:28:55 raspberrypi systemd[1]: Starting Session c16 of user pi.
Feb  2 21:28:55 raspberrypi systemd[1]: Started Session c16 of user pi.
Feb  2 21:29:13 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:30:43 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:30:06 raspberrypi systemd[1]: Starting Session c17 of user pi.
Feb  2 21:30:06 raspberrypi systemd[1]: Started Session c17 of user pi.


Thomas Keffer

unread,
Feb 2, 2016, 5:27:04 PM2/2/16
to weewx-user
1. Please include the logs anyway, preferably with debug=1. There are important clues in there. 

2. Yes, this is normal. There is only one file in ./skins/Ftp

-tk

On Tue, Feb 2, 2016 at 11:04 AM, Ralf Buck <buck...@googlemail.com> wrote:
Debug is enable, but i found no infos about FTP ACCESS or FTP ULOAD in the syslog

System is 2015-11-21-raspbian-jessie

--
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.
For more options, visit https://groups.google.com/d/optout.

Thomas Keffer

unread,
Feb 2, 2016, 5:27:29 PM2/2/16
to weewx-user
Cannot help you on this one. You'll have to wait for one of the te923 driver authors.

-tk

mwall

unread,
Feb 2, 2016, 5:50:10 PM2/2/16
to weewx-user
ralf,

there are a few things going on here.


On Tuesday, February 2, 2016 at 4:33:06 PM UTC-5, Ralf Buck wrote:
Feb  2 21:14:38 raspberrypi kernel: [ 2919.868470] usb 1-1.2: reset low-speed USB device number 4 using dwc_otg
Feb  2 21:14:38 raspberrypi weewx[2257]: te923: read: address 0x0000fc
Feb  2 21:14:41 raspberrypi weewx[2257]: te923: read: wrong number of bytes: 35 != 34
Feb  2 21:14:41 raspberrypi weewx[2257]: te923: Failed attempt 1 of 5 to read data: Bad header byte: c0 != 5a

'wrong number of bytes' indicate that the weewx driver is out of sync with the station.  this happens most often when the driver is establishing communication with the station.  however, in this case it looks like something did a reset to the usb.

it *should* clear itself up eventually. 

(we need to fix the te923 driver so that it flushes the usb before it tries to initiate any communication with the station.  that will make it recover more quickly from usb resets and the times it gets out of sync.  i'll have a look at that condition as i do the next round of te923 fixes.)

at any rate, this has nothing to do with ftp.

 
Feb  2 21:14:57 raspberrypi weewx[2257]: te923: Waiting 3 seconds before retry
Feb  2 21:15:00 raspberrypi weewx[2257]: engine: Unable to load driver: Read failed after 5 tries
Feb  2 21:15:00 raspberrypi weewx[2257]:     ****  Exiting...
Feb  2 21:16:14 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:17:44 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:16:14 raspberrypi systemd[1]: Starting Session c15 of user pi.
Feb  2 21:16:14 raspberrypi systemd[1]: Started Session c15 of user pi.
Feb  2 21:17:01 raspberrypi CRON[2309]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb  2 21:17:42 raspberrypi systemd[1]: Started LSB: weewx weather system.

is this after a reboot of the pi, or is systemd trying to restart weewx?  from the few log entries i would guess the former.

did weewx recover after systemd restarted it?

Feb  2 21:22:12 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:23:42 2016 [try http://www.rsyslog.com/e/2007 ]
Feb  2 21:27:28 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Tue Feb  2 21:28:58 2016 [try http://www.rsyslog.com/e/2007 ]

this is a bug in rsyslogd in your version of raspbian.

you need to fix the logging system before we can know what is happening to weewx.

a broken rsyslogd seems to be a common problem on raspberry pis lately.  it would help if you could identify exactly which operating system you are using so that others can avoid it.  please post the output from 'uname -a' and 'cat /etc/issue'

m

Ralf Buck

unread,
Feb 3, 2016, 3:04:44 AM2/3/16
to weewx-user
FTP runs now. it was the a "problem" with the first start. it seems, that 
weewx nees some time to readout the ring buffer of my station. (>1hour).

after restart and wait over night, today morning weewx all files are uploaded

thread can be closed

perhaps the admins write a infos in the installation guide, that the first start needs some time.

or, you you add a ftp/rsync test in weewx, to upload a testfile e.g. ./weewx testftp

Thomas Keffer

unread,
Feb 3, 2016, 7:50:55 AM2/3/16
to weewx-user
On Wed, Feb 3, 2016 at 12:04 AM, Ralf Buck <buck...@googlemail.com> wrote:
FTP runs now. it was the a "problem" with the first start. it seems, that 
weewx nees some time to readout the ring buffer of my station. (>1hour).

after restart and wait over night, today morning weewx all files are uploaded

thread can be closed

perhaps the admins write a infos in the installation guide, that the first start needs some time.


​Perhaps the user would like to fork and add such a section?

-tk​
 
Reply all
Reply to author
Forward
0 new messages