In the absence of any logs or console transcripts we really can't help 
you...

On Wednesday, February 1, 2023 at 11:12:39 AM UTC-8 [email protected] 
wrote:

> I'm interested in this topic.
>
> I've tried and tried to get Weewx to write files to my server, firstly via 
> FTP, with no success, (Ionos helpdesk said, after a few calls that FTP had 
> been disabled on my server - it came back with an error 550 - but different 
> guys said slightly conflicting things, but all agreed that FTP wasn't 
> secure) and then using RSYNC. Again, I had no success by configuring 
> weewx.conf - the error message was concerning the public and private keys 
> (host key verification failed - rsync upload unexplained error (code 255).. 
> I was trying as root, and I can SSH into the server without a password 
> having set up the keys from the Raspberry Pi. I've done a botch to get 
> round it by running rsync as a cron job at 01 and 31 past each hour and 
> that works OK. "rsync -a /var/www/html/weewx/ 
> [email protected]:/var/www/.../weewx/". I would like to get to grips 
> with this at some stage, but I've got other stuff which is higher priority 
> now that the weather station is actually writing to the server. It's a 
> retirement project so all for my own fun/edification.
>
> On Saturday, January 14, 2023 at 2:42:39 PM UTC [email protected] 
> wrote:
>
>> As suggested, I used RSync instead of SFTP , and it works just fine :)
>>
>> On Thursday, January 12, 2023 at 10:36:16 PM UTC+1 Invisible Man wrote:
>>
>>> A user suggests to use Rsync instead, as Rsync is running through SSH 
>>> for weewx. 
>>> see http://www.weewx.com/docs/usersguide.htm#config_RSYNC
>>> "*Fast, efficient, and secure, it does an incremental update, that is, 
>>> it only synchronizes those parts of a file that have changed, saving the 
>>> outgoing bandwidth of your Internet connection. *
>>>
>>> * If you wish to use rsync, you must configure passwordless ssh using 
>>> public/private key authentication from the user account that WeeWX runs, to 
>>> the user account on the remote machine where the files will be copied.*"
>>>
>>>
>>> Indeed an option to try. I'll switch to that.
>>>
>>> On Tuesday, January 10, 2023 at 3:57:09 PM UTC+1 Invisible Man wrote:
>>>
>>>> Hello, 
>>>> I have recently enable sftp on Weewx, to upload the weewx web pages to 
>>>> a remote site.
>>>> Before that, I used ftp, and it worked no problem, but I'm have errors 
>>>> with SFTP.
>>>>
>>>> - I'm using Weewx 4.9.1
>>>> - Python 3.7.3
>>>> - I can connect by hand to the remote sftp no problem
>>>> - Not sure if I should be using passive or non passive for SFTP.
>>>>
>>>> ```
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine: ftpgenerator: (2): caught exception '<class 
>>>> 'socket.timeout'>': timed out
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****  Traceback (most recent call last):
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File 
>>>> "/usr/share/weewx/weewx/reportengine.py", line 437, in run
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      n = ftp_data.run()
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File 
>>>> "/usr/share/weewx/weeutil/ftpupload.py", line 175, in run
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      ftp_server.connect(self.server, 
>>>> self.port)
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", 
>>>> line 155, in connect
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      self.welcome = self.getresp()
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", 
>>>> line 236, in getresp
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      resp = self.getmultiline()
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", 
>>>> line 226, in getmultiline
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      nextline = self.getline()
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File "/usr/lib/python3.7/ftplib.py", 
>>>> line 204, in getline
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      line = 
>>>> self.file.readline(self.maxline + 1)
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****    File "/usr/lib/python3.7/socket.py", 
>>>> line 589, in readinto
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****      return self._sock.recv_into(b)
>>>> Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR 
>>>> weewx.reportengine:         ****  socket.timeout: timed out
>>>> ```
>>>>
>>>> this is my weewx.conf file:
>>>>
>>>> ```
>>>> [[FTP]]
>>>>         skin = Ftp
>>>>         enable = True
>>>>        
>>>>         # FTP'ing the results to a webserver is treated as just another 
>>>> report,
>>>>         # albeit one with an unusual report generator!
>>>>         #
>>>>         # If you wish to use FTP, uncomment and fill out the next four 
>>>> lines:
>>>>         user = CENSORED
>>>>         password = CENSORED
>>>>         server = CENSORED
>>>>         path = /
>>>>        
>>>>         # If you wish to upload files from something other than what 
>>>> HTML_ROOT
>>>>         # is set to above, then reset it here:
>>>>         HTML_ROOT = external_html
>>>>        
>>>>         # Most FTP servers use port 21, but if yours is different, you 
>>>> can
>>>>         # change it here
>>>>         port = 22
>>>>        
>>>>         # Set to 1 to use passive mode, zero for active mode:
>>>>         passive = 1
>>>>        
>>>>         # How many times to try to transfer a file before giving up:
>>>>         max_tries = 5
>>>>        
>>>>         # Set to True for a secure FTP (SFTP) connection. Not all 
>>>> servers
>>>>         # support this.
>>>>         secure_ftp = 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d379ff44-5223-4113-84dd-99dc9fdcf5b1n%40googlegroups.com.

Reply via email to