FTP upload fail

143 views
Skip to first unread message

BORIS

unread,
Dec 9, 2023, 1:49:55 PM12/9/23
to weewx-user
Hi,
I have not used  Weewx for some time and installed it again on a Ubuntu 14 Laptop.
I can collect the data from my Klimalogg pro and the files are stored correctly.
Only the FTP transfer is not working to my server at ONE.com
I have other programs written in Python that can upload files correctly to the server.

My weewx.conf file, FTP part:
   [[kl]]
        skin = kl
        HTML_ROOT = /var/www/html/weewx/kl
   
    [[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, set "enable" to "true", then
        # fill out the next four lines.
        # Use quotes around passwords to guard against parsing errors.
        enable = true
        user = smeds.eu
        password = "**********"
        server = ftp.smeds.eu    # The ftp server name, e.g, www.myserver.org
        path = /new    # The destination directory, e.g., /weather
       
        # Set to True for an FTP over TLS (FTPS) 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 = /var/www/html/weewx
       
        # Most FTP servers use port 21
        port = 21
       
        # Set to 1 to use passive mode, zero for active mode
        passive = 1

Part of the log looks like this with debug on: 

Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] INFO weewx.imagegenerator: Generated 11 images for report kl in 1.68 seconds
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weewx.reportengine: Running report 'FTP'
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Ftp/skin.conf for report 'FTP'
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weewx.reportengine: Cannot read localization file /etc/weewx/skins/Ftp/lang/en.conf for report 'FTP': Config file not found: "/etc/weewx/skins/Ftp/lang/en.conf".
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weewx.reportengine: **** Using defaults instead.
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Attempting connection to ftp.smeds.eu
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: FTP encoding not supported, ignoring.
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Connected to ftp.smeds.eu
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: 0 ./weektempdew.png d253e64a3a43c3e5f585744b6a7f73c6fbbf28a04f014eb0139b9fb587a627ac
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/weektempdew.png to server ftp.smeds.eu. Reason: '550 Requested action not taken. File unavailable (e.g., file not found, no access).'
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine: ftpgenerator: (0): caught exception '<class 'ftplib.error_perm'>': 550 Requested action not taken. File unavailable (e.g., file not found, no access).
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 437, in run
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 220, in run
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 471, in storbinary
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      conn = self.transfercmd(cmd, rest)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 376, in transfercmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      return self.ntransfercmd(cmd, rest)[0]
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 339, in ntransfercmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      resp = self.sendcmd(cmd)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 249, in sendcmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      return self.getresp()
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 224, in getresp
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      raise error_perm, resp
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****  error_perm: 550 Requested action not taken. File unavailable (e.g., file not found, no access).
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Attempting connection to ftp.smeds.eu
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: FTP encoding not supported, ignoring.
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Connected to ftp.smeds.eu
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: 0 ./weektempdew.png d253e64a3a43c3e5f585744b6a7f73c6fbbf28a04f014eb0139b9fb587a627ac
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/weektempdew.png to server ftp.smeds.eu. Reason: '550 Requested action not taken. File unavailable (e.g., file not found, no access).'
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine: ftpgenerator: (1): caught exception '<class 'ftplib.error_perm'>': 550 Requested action not taken. File unavailable (e.g., file not found, no access).
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 437, in run
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 220, in run
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 471, in storbinary
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      conn = self.transfercmd(cmd, rest)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 376, in transfercmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      return self.ntransfercmd(cmd, rest)[0]
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 339, in ntransfercmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      resp = self.sendcmd(cmd)
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 249, in sendcmd
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      return self.getresp()
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****    File "/usr/lib/python2.7/ftplib.py", line 224, in getresp
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****      raise error_perm, resp
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] ERROR weewx.reportengine:         ****  error_perm: 550 Requested action not taken. File unavailable (e.g., file not found, no access).
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Attempting connection to ftp.smeds.eu
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: FTP encoding not supported, ignoring.
Dec  9 18:40:30 boris-TOSHIBA-NB100 weewx[5753] DEBUG weeutil.ftpupload: Connected to ftp.smeds.eu


....................
Can someone help me please.
/Boris Smeds

vince

unread,
Dec 9, 2023, 2:13:58 PM12/9/23
to weewx-user
==> error_perm: 550 Requested action not taken. File unavailable (e.g., file not found, no access).

From your weewx.com I see 'path = /new' which I suspect is not correct.  Try connecting manually to your site via ftp and typing pwd to see what the actual pathname it uses on the server side.

BORIS

unread,
Dec 9, 2023, 3:16:20 PM12/9/23
to weewx-user
I have tried with other paths e.g. thamn that exists on the server without success. I thought that if I declare a new path called "new" it would be generated automaticly. At smeds.eu/thamn I have an old upload from 11 of June 2023. The directory new has not been generated on the server. Checked with WINscp
/Boris

vince

unread,
Dec 9, 2023, 3:42:47 PM12/9/23
to weewx-user
log in via ftp using your username and password
type 'pwd'
that will tell you their current path

It is not generally a good assumption to make that anything is generated automatically.  My 'guess' is that you are trying to write to a directory that does not exist.

BORIS

unread,
Dec 9, 2023, 4:51:13 PM12/9/23
to weewx-user
I get after pwd:
/customers/0/1/3/smeds,eu/httpd.www
Regards
Boris

BORIS

unread,
Dec 9, 2023, 4:55:42 PM12/9/23
to weewx-user
correction:
/customers/0/1/3/smeds.eu/httpd.www

vince

unread,
Dec 9, 2023, 9:32:38 PM12/9/23
to weewx-user

So try that as your path and see if it works

BORIS

unread,
Dec 10, 2023, 6:42:12 AM12/10/23
to weewx-user
Great! vince, that solved my problem. I added thamn to the path  . New path :  /customers/0/1/3/smeds.eu/httpd.www/thamn .   I now see my Klimalogg pro temperatures at smeds.eu/thamn/kl
It must be that ONE.com has changed their servers since it worked before with just /thamn as path.
Thanks again for your support.

Reply all
Reply to author
Forward
0 new messages