Software > WeeWX

Subir por FTP a Hosting

(1/4) > >>

miguelru:
Buenos días:

No consigo que Weewx suba con FTP a nuevo hosting, a otro anterior subía sin problemas y con Filezilla también funciona. He releido un post anterior de "Samal" de abril de 2021 pero no hay manera.

Adjunto log de weewx:

Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine: ftpgenerator: (0): caught exception '<class 'socket.gaierror'>': [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 331, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeutil/ftpupload.py", line 133, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      ftp_server.connect(self.server, self.port)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", line 152, in connect
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      source_address=self.source_address)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 707, in create_connection
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  socket.gaierror: [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine: ftpgenerator: (1): caught exception '<class 'socket.gaierror'>': [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 331, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeutil/ftpupload.py", line 133, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      ftp_server.connect(self.server, self.port)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", line 152, in connect
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      source_address=self.source_address)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 707, in create_connection
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  socket.gaierror: [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine: ftpgenerator: (2): caught exception '<class 'socket.gaierror'>': [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 331, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weeutil/ftpupload.py", line 133, in run
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      ftp_server.connect(self.server, self.port)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", line 152, in connect
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      source_address=self.source_address)
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 707, in create_connection
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine:         ****  socket.gaierror: [Errno -2] Nombre o servicio desconocido
Aug 18 07:25:39 raspberrypi weewx[16158] ERROR weewx.reportengine: ftpgenerator: Upload failed

jmviper:
socket.gaierror es error en el nombre del servidor FTP.

No sé si será por algún espacio en blanco al haber copiado/pegado al weewx.conf o porque realmente el nombre del FTP no es accesible.

En la raspi prueba en el terminal con ping -c4 nombredelservidorFTP poniendo el nombre del servidor. Si hace ping el problema será en el nombre puesto en el weewx.conf

Ponlo manualmente sin copiar/pegar.

jantoni:
Si anteriormente funcionaba y con nuevo hosting no funciona, no es un problema de weewx, es un problema de identificación con el nuevo hosting.

de Todos modos, si no ponéis los datos que tenéis en el fichero de configuración, en la sección de FTP ¿como queréis que ayudemos?. Por supuesto quitando las contraseñas, claro.

miguelru:
Hola.

Las contraseñas no me preocupa, se vuelven a cambiar y listo, pero sí hay que tenerlo en cuenta.

Con respecto al nombre de servidor no funciona ni con weewx ni con filezilla será algo temporal creo. Pero he configurado con la IP del servidor y así Filezilla funciona bien pero Weewx no.

Adjunto configuración de Weewx:

 [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 = maruiz.es        # password = Ftp meteogodella        # server = ftp.onstatic-es.setupdns.net        # path = /public/meteogodella        # [ftp]ftp://miguelar.es
        server = ftp://45.84.205.181
        user = XXX
        password = xxxxxxxxx
        path = /meteogodella    # 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 = /home/weewx/public_html
                # Most FTP servers use port 21
        port = 21

        # Set to 1 to use passive mode, zero for active mode
        passive = 1


jmviper:
server = 45.84.205.181

sin el ftp:// delante. No hay que ponerlo. Eso es el protocolo (al igual que http:// es para las páginas web) y no hay que ponerlo o te da el error.

Si lo hacías con el nombre también te pasaría lo mismo.



Navegación

[0] Índice de Mensajes

[#] Página Siguiente

Ir a la versión completa