FTP Upload Problems

76 views
Skip to first unread message

buck...@googlemail.com

unread,
Dec 17, 2020, 2:41:52 AM12/17/20
to weewx-user
Hello, since some days i ve problems to upload my ftp files to my webserver
i use weewx 4.2.0
system is uptodate

here a part of my syslog:

Dec 17 08:35:27 raspberrypi weewx[652] INFO weewx.cheetahgenerator: Generated 15 files for report Belchertown in 10.59 seconds
Dec 17 08:35:27 raspberrypi weewx[652] INFO weewx.reportengine: Copied 31 files to /var/www/html
Dec 17 08:35:46 raspberrypi weewx[652] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 4.71 seconds
Dec 17 08:35:47 raspberrypi weewx[652] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 1.16 seconds
Dec 17 08:35:47 raspberrypi weewx[652] INFO weewx.reportengine: Copied 87 files to /var/www/html/weewx
Dec 17 08:35:47 raspberrypi weewxd: translategenerator.pyc: Language is german
Dec 17 08:35:48 raspberrypi weewxd: historygenerator.pyc: Generated 8 tables in 0.42 seconds
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: Generate failed with exception '<type 'exceptions.OSError'>'
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/niculskin/forecast.html.tmpl
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: **** Reason: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/etc/weewx/skins/niculskin/forecast_iconic.inc'
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 323, in generate
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_niculskin_forecast_html_tmpl.py", line 96, in respond
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1685, in _handleCheetahInclude
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****      file=file)
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 738, in compile
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****      fileHash += str(os.path.getmtime(file))
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python2.7/genericpath.py", line 62, in getmtime
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****      return os.stat(filename).st_mtime
Dec 17 08:35:52 raspberrypi weewx[652] ERROR weewx.cheetahgenerator: ****  OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/etc/weewx/skins/niculskin/forecast_iconic.inc'
Dec 17 08:35:52 raspberrypi weewx[652] INFO weewx.cheetahgenerator: Generated 13 files for report StandardReport in 4.78 seconds
Dec 17 08:35:53 raspberrypi weewx[652] INFO weewx.imagegenerator: Generated 13 images for report StandardReport in 1.18 seconds
Dec 17 08:35:53 raspberrypi weewx[652] INFO weewx.reportengine: Copied 11 files to /var/www/html/weewx
Dec 17 08:35:53 raspberrypi weewx[652] INFO user.sftp: sftpgenerator: upload not possible: missing parameter 'server'
Dec 17 08:35:53 raspberrypi weewx[652] INFO user.sftp: sftpgenerator: upload not possible: No module named pysftp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/daytempchill.png to server 213.160.xx.xx. Reason: '451-Error during write to file#012451 Transfer aborted'
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine: ftpgenerator: (0): caught exception '<class 'ftplib.error_temp'>': 451-Error during write to file#012451 Transfer aborted
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 331, in run
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 163, in run
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 488, in storbinary
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      return self.voidresp()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 231, in voidresp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      resp = self.getresp()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 224, in getresp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      raise error_temp, resp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  error_temp: 451-Error during write to file
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  451 Transfer aborted
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/daytempchill.png to server 213.160.xx.xx. Reason: '451-Error during write to file#012451 Transfer aborted'
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine: ftpgenerator: (1): caught exception '<class 'ftplib.error_temp'>': 451-Error during write to file#012451 Transfer aborted
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 331, in run
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 163, in run
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 488, in storbinary
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      return self.voidresp()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 231, in voidresp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      resp = self.getresp()
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 224, in getresp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      raise error_temp, resp
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  error_temp: 451-Error during write to file
Dec 17 08:35:54 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  451 Transfer aborted
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/daytempchill.png to server 213.160.xx.xx. Reason: '451-Error during write to file#012451 Transfer aborted'
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine: ftpgenerator: (2): caught exception '<class 'ftplib.error_temp'>': 451-Error during write to file#012451 Transfer aborted
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 331, in run
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 163, in run
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 488, in storbinary
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      return self.voidresp()
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 231, in voidresp
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      resp = self.getresp()
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 224, in getresp
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****      raise error_temp, resp
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  error_temp: 451-Error during write to file
Dec 17 08:35:55 raspberrypi weewx[652] ERROR weewx.reportengine:         ****  451 Transfer aborted

Tom Keffer

unread,
Dec 17, 2020, 8:53:56 AM12/17/20
to weewx-user
There are several errors in your log. 

1. You have enabled 'niculskin', yet the templates for it are not available.

2. You have enabled the extension sftpgenerator, but did not provide a value for 'server'

3. You have enabled the extension sftpgenerator, but did not install its required pre-requisite pysftp.

4. And, finally the FTP errors. I suspect the problem here is that something changed on your webserver. A 451 error is a transient error, meaning that it is a temporary issue. Frankly, I doubt that. Are you able to manually FTP into your webserver directly from the command line? For example:

cd /var/www/html/weewx
Name: (fill in your user name)
Password: (fill in your password)
ftp> type i
ftp> put daytempchill.png
ftp> quit

This session would upload the file daytempchill.png, which is the file that failed.


--
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/796636a4-54db-4c12-8ea2-4907bd5e2bddn%40googlegroups.com.

buck...@googlemail.com

unread,
Dec 17, 2020, 12:51:55 PM12/17/20
to weewx-user
4)
ftp 123.456.789.000

-bash:  ftp: command not found

?

Ralf B

unread,
Dec 17, 2020, 1:04:51 PM12/17/20
to weewx...@googlegroups.com
root@raspberrypi:/var/www/html/weewx# ftp 213.160.xx.xx
Connected to 213.160.xx.xx.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 18:02. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 30 minutes of inactivity.
Name (213.160.xx.xx:root): xxxxxxxxxxxxxxxxxxx
331 User xxxxxxxxxxxxxxxxx OK. Password required
Password:
230 OK. Current directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> type i
i: unknown mode
ftp>

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/IbYxWw6jFQE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zED2xdB_wMs5z2aWK8hPWWgSByHbJz-Wst6A37rMF%3D4KEQ%40mail.gmail.com.

Ralf B

unread,
Dec 17, 2020, 1:05:02 PM12/17/20
to weewx...@googlegroups.com
root@raspberrypi:/var/www/html/weewx# ftp 213.160.71.98
Connected to 213.160.71.98.

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 18:02. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 30 minutes of inactivity.
Name (213.160.71.98:root): xxxxxxx
331 xxxxxxx OK. Password required

Password:
230 OK. Current directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> type i
i: unknown mode
ftp>
Am Do., 17. Dez. 2020 um 14:53 Uhr schrieb Tom Keffer <tke...@gmail.com>:
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/IbYxWw6jFQE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zED2xdB_wMs5z2aWK8hPWWgSByHbJz-Wst6A37rMF%3D4KEQ%40mail.gmail.com.

Tom Keffer

unread,
Dec 17, 2020, 3:13:07 PM12/17/20
to weewx...@googlegroups.com
type I switches to binary mode, but it looks like your client is already in that mode. Just press on with the “put” statement. 

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