The symptoms are normally a "Errno 0" error, but some FTP servers have a
problem with a secure connection.
Here are two things you can try.
First, under section [[FTP]] in weewx.conf, set reuse_ssl to True.
[[FTP]]
...
# Set to True for an FTP over TLS (FTPS) connection. Not all servers
# support this.
secure_ftp = False
reuse_ssl = True
...
See if that helps. If it does not, then remove it and try a different
option, this time secure_data, set to False:
[[FTP]]
...
# Set to True for an FTP over TLS (FTPS) connection. Not all servers
# support this.
secure_ftp = False
secure_data = False
...
See if that helps. If not, we'll go to the next level.
-tk
On Sat, Jan 7, 2023 at 1:45 PM Gorka Aurre <[email protected]> wrote:
> Dear community,
>
> This is my first post in this group, so forgive me if I miss some pieces
> in the information, I'll do my best. I managed all the road by myself to be
> able to get the data from sensors, drive it to weewx input and upload it to
> Wunderground (still don't know how -I am beginner in this- but I did it).
> But, this post is because I'm having problems to upload weewx data to an
> online server via ftp (the standard ftp service weewx has by default).
>
> I've tried connecting directly with Filezilla to the cPanel to see if
> connection problems were originated in the cPanel and it worked OK. Even I
> tried to connect manually with ftp client from Shell directly from the RPi
> and worked fine. But when it comes to weewx working on it, it gives me
> "socket.timeout: timeout" error. Let me copy error log obtained (due to
> security reasons I have changed addresses by -MYSERVER.COM-):
>
> Jan 7 22:36:10 raspberrypi weewx[10348] DEBUG weeutil.ftpupload:
> Attempting secure connection to ftp.MYSERVER.COM
> Jan 7 22:36:10 raspberrypi weewx[10348] DEBUG weeutil.ftpupload: Secure
> data connection to ftp.MYSERVER.COM
> Jan 7 22:36:10 raspberrypi weewx[10348] DEBUG weeutil.ftpupload: 0
> ./daytempfeel.png
> efffd6c4f0395079d7355d145f1f8908a591f54ac06b9d2d1c42bd3ba263bbb6
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> ftpgenerator: (2): caught exception '<class 'socket.timeout'>': timed out
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** Traceback (most recent call last):
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/share/weewx/weewx/reportengine.py", line 437, in run
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** n = ftp_data.run()
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/share/weewx/weeutil/ftpupload.py", line 175, in run
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** ftp_server.connect(self.server, self.port)
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/lib/python3.9/ftplib.py", line 160, in connect
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** self.welcome = self.getresp()
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/lib/python3.9/ftplib.py", line 242, in getresp
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** resp = self.getmultiline()
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/lib/python3.9/ftplib.py", line 232, in getmultiline
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** nextline = self.getline()
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/lib/python3.9/ftplib.py", line 210, in getline
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** line = self.file.readline(self.maxline + 1)
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** File "/usr/lib/python3.9/socket.py", line 704, in readinto
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** return self._sock.recv_into(b)
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> **** socket.timeout: timed out
> Jan 7 22:36:26 raspberrypi weewx[6258] ERROR weewx.reportengine:
> ftpgenerator: Upload failed
>
> Weewx version I am using is 4.9.1, recently installed. All other services
> work OK, writing in database, reporting to Wunderground, creating html
> reports, etc, but I want to let it upload this html reports to my server.
>
> Hope you guys could help with this issue, it would be very appreciated.
>
> Thanks in advance!
>
> Gorka
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/6b66d067-7a71-4d35-9954-a591a8bb616bn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/6b66d067-7a71-4d35-9954-a591a8bb616bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAzqYHsLda0PCzS8imcuYtxXuTfZYTJs4jSdgc0oq%3D48w%40mail.gmail.com.