FTP problem

76 views
Skip to first unread message

Guido Groetie

unread,
Sep 27, 2024, 10:12:55 AM9/27/24
to weewx-user
Hello, I hope it is because of a WIFI connection that is very slow, but when Weewx is FTP the files to the webserver, I see this errors:
Sep 27 15:46:20 byows-jim weewxd[3001]: ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/year-2024.html to server 192.168.1.74. Reason:>
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine: ftpgenerator: (0): caught exception '<class 'TimeoutError'>': timed out
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 519, in run
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      n = ftp_data.run()
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****          ^^^^^^^^^^^^^^
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 208, in run
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 503, in storbinary
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      conn.sendall(buf)
Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****  TimeoutError: timed out
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weeutil.ftpupload: Failed uploading /var/www/html/weewx/year.html to server 192.168.1.74. Reason: 'tim>
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine: ftpgenerator: (1): caught exception '<class 'TimeoutError'>': timed out
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 519, in run
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      n = ftp_data.run()
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****          ^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 208, in run
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      ftp_server.storbinary(stor_cmd, fd)
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 509, in storbinary
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      return self.voidresp()
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 259, in voidresp
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      resp = self.getresp()
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 244, in getresp
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      resp = self.getmultiline()
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 230, in getmultiline
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      line = self.getline()
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/ftplib.py", line 212, in getline
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      line = self.file.readline(self.maxline + 1)
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.11/socket.py", line 706, in readinto
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****      return self._sock.recv_into(b)
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^
Sep 27 15:47:27 byows-jim weewxd[3001]: ERROR weewx.reportengine:         ****  TimeoutError: timed out
Sep 27 15:48:19 byows-jim weewxd[3001]: INFO weewx.reportengine: ftpgenerator: Ftp'd 11 files in 171.46 seconds

What can I do to prevent it?

Graham Eddy

unread,
Sep 27, 2024, 11:59:01 AM9/27/24
to WeeWX User
make sure weewx ftp client is set to PASSIVE mode if the ftp server is expecting that
⊣GE⊢

DTC Tijdwaarneming

unread,
Sep 29, 2024, 2:10:48 AM9/29/24
to weewx-user
It was already set to Passive mode.
passive = 1

Dominic Reich

unread,
Sep 29, 2024, 3:00:07 AM9/29/24
to weewx...@googlegroups.com
Guido Groetie <g.g...@gmail.com> wrote:

>Hello, I hope it is because of a WIFI connection that is very slow, but when
>Weewx is FTP the files to the webserver, I see this errors:
>Sep 27 15:46:20 byows-jim weewxd[3001]: ERROR weeutil.ftpupload: Failed
>uploading /var/www/html/weewx/year-2024.html to server 192.168.1.74. Reason:>
>Sep 27 15:46:34 byows-jim weewxd[3001]: ERROR weewx.reportengine: ftpgenerator:
>(0): caught exception '<class 'TimeoutError'>': timed out
>
> snip snip....

>What can I do to prevent it?

On the same host WeeWX is running, can you reach the FTP server with
another program? Can you ping the FTP servers IP address, can you
resolve the FTP servers DNS name (no idea what you have set in your
configuration, so try both).

-dominic

--
Whenever you find yourself on the side of the majority,
it is time to reform (or pause and reflect).
- Mark Twain

Graham Eddy

unread,
Sep 29, 2024, 4:21:25 AM9/29/24
to WeeWX User
and what is the ftp server expecting?
⊣GE⊢
Reply all
Reply to author
Forward
0 new messages