WeewX FTP-Upload failed

215 views
Skip to first unread message

Michael Büttner

unread,
Nov 7, 2023, 3:12:45 PM11/7/23
to weewx-user
Good evening,

I can no longer upload files from my raspi to my server. The connection and upload with Fillezilla works perfectly.

I use:
Raspberry
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian

and

Weewx Version 4.10.2

My weex-config looks like this:

        enable = true
        user = XXXXXX-neu
        password = XXXXXXX
        server = XXXXXXXXX-data.host    # The ftp server name, e.g, ww>
        path = /herbst_weewx    # The destination directory, e.g., /weather

        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = True

        # 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 = 22

This is the error message:

Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine: ftpgenerator: (2): caught exception '<class 'TimeoutError'>': timed out
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 437, in run
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****          ^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 175, in run
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      ftp_server.connect(self.server, self.port)
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 162, in connect
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      self.welcome = self.getresp()
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****                     ^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 244, in getresp
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      resp = self.getmultiline()
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 234, in getmultiline
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      nextline = self.getline()
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****                 ^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 212, in getline
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      line = self.file.readline(self.maxline + 1)
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/socket.py", line 706, in readinto
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****      return self._sock.recv_into(b)
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine:         ****  TimeoutError: timed out
Nov  7 20:26:20 weewx071123 python3[3260]: weewx[3260] ERROR weewx.reportengine: ftpgenerator: Upload failed


I've tried all variants, with ftp and sftp, changed port, even different login, but the error always occurs. Does anyone have any idea why this might be?

Thank you
Micha

vince

unread,
Nov 7, 2023, 4:02:24 PM11/7/23
to weewx-user
The tls setting comes to mind...

Tom Keffer

unread,
Nov 7, 2023, 6:52:15 PM11/7/23
to weewx...@googlegroups.com
This may be a change in your FTP server. A few things to try:

1. What version of Python are you using?

2. Try setting option secure_data to False:

[[FTP]]
    ... (as before) ...
    secure_data = false

3. If that doesn't work, then try setting option reuse_ssl to True:

[[FTP]]
    ... (as before) ...
    reuse_ssl = true




--
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/d7750d0d-5f5a-4a8e-baf8-d5a7e31823d1n%40googlegroups.com.

Michael Büttner

unread,
Nov 7, 2023, 11:58:25 PM11/7/23
to weewx-user
Hi Tom,
I have installed Python 3.11.2.
I tried both options you suggested. But unfortunately it doesn't work.
What's strange is that it works with Filezilla without any problems..

HeadwindJack

unread,
Nov 8, 2023, 12:51:54 AM11/8/23
to weewx-user
Michael,

Try using weewx-sftp. Operates the same as FTP and It works for me.

Michael Büttner

unread,
Nov 8, 2023, 2:20:15 AM11/8/23
to weewx-user
Hello HaeadwindJack,

your tip was the solution! Now the upload works again.
Thank you very much.
Reply all
Reply to author
Forward
0 new messages