[weewx-user] Re: rsync: host key verification failed - problem

2024-06-02 Thread vince
Agree.  My error there.  I keep forgetting the weewx accounts $HOME for 
packaged installs is in an odd location.  Thanks !

On Sunday, June 2, 2024 at 6:07:15 AM UTC-7 PBudmark wrote:

> As correctly stated in 
> https://groups.google.com/g/weewx-user/c/50VCTyL-Tpw/m/DgScCzIDAQAJ, the 
> home directory for weewx is  /var/lib/weewx and not /home/weewx, so .ssh 
> need to go into  /var/lib/weewx/.ssh
>
> On Sunday, June 2, 2024 at 4:32:07 AM UTC+1 Ben W. wrote:
>
> Thanks, Vince! 
> I'm pretty sure I saw that link in my results, but the Ubuntu reference 
> resulted in my continue scrolling. I will try your suggestion when I get 
> back home!
>
> On Saturday, June 1, 2024 at 7:59:44 PM UTC-5 vince wrote:
>
> If you google your exact error "*Host key verification failed."* and it 
> will return what's going on
>
>
> https://askubuntu.com/questions/45679/ssh-connection-problem-with-host-key-verification-failed-error
>
> The weewx-related answer is that you're using old notes that are still 
> expecting the 'root' user on the weewx system to be the local user, which 
> is no longer accurate.  In v5 it is the 'weewx' user (upgrade guide link) 
> . 
>  So it is very likely the host key of the remote computer is not known in 
> the /home/weewx/.ssh/known_hosts file.  Simplest way around this would be 
> do append whatever is in your legacy /root/.ssh/known_hosts file to your 
> /home/weewx/.ssh/known_hosts file.
>
> On Saturday, June 1, 2024 at 5:34:36 PM UTC-7 Ben W. wrote:
>
> Greetings!
> ::
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/dcca7519-482d-46f4-ad21-dc1001cbaa7fn%40googlegroups.com.


[weewx-user] Re: rsync: host key verification failed - problem

2024-06-02 Thread PBudmark
As correctly stated 
in https://groups.google.com/g/weewx-user/c/50VCTyL-Tpw/m/DgScCzIDAQAJ, the 
home directory for weewx is  /var/lib/weewx and not /home/weewx, so .ssh 
need to go into  /var/lib/weewx/.ssh

On Sunday, June 2, 2024 at 4:32:07 AM UTC+1 Ben W. wrote:

Thanks, Vince! 
I'm pretty sure I saw that link in my results, but the Ubuntu reference 
resulted in my continue scrolling. I will try your suggestion when I get 
back home!

On Saturday, June 1, 2024 at 7:59:44 PM UTC-5 vince wrote:

If you google your exact error "*Host key verification failed."* and it 
will return what's going on

https://askubuntu.com/questions/45679/ssh-connection-problem-with-host-key-verification-failed-error

The weewx-related answer is that you're using old notes that are still 
expecting the 'root' user on the weewx system to be the local user, which 
is no longer accurate.  In v5 it is the 'weewx' user (upgrade guide link) 
.  So 
it is very likely the host key of the remote computer is not known in the 
/home/weewx/.ssh/known_hosts file.  Simplest way around this would be do 
append whatever is in your legacy /root/.ssh/known_hosts file to your 
/home/weewx/.ssh/known_hosts file.

On Saturday, June 1, 2024 at 5:34:36 PM UTC-7 Ben W. wrote:

Greetings!
::


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/5215518e-5d92-40fa-b0ba-c3f8f1bce60an%40googlegroups.com.


[weewx-user] Re: rsync: host key verification failed - problem

2024-06-01 Thread Ben W.
Thanks, Vince! 
I'm pretty sure I saw that link in my results, but the Ubuntu reference 
resulted in my continue scrolling. I will try your suggestion when I get 
back home!

On Saturday, June 1, 2024 at 7:59:44 PM UTC-5 vince wrote:

> If you google your exact error "*Host key verification failed."* and it 
> will return what's going on
>
>
> https://askubuntu.com/questions/45679/ssh-connection-problem-with-host-key-verification-failed-error
>
> The weewx-related answer is that you're using old notes that are still 
> expecting the 'root' user on the weewx system to be the local user, which 
> is no longer accurate.  In v5 it is the 'weewx' user (upgrade guide link) 
> . 
>  So it is very likely the host key of the remote computer is not known in 
> the /home/weewx/.ssh/known_hosts file.  Simplest way around this would be 
> do append whatever is in your legacy /root/.ssh/known_hosts file to your 
> /home/weewx/.ssh/known_hosts file.
>
> On Saturday, June 1, 2024 at 5:34:36 PM UTC-7 Ben W. wrote:
>
>> Greetings!
>> Thank you for logging these steps last year:
>>
>> 1. I logged as root ('sudo -i' from 'pi' account)
>> 2. generated SSH keys ('ssh-keygen')
>> 3. copied them to external server ('ssh-copy-id 
>> ace...@external.domain.com  -p 222')
>> 4. copied /home/pi/.ssh/config to /root/.ssh/config
>> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
>> 6. waited for next synchronization
>> 7. smiled because everything worked as expected :)
>>
>> I'm stuck between 6 and 7 and unsure what I'm doing wrong. My logs are 
>> below. I've copied the public key from the 'root' user and verified on my 
>> paid web hosting site that they have the same key even with 'root'. I can 
>> SSH in, but the host is still asking for a password - only if I enter the 
>> password am I able to authenticate. It's as-if either side isn't seeing the 
>> key. I'm assuming that's my problem with rsync. The logs:
>>
>> ___
>>
>> Jun 01 19:18:18 rpi systemd[1]: Started weewx.service - WeeWX.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Initializing weewxd 
>> version 5.0.2
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Command line: 
>> /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Using Python 3.11.2 
>> (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Located at 
>> /usr/bin/python3
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Platform 
>> Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Locale: 'en_GB.UTF-8'
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Entry path: 
>> /usr/share/weewx/weewxd.py
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: WEEWX_ROOT: /etc/weewx
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Configuration file: 
>> /etc/weewx/weewx.conf
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: User module: 
>> /etc/weewx/bin/user
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station 
>> type GW1000 (user.gw1000)
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
>> version is 0.6.1
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
>> is 192.168.7.206:45000
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
>> is 20 seconds
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
>> version is 0.6.1
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
>> is 192.168.7.206:45000
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
>> is 20 seconds
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
>> unit is 0x1
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.wxservices: StdWXCalculate 
>> will use data binding wx_binding
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Archive will use 
>> data binding wx_binding
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Record generation 
>> will be attempted in 'software'
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Using archive 
>> interval of 300 seconds (software record generation)
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: StationRegistry: 
>> Station will be registered.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: Wunderground: 
>> Posting not enabled.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: PWSWeather: Data 
>> for station PROOF0FHUMBOLDT will be posted
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: CWOP: Posting not 
>> enabled.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: WOW: Posting not 
>> enabled.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: AWEKAS: Posting not 
>> enabled.
>> Jun 01 

[weewx-user] Re: rsync: host key verification failed - problem

2024-06-01 Thread Ben W.
Hi Gary,

Thank you for this information. To be frank, I'm unsure how I did that, but 
I'll research how to resolve it. I have my weather station plus indoor 
sensors all feeding through the Ecowitt GW hub. My intent was to have WeeWX 
capture everything from the GW hub data.

Thank you!

On Saturday, June 1, 2024 at 8:44:39 PM UTC-5 gjr80 wrote:

> Nothing to do with your rsync issue, but I notice in your log extract that 
> you are running the Ecowitt gateway driver as both a driver and service in 
> the same WeeWX instance against the same Ecowitt gateway device:
>
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station 
> type GW1000 (user.gw1000)
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
> unit is 0x1
>
> I am hard pressed to think of a use case needing this configuration, it 
> was certainly not something I ever planned for when writing the driver. The 
> recommended use of the Ecowitt gateway driver in a given WeeWX instance is 
> to run it as a driver unless you have multiple gateway devices or another 
> device type that must be run with its own driver. Running as both a driver 
> and service against the same device on the same WeeWX instance will impact 
> performance (the gateway device is polled twice as often and the entire 
> sensor data and metadata is decoded twice irrespective of and field 
> filtering that may be applied).
>
> At best you are just increasing the system (and WeeWX) load, at worst you 
> are increasing the system load and may experience unknown 2nd order effects 
> on the data emitted by WeeWX.
>
> I would suggest dropping back to running the Ecowitt gateway driver as a 
> driver only.
>
> Gary
> On Sunday 2 June 2024 at 10:34:36 UTC+10 Ben W. wrote:
>
>> Greetings!
>> Thank you for logging these steps last year:
>>
>> 1. I logged as root ('sudo -i' from 'pi' account)
>> 2. generated SSH keys ('ssh-keygen')
>> 3. copied them to external server ('ssh-copy-id 
>> ace...@external.domain.com  -p 222')
>> 4. copied /home/pi/.ssh/config to /root/.ssh/config
>> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
>> 6. waited for next synchronization
>> 7. smiled because everything worked as expected :)
>>
>> I'm stuck between 6 and 7 and unsure what I'm doing wrong. My logs are 
>> below. I've copied the public key from the 'root' user and verified on my 
>> paid web hosting site that they have the same key even with 'root'. I can 
>> SSH in, but the host is still asking for a password - only if I enter the 
>> password am I able to authenticate. It's as-if either side isn't seeing the 
>> key. I'm assuming that's my problem with rsync. The logs:
>>
>> ___
>>
>> Jun 01 19:18:18 rpi systemd[1]: Started weewx.service - WeeWX.
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Initializing weewxd 
>> version 5.0.2
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Command line: 
>> /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Using Python 3.11.2 
>> (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Located at 
>> /usr/bin/python3
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Platform 
>> Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Locale: 'en_GB.UTF-8'
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Entry path: 
>> /usr/share/weewx/weewxd.py
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: WEEWX_ROOT: /etc/weewx
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Configuration file: 
>> /etc/weewx/weewx.conf
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: User module: 
>> /etc/weewx/bin/user
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station 
>> type GW1000 (user.gw1000)
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
>> version is 0.6.1
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
>> is 192.168.7.206:45000
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
>> is 20 seconds
>> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
>> version is 0.6.1
>> Jun 01 19:18:18 rpi weewxd[200894]: 

[weewx-user] Re: rsync: host key verification failed - problem

2024-06-01 Thread gjr80
Nothing to do with your rsync issue, but I notice in your log extract that 
you are running the Ecowitt gateway driver as both a driver and service in 
the same WeeWX instance against the same Ecowitt gateway device:

Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station type 
GW1000 (user.gw1000)
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
version is 0.6.1
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
is 192.168.7.206:45000
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval is 
20 seconds
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
version is 0.6.1
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
is 192.168.7.206:45000
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval is 
20 seconds
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
unit is 0x1

I am hard pressed to think of a use case needing this configuration, it was 
certainly not something I ever planned for when writing the driver. The 
recommended use of the Ecowitt gateway driver in a given WeeWX instance is 
to run it as a driver unless you have multiple gateway devices or another 
device type that must be run with its own driver. Running as both a driver 
and service against the same device on the same WeeWX instance will impact 
performance (the gateway device is polled twice as often and the entire 
sensor data and metadata is decoded twice irrespective of and field 
filtering that may be applied).

At best you are just increasing the system (and WeeWX) load, at worst you 
are increasing the system load and may experience unknown 2nd order effects 
on the data emitted by WeeWX.

I would suggest dropping back to running the Ecowitt gateway driver as a 
driver only.

Gary
On Sunday 2 June 2024 at 10:34:36 UTC+10 Ben W. wrote:

> Greetings!
> Thank you for logging these steps last year:
>
> 1. I logged as root ('sudo -i' from 'pi' account)
> 2. generated SSH keys ('ssh-keygen')
> 3. copied them to external server ('ssh-copy-id ace...@external.domain.com 
>  -p 222')
> 4. copied /home/pi/.ssh/config to /root/.ssh/config
> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
> 6. waited for next synchronization
> 7. smiled because everything worked as expected :)
>
> I'm stuck between 6 and 7 and unsure what I'm doing wrong. My logs are 
> below. I've copied the public key from the 'root' user and verified on my 
> paid web hosting site that they have the same key even with 'root'. I can 
> SSH in, but the host is still asking for a password - only if I enter the 
> password am I able to authenticate. It's as-if either side isn't seeing the 
> key. I'm assuming that's my problem with rsync. The logs:
>
> ___
>
> Jun 01 19:18:18 rpi systemd[1]: Started weewx.service - WeeWX.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Initializing weewxd 
> version 5.0.2
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Command line: 
> /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Using Python 3.11.2 
> (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Located at 
> /usr/bin/python3
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Platform 
> Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Locale: 'en_GB.UTF-8'
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Entry path: 
> /usr/share/weewx/weewxd.py
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: WEEWX_ROOT: /etc/weewx
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Configuration file: 
> /etc/weewx/weewx.conf
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: User module: 
> /etc/weewx/bin/user
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station 
> type GW1000 (user.gw1000)
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
> unit is 0x1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.wxservices: StdWXCalculate 
> will use data binding wx_binding
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Archive will use 
> data binding wx_binding
> Jun 01 19:18:18 rpi 

[weewx-user] Re: rsync: host key verification failed - problem

2024-06-01 Thread vince
If you google your exact error "*Host key verification failed."* and it 
will return what's going on

https://askubuntu.com/questions/45679/ssh-connection-problem-with-host-key-verification-failed-error

The weewx-related answer is that you're using old notes that are still 
expecting the 'root' user on the weewx system to be the local user, which 
is no longer accurate.  In v5 it is the 'weewx' user (upgrade guide link) 
.  So 
it is very likely the host key of the remote computer is not known in the 
/home/weewx/.ssh/known_hosts file.  Simplest way around this would be do 
append whatever is in your legacy /root/.ssh/known_hosts file to your 
/home/weewx/.ssh/known_hosts file.

On Saturday, June 1, 2024 at 5:34:36 PM UTC-7 Ben W. wrote:

> Greetings!
> Thank you for logging these steps last year:
>
> 1. I logged as root ('sudo -i' from 'pi' account)
> 2. generated SSH keys ('ssh-keygen')
> 3. copied them to external server ('ssh-copy-id ace...@external.domain.com 
>  -p 222')
> 4. copied /home/pi/.ssh/config to /root/.ssh/config
> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
> 6. waited for next synchronization
> 7. smiled because everything worked as expected :)
>
> I'm stuck between 6 and 7 and unsure what I'm doing wrong. My logs are 
> below. I've copied the public key from the 'root' user and verified on my 
> paid web hosting site that they have the same key even with 'root'. I can 
> SSH in, but the host is still asking for a password - only if I enter the 
> password am I able to authenticate. It's as-if either side isn't seeing the 
> key. I'm assuming that's my problem with rsync. The logs:
>
> ___
>
> Jun 01 19:18:18 rpi systemd[1]: Started weewx.service - WeeWX.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Initializing weewxd 
> version 5.0.2
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Command line: 
> /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Using Python 3.11.2 
> (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Located at 
> /usr/bin/python3
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Platform 
> Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Locale: 'en_GB.UTF-8'
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Entry path: 
> /usr/share/weewx/weewxd.py
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: WEEWX_ROOT: /etc/weewx
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Configuration file: 
> /etc/weewx/weewx.conf
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: User module: 
> /etc/weewx/bin/user
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station 
> type GW1000 (user.gw1000)
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
> version is 0.6.1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
> is 192.168.7.206:45000
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval 
> is 20 seconds
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
> unit is 0x1
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.wxservices: StdWXCalculate 
> will use data binding wx_binding
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Archive will use 
> data binding wx_binding
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Record generation 
> will be attempted in 'software'
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Using archive 
> interval of 300 seconds (software record generation)
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: StationRegistry: 
> Station will be registered.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: Wunderground: 
> Posting not enabled.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: PWSWeather: Data for 
> station PROOF0FHUMBOLDT will be posted
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: CWOP: Posting not 
> enabled.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: WOW: Posting not 
> enabled.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: AWEKAS: Posting not 
> enabled.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO user.mqtt: service version is 0.24
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: MQTT: No config 
> info. Skipped.
> Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: 'pyephem' detected, 
> extended almanac data is available
> Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Starting up weewx 
> 

[weewx-user] Re: rsync: host key verification failed - problem

2024-06-01 Thread Ben W.
Greetings!
Thank you for logging these steps last year:

1. I logged as root ('sudo -i' from 'pi' account)
2. generated SSH keys ('ssh-keygen')
3. copied them to external server ('ssh-copy-id ace...@external.domain.com 
 -p 222')
4. copied /home/pi/.ssh/config to /root/.ssh/config
5. changed owner of 'config' ('chown root:root /root/.ssh/config')
6. waited for next synchronization
7. smiled because everything worked as expected :)

I'm stuck between 6 and 7 and unsure what I'm doing wrong. My logs are 
below. I've copied the public key from the 'root' user and verified on my 
paid web hosting site that they have the same key even with 'root'. I can 
SSH in, but the host is still asking for a password - only if I enter the 
password am I able to authenticate. It's as-if either side isn't seeing the 
key. I'm assuming that's my problem with rsync. The logs:

___

Jun 01 19:18:18 rpi systemd[1]: Started weewx.service - WeeWX.
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Initializing weewxd 
version 5.0.2
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Command line: 
/usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Using Python 3.11.2 
(main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Located at 
/usr/bin/python3
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Platform 
Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Locale: 'en_GB.UTF-8'
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Entry path: 
/usr/share/weewx/weewxd.py
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: WEEWX_ROOT: /etc/weewx
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Configuration file: 
/etc/weewx/weewx.conf
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: User module: 
/etc/weewx/bin/user
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Debug: 0
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Loading station type 
GW1000 (user.gw1000)
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayDriver: 
version is 0.6.1
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
is 192.168.7.206:45000
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval is 
20 seconds
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: GatewayService: 
version is 0.6.1
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  device address 
is 192.168.7.206:45000
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000:  poll interval is 
20 seconds
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: StdConvert target 
unit is 0x1
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.wxservices: StdWXCalculate 
will use data binding wx_binding
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Archive will use 
data binding wx_binding
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Record generation 
will be attempted in 'software'
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Using archive 
interval of 300 seconds (software record generation)
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: StationRegistry: 
Station will be registered.
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: Wunderground: Posting 
not enabled.
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: PWSWeather: Data for 
station PROOF0FHUMBOLDT will be posted
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: CWOP: Posting not 
enabled.
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: WOW: Posting not 
enabled.
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: AWEKAS: Posting not 
enabled.
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.mqtt: service version is 0.24
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.restx: MQTT: No config info. 
Skipped.
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: 'pyephem' detected, 
extended almanac data is available
Jun 01 19:18:18 rpi weewxd[200894]: INFO __main__: Starting up weewx 
version 5.0.2
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx.sdb'
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.manager: Starting backfill 
of daily summaries
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.manager: Daily summaries up 
to date
Jun 01 19:18:18 rpi weewxd[200894]: INFO weewx.engine: Starting main packet 
loop.
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: Using 't_rainyear' 
for rain total
Jun 01 19:18:18 rpi weewxd[200894]: INFO user.gw1000: skipping rain 
measurement of 282.6: no last rain
Jun 01 19:18:19 rpi weewxd[200894]: INFO user.gw1000: Using 't_rainyear' 
for rain total
Jun 01 19:18:19 rpi weewxd[200894]: INFO user.gw1000: skipping rain 
measurement of 282.6: no last rain
Jun 01 19:20:19 rpi weewxd[200894]: INFO weewx.manager: Added record 
2024-06-01 19:20:00 CDT (1717287600) to database 'weewx.sdb'
Jun 01 19:20:19 rpi weewxd[200894]: INFO weewx.manager: Added record 
2024-06-01 

[weewx-user] Re: rsync does not work after upgrade to v5

2024-03-01 Thread Mario Wesolek
remember the permissions of files on the remote machine!

Mario Wesolek schrieb am Freitag, 1. März 2024 um 10:59:16 UTC+1:

> problem here: since weewx 5 the deamon runs no more as root. The new user 
> "weewx" hat his homedir under "/var/lib/weewx/" so i create the ssh config 
> there. this is a workaround, but it works...  
> teq...@gmail.com schrieb am Freitag, 1. März 2024 um 10:36:32 UTC+1:
>
>> Hello,
>> first I messed up with the normal upgrade from 4 to 5 via apt upgrade. 
>> After that I created a complete new installation but keep my weewx.conf 
>> file.
>>
>> So,  weewx 5 works now and generated all information. Unfortunately the 
>> rsync "skin" does not do anything. If I execute the rsync command manually 
>> it works fine.
>>
>> After that I enabled the debug mode and saw that the command seems to be 
>> executed, but without any output.
>>
>> 2024-03-01T10:30:35.062186+01:00 weewx weewxd[392]: DEBUG 
>> weewx.reportengine: Running report 'RSYNC'
>> 2024-03-01T10:30:35.062694+01:00 weewx weewxd[392]: DEBUG 
>> weewx.reportengine: Found configuration file 
>> /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
>> 2024-03-01T10:30:35.065311+01:00 weewx weewxd[392]: DEBUG 
>> weewx.reportengine: Running generators for report 'RSYNC' in directory 
>> '/etc/weewx/skins/Rsync'
>> 2024-03-01T10:30:35.065483+01:00 weewx weewxd[392]: DEBUG 
>> weeutil.rsyncupload: rsyncupload: cmd: [['rsync', '--archive', '--stats', 
>> '-e', 'ssh', '/var/www/html/weewx/', 
>> 'us...@vps01.example.com:/home/user/webseiten/website/html']]
>>
>> Because of the working weewx.conf in version 4 I don't see any issues. I 
>> read many comments about host key verification, but I don't have this issue 
>> here. So maybe someone could help.
>>
>> Thanks.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/200d498b-373a-43ab-898f-7a031286b317n%40googlegroups.com.


[weewx-user] Re: rsync does not work after upgrade to v5

2024-03-01 Thread Mario Wesolek
problem here: since weewx 5 the deamon runs no more as root. The new user 
"weewx" hat his homedir under "/var/lib/weewx/" so i create the ssh config 
there. this is a workaround, but it works...  
teq...@gmail.com schrieb am Freitag, 1. März 2024 um 10:36:32 UTC+1:

> Hello,
> first I messed up with the normal upgrade from 4 to 5 via apt upgrade. 
> After that I created a complete new installation but keep my weewx.conf 
> file.
>
> So,  weewx 5 works now and generated all information. Unfortunately the 
> rsync "skin" does not do anything. If I execute the rsync command manually 
> it works fine.
>
> After that I enabled the debug mode and saw that the command seems to be 
> executed, but without any output.
>
> 2024-03-01T10:30:35.062186+01:00 weewx weewxd[392]: DEBUG 
> weewx.reportengine: Running report 'RSYNC'
> 2024-03-01T10:30:35.062694+01:00 weewx weewxd[392]: DEBUG 
> weewx.reportengine: Found configuration file 
> /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
> 2024-03-01T10:30:35.065311+01:00 weewx weewxd[392]: DEBUG 
> weewx.reportengine: Running generators for report 'RSYNC' in directory 
> '/etc/weewx/skins/Rsync'
> 2024-03-01T10:30:35.065483+01:00 weewx weewxd[392]: DEBUG 
> weeutil.rsyncupload: rsyncupload: cmd: [['rsync', '--archive', '--stats', 
> '-e', 'ssh', '/var/www/html/weewx/', 
> 'us...@vps01.example.com:/home/user/webseiten/website/html']]
>
> Because of the working weewx.conf in version 4 I don't see any issues. I 
> read many comments about host key verification, but I don't have this issue 
> here. So maybe someone could help.
>
> Thanks.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/2602729b-e3a1-40ed-8506-ce298d3b276en%40googlegroups.com.


Re: [weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread Mario Wesolek
some problem.. weewx homedir is /var/lib/weewx ... copy the hostkey and 
config file to /var/lib/weewx/.ssh and chown it to weewx:weewx

Kalju schrieb am Donnerstag, 8. Februar 2024 um 11:22:46 UTC+1:

> Hi Dominic!
>
> Thanks for the tip. Indeed, the user was changed from *root* to *weewx*
> That solved the issue
> Thanks!
>
> On Thursday, February 8, 2024 at 11:49:48 AM UTC+2 Dominic Reich wrote:
>
>> Kalju  wrote: 
>>
>> >Hi all, 
>> > 
>> >Facing same issue with ERROR weeutil.rsyncupload:  Host key 
>> verification 
>> >failed error.  
>> >However, it's really strange... 
>> >I can ssh to remote site as both root as well as pi user 
>> >I can do manual rsync with no problems but weewx builtin rsync returns 
>> above 
>> >error 
>> >At the moment my weewx installation is syncing using cron with no 
>> problems but 
>> >I want to understand why builtin rsync fails 
>> >Problem started after upgrade from weewx 5.0.0 to 5.0.1 
>> > 
>> >Any ideas? 
>>
>> Adding the debug info should output the actual rsync command initiated by 
>> weewx to the logs. That's what I assume when looking at line 104 in 
>> `src/weeutil/rsyncupload.py` from the sources of 5.0.1. 
>>
>> Maybe that gives a clue in which the actual rsync commands differ and 
>> why it might fail within Weewx. 
>>
>> Somewhere around 5.0.1 or 5.1.x the user got switched to weewx (not root 
>> anymore) so maybe there is a problem? (I can't remember when the switch 
>> was (it was mentioned on the list somwhere) and haven't found it in the 
>> docs yet) 
>>
>> I'd always suggest looking as what weewx is running so you may not have 
>> to play the guessing game on which user to look at. 
>>
>> sudo ps ux | grep weewxd 
>>
>> should return the user that actually runs the (python) daemon like on my 
>> old Raspberry this runs still as root with 4.10.2. 
>>
>> root 690 2.8 1.5 647360 60428 ? Sl Feb06 75:38 python3 
>> /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid 
>> /etc/weewx/weewx.conf 
>>
>> As it was a package-installation I never messed with it, though I 
>> welcome the change to a non-root package installation per default :) 
>>
>> In case host keys have changed on the server a deletion of the 
>> known_hosts 
>> file within ~/.ssh could also help, probably. 
>>
>> -dominic 
>>
>> >Thank you forward :-) 
>> >On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote: 
>> > 
>> > Thank you for replies. 
>> > 
>> > @Warren Gill: yes, I was thinking about crontab but wanted to use 
>> built-in 
>> > solution. Of course crontab is good as backup solution. 
>> > 
>> > @vince: you're right, I didn't think about it from this side. Just for 
>> > record for future seekers: 
>> > 
>> > 1. I logged as root ('sudo -i' from 'pi' account) 
>> > 2. generated SSH keys ('ssh-keygen') 
>> > 3. copied them to external server ('ssh-copy-id 
>> ace...@external.domain.com 
>> > -p 222') 
>> > 4. copied /home/pi/.ssh/config to /root/.ssh/config 
>> > 5. changed owner of 'config' ('chown root:root /root/.ssh/config') 
>> > 6. waited for next synchronization 
>> > 7. smiled because everything worked as expected :) 
>> > 
>>
>> -- 
>> Educating the mind without educating the heart is no education at all. 
>> - Aristotle 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/619884db-8d65-4b83-a462-f46a923f7776n%40googlegroups.com.


Re: [weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread Kalju
Hi Dominic!

Thanks for the tip. Indeed, the user was changed from *root* to *weewx*
That solved the issue
Thanks!

On Thursday, February 8, 2024 at 11:49:48 AM UTC+2 Dominic Reich wrote:

> Kalju  wrote:
>
> >Hi all,
> >
> >Facing same issue with ERROR weeutil.rsyncupload:  Host key 
> verification
> >failed error. 
> >However, it's really strange...
> >I can ssh to remote site as both root as well as pi user
> >I can do manual rsync with no problems but weewx builtin rsync returns 
> above
> >error
> >At the moment my weewx installation is syncing using cron with no 
> problems but
> >I want to understand why builtin rsync fails
> >Problem started after upgrade from weewx 5.0.0 to 5.0.1
> >
> >Any ideas?
>
> Adding the debug info should output the actual rsync command initiated by
> weewx to the logs. That's what I assume when looking at line 104 in
> `src/weeutil/rsyncupload.py` from the sources of 5.0.1.
>
> Maybe that gives a clue in which the actual rsync commands differ and
> why it might fail within Weewx.
>
> Somewhere around 5.0.1 or 5.1.x the user got switched to weewx (not root
> anymore) so maybe there is a problem? (I can't remember when the switch
> was (it was mentioned on the list somwhere) and haven't found it in the
> docs yet)
>
> I'd always suggest looking as what weewx is running so you may not have
> to play the guessing game on which user to look at.
>
> sudo ps ux | grep weewxd
>
> should return the user that actually runs the (python) daemon like on my
> old Raspberry this runs still as root with 4.10.2.
>
> root 690 2.8 1.5 647360 60428 ? Sl Feb06 75:38 python3 
> /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid 
> /etc/weewx/weewx.conf
>
> As it was a package-installation I never messed with it, though I
> welcome the change to a non-root package installation per default :)
>
> In case host keys have changed on the server a deletion of the known_hosts
> file within ~/.ssh could also help, probably.
>
> -dominic
>
> >Thank you forward :-)
> >On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote:
> >
> > Thank you for replies.
> >
> > @Warren Gill: yes, I was thinking about crontab but wanted to use 
> built-in
> > solution. Of course crontab is good as backup solution.
> >
> > @vince: you're right, I didn't think about it from this side. Just for
> > record for future seekers:
> >
> > 1. I logged as root ('sudo -i' from 'pi' account)
> > 2. generated SSH keys ('ssh-keygen')
> > 3. copied them to external server ('ssh-copy-id 
> ace...@external.domain.com
> > -p 222')
> > 4. copied /home/pi/.ssh/config to /root/.ssh/config
> > 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
> > 6. waited for next synchronization
> > 7. smiled because everything worked as expected :)
> >
>
> -- 
> Educating the mind without educating the heart is no education at all.
> - Aristotle
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/2c276b90-5b2b-431d-b7ce-16d185f1d672n%40googlegroups.com.


Re: [weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread Dominic Reich

Kalju  wrote:


Hi all,

Facing same issue with ERROR weeutil.rsyncupload:  Host key verification
failed error. 
However, it's really strange...
I can ssh to remote site as both root as well as pi user
I can do manual rsync with no problems but weewx builtin rsync returns above
error
At the moment my weewx installation is syncing using cron with no problems but
I want to understand why builtin rsync fails
Problem started after upgrade from weewx 5.0.0 to 5.0.1

Any ideas?


Adding the debug info should output the actual rsync command initiated by
weewx to the logs. That's what I assume when looking at line 104 in
`src/weeutil/rsyncupload.py` from the sources of 5.0.1.

Maybe that gives a clue in which the actual rsync commands differ and
why it might fail within Weewx.

Somewhere around 5.0.1 or 5.1.x the user got switched to weewx (not root
anymore) so maybe there is a problem? (I can't remember when the switch
was (it was mentioned on the list somwhere) and haven't found it in the
docs yet)

I'd always suggest looking as what weewx is running so you may not have
to play the guessing game on which user to look at.

sudo ps ux | grep weewxd

should return the user that actually runs the (python) daemon like on my
old Raspberry this runs still as root with 4.10.2.

root 690  2.8  1.5 647360 60428 ?Sl   Feb06  75:38 python3 
/usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid 
/etc/weewx/weewx.conf

As it was a package-installation I never messed with it, though I
welcome the change to a non-root package installation per default :)

In case host keys have changed on the server a deletion of the known_hosts
file within ~/.ssh could also help, probably.

-dominic


Thank you forward :-)
On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote:

   Thank you for replies.

   @Warren Gill: yes, I was thinking about crontab but wanted to use built-in
   solution. Of course crontab is good as backup solution.

   @vince: you're right, I didn't think about it from this side. Just for
   record for future seekers:

   1. I logged as root ('sudo -i' from 'pi' account)
   2. generated SSH keys ('ssh-keygen')
   3. copied them to external server ('ssh-copy-id ace...@external.domain.com
   -p 222')
   4. copied /home/pi/.ssh/config to /root/.ssh/config
   5. changed owner of 'config' ('chown root:root /root/.ssh/config')
   6. waited for next synchronization
   7. smiled because everything worked as expected :)



--
Educating the mind without educating the heart is no education at all.
- Aristotle

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/%24tcqbskwxq-%24bksDsvl-%24pdtHn-2024%40odin.oe7drt.com.


[weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread 'Tomasz Lewicki' via weewx-user
In my weewx.conf I have a section:

[[RSYNC]]
enable = true
server = XYZ # It's only identifier needed for file described below. 
Can be anything, for example MY_SECRET_SERVER
path = /path/to/files/on/my/remote/server # for example: 
/domains/my-domain/public_html/pws

And in /root/.ssh I have file named simply 'config':

Host XYZ
HostName my.remote.server.com # HostName can be also direct IP address
Port 45678 # Port to SSH if not standard 22
User me # name of your user on remote server

And rsync from inside of Weewx works in my case.

czwartek, 8 lutego 2024 o 09:33:14 UTC+1 Kalju napisał(a):

> Hi all,
>
> Facing same issue with *ERROR weeutil.rsyncupload:  Host key 
> verification failed *error. 
> However, it's really strange...
> I can ssh to remote site as both *root* as well as *pi* user
> I can do manual rsync with no problems but weewx builtin rsync returns 
> above error
> At the moment my weewx installation is syncing using cron with no problems 
> but I want to understand why builtin rsync fails
> Problem started after upgrade from weewx 5.0.0 to 5.0.1
>
> Any ideas?
> Thank you forward :-)
> On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote:
>
>> Thank you for replies.
>>
>> @Warren Gill: yes, I was thinking about crontab but wanted to use 
>> built-in solution. Of course crontab is good as backup solution.
>>
>> @vince: you're right, I didn't think about it from this side. Just for 
>> record for future seekers:
>>
>> 1. I logged as root ('sudo -i' from 'pi' account)
>> 2. generated SSH keys ('ssh-keygen')
>> 3. copied them to external server ('ssh-copy-id 
>> ace...@external.domain.com -p 222')
>> 4. copied /home/pi/.ssh/config to /root/.ssh/config
>> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
>> 6. waited for next synchronization
>> 7. smiled because everything worked as expected :)
>>
>> czwartek, 20 lipca 2023 o 23:24:20 UTC+2 vince napisał(a):
>>
>>> Unless you did something custom, weewx runs as root, not as user 'pi'.
>>>
>>> You need 'root' to be able to ssh into the remote system with the 
>>> user+key you specified.  Same procedure you did to get 'pi' to work, just 
>>> do it after sudo(ing) to root so you set the 'root' account up similiarly. 
>>>   Two minute thing to do.
>>>
>>> On Thursday, July 20, 2023 at 1:06:54 PM UTC-7 Tomasz Lewicki wrote:
>>>
 rsync: host key verification failed

 Dear Weewx users.

 I'm trying to send files generated by Weewx to external webserver (paid 
 hosting) with rsync. I'm familiar with rsync, ssh and Linux. Weewx is 
 running on Raspberry Pi as 'pi' user. Here are my configs:

 /home/pi/.ssh/config

 Host CF
 #HostName external.domain.com <- here of course is real web address
 HostName 10.20.30.40 <- here of course is real IP
 Port 222
 User acetone <- this is my username on remote webserver (hosting)
 
 /etc/weewx/weewx.conf

 (...)

 [[RSYNC]]
 # rsync'ing to a webserver is treated as just another report
 skin = Rsync
 
 # 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.
 #
 # If you wish to use rsync, set "enable" to "true", then
 # fill out server, user, and path.
 # The server should appear in your .ssh/config file.
 # The user is the username used in the identity file.
 # The path is the destination directory, such as 
 /var/www/html/weather.
 # Be sure that the user has write permissions on the 
 destination!
 enable = true
 server = external.domain.com
 port = 222
 user = acetone
 path = domains/external.domain.com/private_html/meteo/
 
 # 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
 
 # Rsync can be configured to remove files from the remote 
 server if
 # they don't exist under HTML_ROOT locally. USE WITH CAUTION: 
 if you
 # make a mistake in the remote path, you could could 
 unintentionally
 # cause unrelated files to be deleted. Set to 1 to enable 
 remote file
 # deletion, zero to allow files to accumulate remotely.
 delete = 0

 (...)

 I can log in to external server with ssh (passwordless) with command:

 $ ssh -p 222 ace...@external.domain.com

 or just

 $ ssh CF <- this is host from .ssh/config

 I got error message from weewx:

 Jul 

[weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread Kalju
Hi all,

Facing same issue with *ERROR weeutil.rsyncupload:  Host key 
verification failed *error. 
However, it's really strange...
I can ssh to remote site as both *root* as well as *pi* user
I can do manual rsync with no problems but weewx builtin rsync returns 
above error
At the moment my weewx installation is syncing using cron with no problems 
but I want to understand why builtin rsync fails
Problem started after upgrade from weewx 5.0.0 to 5.0.1

Any ideas?
Thank you forward :-)
On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote:

> Thank you for replies.
>
> @Warren Gill: yes, I was thinking about crontab but wanted to use built-in 
> solution. Of course crontab is good as backup solution.
>
> @vince: you're right, I didn't think about it from this side. Just for 
> record for future seekers:
>
> 1. I logged as root ('sudo -i' from 'pi' account)
> 2. generated SSH keys ('ssh-keygen')
> 3. copied them to external server ('ssh-copy-id ace...@external.domain.com 
> -p 222')
> 4. copied /home/pi/.ssh/config to /root/.ssh/config
> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
> 6. waited for next synchronization
> 7. smiled because everything worked as expected :)
>
> czwartek, 20 lipca 2023 o 23:24:20 UTC+2 vince napisał(a):
>
>> Unless you did something custom, weewx runs as root, not as user 'pi'.
>>
>> You need 'root' to be able to ssh into the remote system with the 
>> user+key you specified.  Same procedure you did to get 'pi' to work, just 
>> do it after sudo(ing) to root so you set the 'root' account up similiarly. 
>>   Two minute thing to do.
>>
>> On Thursday, July 20, 2023 at 1:06:54 PM UTC-7 Tomasz Lewicki wrote:
>>
>>> rsync: host key verification failed
>>>
>>> Dear Weewx users.
>>>
>>> I'm trying to send files generated by Weewx to external webserver (paid 
>>> hosting) with rsync. I'm familiar with rsync, ssh and Linux. Weewx is 
>>> running on Raspberry Pi as 'pi' user. Here are my configs:
>>>
>>> /home/pi/.ssh/config
>>>
>>> Host CF
>>> #HostName external.domain.com <- here of course is real web address
>>> HostName 10.20.30.40 <- here of course is real IP
>>> Port 222
>>> User acetone <- this is my username on remote webserver (hosting)
>>> 
>>> /etc/weewx/weewx.conf
>>>
>>> (...)
>>>
>>> [[RSYNC]]
>>> # rsync'ing to a webserver is treated as just another report
>>> skin = Rsync
>>> 
>>> # 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.
>>> #
>>> # If you wish to use rsync, set "enable" to "true", then
>>> # fill out server, user, and path.
>>> # The server should appear in your .ssh/config file.
>>> # The user is the username used in the identity file.
>>> # The path is the destination directory, such as 
>>> /var/www/html/weather.
>>> # Be sure that the user has write permissions on the destination!
>>> enable = true
>>> server = external.domain.com
>>> port = 222
>>> user = acetone
>>> path = domains/external.domain.com/private_html/meteo/
>>> 
>>> # 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
>>> 
>>> # Rsync can be configured to remove files from the remote server 
>>> if
>>> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if 
>>> you
>>> # make a mistake in the remote path, you could could 
>>> unintentionally
>>> # cause unrelated files to be deleted. Set to 1 to enable remote 
>>> file
>>> # deletion, zero to allow files to accumulate remotely.
>>> delete = 0
>>>
>>> (...)
>>>
>>> I can log in to external server with ssh (passwordless) with command:
>>>
>>> $ ssh -p 222 ace...@external.domain.com
>>>
>>> or just
>>>
>>> $ ssh CF <- this is host from .ssh/config
>>>
>>> I got error message from weewx:
>>>
>>> Jul 20 21:36:04 WeewxFR24 weewx[28079] DEBUG weeutil.rsyncupload: 
>>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e', 'ssh -p 222', 
>>> '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
>>> external.domain.com/private_html/meteo']]
>>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload: rsync 
>>> reported errors. Original command: ['rsync', '--archive', '--stats', '-e', 
>>> 'ssh -p 222', '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
>>> external.domain.com/private_html/meteo']
>>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
>>> Host key verification failed.
>>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
>>> rsync: connection unexpectedly closed (0 bytes 

[weewx-user] Re: Rsync error after updating to Ubuntu 22.04

2023-09-27 Thread Jon B
Thanks, that fixed the graphs. Turns out that the lack of a "Last updated" 
message was due to me playing around with the message that is displayed 
when the data hasn't been updated for a while - for some reason trying to 
customise this caused it to break. I'll try the stack overflow solutions 
for the Rsync error

Thanks!
On Wednesday, 27 September 2023 at 15:59:51 UTC-6 vince wrote:

> See if 
> https://stackoverflow.com/questions/667992/rsync-error-failed-to-set-times-on-foo-bar-operation-not-permitted
>  
> helps any
>
> For the graphs thing, look at 
> https://groups.google.com/g/weewx-user/c/yfG1JvCP3Us  
> if you're running 
> an old version of Belchertown.   Current Belchertown has a fix for this one 
> based on the changelog for the skin dated in late April.
> On Wednesday, September 27, 2023 at 12:16:40 PM UTC-7 Jon B wrote:
>
>> I was able to fix this issue by adding "ssh_options = "-av 
>> -oHostKeyAlgorithms=+ssh-dss" " to the Rsync section of weewx.conf and the 
>> Rsync now works (it's able to make the connection and transfer files), 
>> though there is still an error in the logs. This error is:
>>
>> Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload: 
>>  rsync: failed to set times on "/path/to/files/.": Operation not 
>> permitted (1) 
>>
>> I'm using the Belchertown skin and the "last updated" banner, the 
>> forecast and the graphs on the homepage no longer appear. I can view the 
>> graphs on the Graphs page though. Is this related to the above error? The 
>> logs also say:
>>
>> Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload: 
>>  rsync error: some files/attrs were not transferred (see previous 
>> errors) (code 23) at main.c(1338) [sender=3.2.7] 
>>
>> So I guess that it might be. How is the "last updated" banner generated 
>> by Belchertown?
>>
>> The website is here:
>>
>> https://empslocal.ex.ac.uk/uoeweather/
>> On Wednesday, 23 August 2023 at 18:25:24 UTC+1 Jon B wrote:
>>
>>> Thanks for the reply. I've just copied the correct key across to the 
>>> server, but I'm still getting the same error. When I try to ssh to the 
>>> server using simply "ssh username@remote-server" I also get that error, and 
>>> I have to add "-o HostKeyAlgorithms=ssh-dss" to be able to ssh in 
>>> successfully. Could this be the issue with the Rsync as well? Is there a 
>>> way to add the same option to the Rsync command?
>>>
>>> On Wednesday, 23 August 2023 at 07:42:26 UTC+1 Invisible Man wrote:
>>>
 Your Rsync works through SSH, and the first line of the logs shows that 
 it expects to be able to log in using a host key, but it can't find your 
 host key.
 So, you need to copy the SSH key of the host you are Rsyncing from to 
 the host you are Rsyncing to, in its .ssh/authorized_keys.

 I presume that this happened when you changed your OS. The SSH key has 
 obviously changed, and currently in .ssh/authorized_keys you probably have 
 the old key.

 Be sure to copy the correct user's key depending on who's running weewx 
 on your system.
 On Tuesday, August 22, 2023 at 7:34:09 PM UTC+2 Jon B wrote:

> I recently updated the operating system on which I'm running weewx to 
> Ubuntu 22.04 and now Rsync to my web server is no longer working. I'm 
> pretty sure it's because the version of ssh in Ubuntu 22.04 is newer than 
> the previous version and I've tried various fixes but haven't been able 
> to 
> solve it.
>
> The error in the logs is:
>
> Unable to negotiate with ***.***.**.** port 22: no matching host key 
> type found. Their offer: ssh-rsa,ssh-dss
> ERROR weeutil.rsyncupload:  rsync: connection unexpectedly closed 
> (0 bytes received so far) [sender]
> ERROR weeutil.rsyncupload:  rsync error: unexplained error (code 
> 255) at io.c(231) [sender=3.2.7]
>
> From searching online I've tried adding various things to different 
> ssh config files but none has worked. I'm sure it must be a fairly simple 
> solution though - can anyone point me in the right direction?
>
> Thanks!
>


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e87f744e-9078-4c0e-9d7a-a92ebda7f638n%40googlegroups.com.


[weewx-user] Re: Rsync error after updating to Ubuntu 22.04

2023-09-27 Thread vince
See if 
https://stackoverflow.com/questions/667992/rsync-error-failed-to-set-times-on-foo-bar-operation-not-permitted
 
helps any

For the graphs thing, look at 
https://groups.google.com/g/weewx-user/c/yfG1JvCP3Us  
if you're running an 
old version of Belchertown.   Current Belchertown has a fix for this one 
based on the changelog for the skin dated in late April.
On Wednesday, September 27, 2023 at 12:16:40 PM UTC-7 Jon B wrote:

> I was able to fix this issue by adding "ssh_options = "-av 
> -oHostKeyAlgorithms=+ssh-dss" " to the Rsync section of weewx.conf and the 
> Rsync now works (it's able to make the connection and transfer files), 
> though there is still an error in the logs. This error is:
>
> Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload:  
> rsync: failed to set times on "/path/to/files/.": Operation not permitted 
> (1) 
>
> I'm using the Belchertown skin and the "last updated" banner, the forecast 
> and the graphs on the homepage no longer appear. I can view the graphs on 
> the Graphs page though. Is this related to the above error? The logs also 
> say:
>
> Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload:  
> rsync error: some files/attrs were not transferred (see previous errors) 
> (code 23) at main.c(1338) [sender=3.2.7] 
>
> So I guess that it might be. How is the "last updated" banner generated by 
> Belchertown?
>
> The website is here:
>
> https://empslocal.ex.ac.uk/uoeweather/
> On Wednesday, 23 August 2023 at 18:25:24 UTC+1 Jon B wrote:
>
>> Thanks for the reply. I've just copied the correct key across to the 
>> server, but I'm still getting the same error. When I try to ssh to the 
>> server using simply "ssh username@remote-server" I also get that error, and 
>> I have to add "-o HostKeyAlgorithms=ssh-dss" to be able to ssh in 
>> successfully. Could this be the issue with the Rsync as well? Is there a 
>> way to add the same option to the Rsync command?
>>
>> On Wednesday, 23 August 2023 at 07:42:26 UTC+1 Invisible Man wrote:
>>
>>> Your Rsync works through SSH, and the first line of the logs shows that 
>>> it expects to be able to log in using a host key, but it can't find your 
>>> host key.
>>> So, you need to copy the SSH key of the host you are Rsyncing from to 
>>> the host you are Rsyncing to, in its .ssh/authorized_keys.
>>>
>>> I presume that this happened when you changed your OS. The SSH key has 
>>> obviously changed, and currently in .ssh/authorized_keys you probably have 
>>> the old key.
>>>
>>> Be sure to copy the correct user's key depending on who's running weewx 
>>> on your system.
>>> On Tuesday, August 22, 2023 at 7:34:09 PM UTC+2 Jon B wrote:
>>>
 I recently updated the operating system on which I'm running weewx to 
 Ubuntu 22.04 and now Rsync to my web server is no longer working. I'm 
 pretty sure it's because the version of ssh in Ubuntu 22.04 is newer than 
 the previous version and I've tried various fixes but haven't been able to 
 solve it.

 The error in the logs is:

 Unable to negotiate with ***.***.**.** port 22: no matching host key 
 type found. Their offer: ssh-rsa,ssh-dss
 ERROR weeutil.rsyncupload:  rsync: connection unexpectedly closed 
 (0 bytes received so far) [sender]
 ERROR weeutil.rsyncupload:  rsync error: unexplained error (code 
 255) at io.c(231) [sender=3.2.7]

 From searching online I've tried adding various things to different ssh 
 config files but none has worked. I'm sure it must be a fairly simple 
 solution though - can anyone point me in the right direction?

 Thanks!

>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/4138aa4b-61a1-4ac9-8307-a072c37bbdd8n%40googlegroups.com.


[weewx-user] Re: Rsync error after updating to Ubuntu 22.04

2023-09-27 Thread Jon B
I was able to fix this issue by adding "ssh_options = "-av 
-oHostKeyAlgorithms=+ssh-dss" " to the Rsync section of weewx.conf and the 
Rsync now works (it's able to make the connection and transfer files), 
though there is still an error in the logs. This error is:

Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload:  
rsync: failed to set times on "/path/to/files/.": Operation not permitted 
(1) 

I'm using the Belchertown skin and the "last updated" banner, the forecast 
and the graphs on the homepage no longer appear. I can view the graphs on 
the Graphs page though. Is this related to the above error? The logs also 
say:

Sep 27 16:38:25 machine-name weewx[503476] ERROR weeutil.rsyncupload:  
rsync error: some files/attrs were not transferred (see previous errors) 
(code 23) at main.c(1338) [sender=3.2.7] 

So I guess that it might be. How is the "last updated" banner generated by 
Belchertown?

The website is here:

https://empslocal.ex.ac.uk/uoeweather/
On Wednesday, 23 August 2023 at 18:25:24 UTC+1 Jon B wrote:

> Thanks for the reply. I've just copied the correct key across to the 
> server, but I'm still getting the same error. When I try to ssh to the 
> server using simply "ssh username@remote-server" I also get that error, and 
> I have to add "-o HostKeyAlgorithms=ssh-dss" to be able to ssh in 
> successfully. Could this be the issue with the Rsync as well? Is there a 
> way to add the same option to the Rsync command?
>
> On Wednesday, 23 August 2023 at 07:42:26 UTC+1 Invisible Man wrote:
>
>> Your Rsync works through SSH, and the first line of the logs shows that 
>> it expects to be able to log in using a host key, but it can't find your 
>> host key.
>> So, you need to copy the SSH key of the host you are Rsyncing from to the 
>> host you are Rsyncing to, in its .ssh/authorized_keys.
>>
>> I presume that this happened when you changed your OS. The SSH key has 
>> obviously changed, and currently in .ssh/authorized_keys you probably have 
>> the old key.
>>
>> Be sure to copy the correct user's key depending on who's running weewx 
>> on your system.
>> On Tuesday, August 22, 2023 at 7:34:09 PM UTC+2 Jon B wrote:
>>
>>> I recently updated the operating system on which I'm running weewx to 
>>> Ubuntu 22.04 and now Rsync to my web server is no longer working. I'm 
>>> pretty sure it's because the version of ssh in Ubuntu 22.04 is newer than 
>>> the previous version and I've tried various fixes but haven't been able to 
>>> solve it.
>>>
>>> The error in the logs is:
>>>
>>> Unable to negotiate with ***.***.**.** port 22: no matching host key 
>>> type found. Their offer: ssh-rsa,ssh-dss
>>> ERROR weeutil.rsyncupload:  rsync: connection unexpectedly closed (0 
>>> bytes received so far) [sender]
>>> ERROR weeutil.rsyncupload:  rsync error: unexplained error (code 
>>> 255) at io.c(231) [sender=3.2.7]
>>>
>>> From searching online I've tried adding various things to different ssh 
>>> config files but none has worked. I'm sure it must be a fairly simple 
>>> solution though - can anyone point me in the right direction?
>>>
>>> Thanks!
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/abcb8e60-4d68-45fa-b224-d06416bd7de1n%40googlegroups.com.


[weewx-user] Re: Rsync error after updating to Ubuntu 22.04

2023-08-23 Thread Jon B
Thanks for the reply. I've just copied the correct key across to the 
server, but I'm still getting the same error. When I try to ssh to the 
server using simply "ssh username@remote-server" I also get that error, and 
I have to add "-o HostKeyAlgorithms=ssh-dss" to be able to ssh in 
successfully. Could this be the issue with the Rsync as well? Is there a 
way to add the same option to the Rsync command?

On Wednesday, 23 August 2023 at 07:42:26 UTC+1 Invisible Man wrote:

> Your Rsync works through SSH, and the first line of the logs shows that it 
> expects to be able to log in using a host key, but it can't find your host 
> key.
> So, you need to copy the SSH key of the host you are Rsyncing from to the 
> host you are Rsyncing to, in its .ssh/authorized_keys.
>
> I presume that this happened when you changed your OS. The SSH key has 
> obviously changed, and currently in .ssh/authorized_keys you probably have 
> the old key.
>
> Be sure to copy the correct user's key depending on who's running weewx on 
> your system.
> On Tuesday, August 22, 2023 at 7:34:09 PM UTC+2 Jon B wrote:
>
>> I recently updated the operating system on which I'm running weewx to 
>> Ubuntu 22.04 and now Rsync to my web server is no longer working. I'm 
>> pretty sure it's because the version of ssh in Ubuntu 22.04 is newer than 
>> the previous version and I've tried various fixes but haven't been able to 
>> solve it.
>>
>> The error in the logs is:
>>
>> Unable to negotiate with ***.***.**.** port 22: no matching host key type 
>> found. Their offer: ssh-rsa,ssh-dss
>> ERROR weeutil.rsyncupload:  rsync: connection unexpectedly closed (0 
>> bytes received so far) [sender]
>> ERROR weeutil.rsyncupload:  rsync error: unexplained error (code 255) 
>> at io.c(231) [sender=3.2.7]
>>
>> From searching online I've tried adding various things to different ssh 
>> config files but none has worked. I'm sure it must be a fairly simple 
>> solution though - can anyone point me in the right direction?
>>
>> Thanks!
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f779d699-ace3-4759-95dd-4bef5a5de2f2n%40googlegroups.com.


[weewx-user] Re: Rsync error after updating to Ubuntu 22.04

2023-08-23 Thread Invisible Man
Your Rsync works through SSH, and the first line of the logs shows that it 
expects to be able to log in using a host key, but it can't find your host 
key.
So, you need to copy the SSH key of the host you are Rsyncing from to the 
host you are Rsyncing to, in its .ssh/authorized_keys.

I presume that this happened when you changed your OS. The SSH key has 
obviously changed, and currently in .ssh/authorized_keys you probably have 
the old key.

Be sure to copy the correct user's key depending on who's running weewx on 
your system.
On Tuesday, August 22, 2023 at 7:34:09 PM UTC+2 Jon B wrote:

> I recently updated the operating system on which I'm running weewx to 
> Ubuntu 22.04 and now Rsync to my web server is no longer working. I'm 
> pretty sure it's because the version of ssh in Ubuntu 22.04 is newer than 
> the previous version and I've tried various fixes but haven't been able to 
> solve it.
>
> The error in the logs is:
>
> Unable to negotiate with ***.***.**.** port 22: no matching host key type 
> found. Their offer: ssh-rsa,ssh-dss
> ERROR weeutil.rsyncupload:  rsync: connection unexpectedly closed (0 
> bytes received so far) [sender]
> ERROR weeutil.rsyncupload:  rsync error: unexplained error (code 255) 
> at io.c(231) [sender=3.2.7]
>
> From searching online I've tried adding various things to different ssh 
> config files but none has worked. I'm sure it must be a fairly simple 
> solution though - can anyone point me in the right direction?
>
> Thanks!
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/2756acf9-415d-401e-8bc4-ce51d59513e2n%40googlegroups.com.


[weewx-user] Re: rsync: host key verification failed - problem

2023-07-21 Thread Tomasz Lewicki
Thank you for replies.

@Warren Gill: yes, I was thinking about crontab but wanted to use built-in 
solution. Of course crontab is good as backup solution.

@vince: you're right, I didn't think about it from this side. Just for 
record for future seekers:

1. I logged as root ('sudo -i' from 'pi' account)
2. generated SSH keys ('ssh-keygen')
3. copied them to external server ('ssh-copy-id acet...@external.domain.com 
-p 222')
4. copied /home/pi/.ssh/config to /root/.ssh/config
5. changed owner of 'config' ('chown root:root /root/.ssh/config')
6. waited for next synchronization
7. smiled because everything worked as expected :)

czwartek, 20 lipca 2023 o 23:24:20 UTC+2 vince napisał(a):

> Unless you did something custom, weewx runs as root, not as user 'pi'.
>
> You need 'root' to be able to ssh into the remote system with the user+key 
> you specified.  Same procedure you did to get 'pi' to work, just do it 
> after sudo(ing) to root so you set the 'root' account up similiarly.   Two 
> minute thing to do.
>
> On Thursday, July 20, 2023 at 1:06:54 PM UTC-7 Tomasz Lewicki wrote:
>
>> rsync: host key verification failed
>>
>> Dear Weewx users.
>>
>> I'm trying to send files generated by Weewx to external webserver (paid 
>> hosting) with rsync. I'm familiar with rsync, ssh and Linux. Weewx is 
>> running on Raspberry Pi as 'pi' user. Here are my configs:
>>
>> /home/pi/.ssh/config
>>
>> Host CF
>> #HostName external.domain.com <- here of course is real web address
>> HostName 10.20.30.40 <- here of course is real IP
>> Port 222
>> User acetone <- this is my username on remote webserver (hosting)
>> 
>> /etc/weewx/weewx.conf
>>
>> (...)
>>
>> [[RSYNC]]
>> # rsync'ing to a webserver is treated as just another report
>> skin = Rsync
>> 
>> # 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.
>> #
>> # If you wish to use rsync, set "enable" to "true", then
>> # fill out server, user, and path.
>> # The server should appear in your .ssh/config file.
>> # The user is the username used in the identity file.
>> # The path is the destination directory, such as 
>> /var/www/html/weather.
>> # Be sure that the user has write permissions on the destination!
>> enable = true
>> server = external.domain.com
>> port = 222
>> user = acetone
>> path = domains/external.domain.com/private_html/meteo/
>> 
>> # 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
>> 
>> # Rsync can be configured to remove files from the remote server 
>> if
>> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if 
>> you
>> # make a mistake in the remote path, you could could 
>> unintentionally
>> # cause unrelated files to be deleted. Set to 1 to enable remote 
>> file
>> # deletion, zero to allow files to accumulate remotely.
>> delete = 0
>>
>> (...)
>>
>> I can log in to external server with ssh (passwordless) with command:
>>
>> $ ssh -p 222 ace...@external.domain.com
>>
>> or just
>>
>> $ ssh CF <- this is host from .ssh/config
>>
>> I got error message from weewx:
>>
>> Jul 20 21:36:04 WeewxFR24 weewx[28079] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e', 'ssh -p 222', 
>> '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
>> external.domain.com/private_html/meteo']]
>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload: rsync 
>> reported errors. Original command: ['rsync', '--archive', '--stats', '-e', 
>> 'ssh -p 222', '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
>> external.domain.com/private_html/meteo']
>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
>> Host key verification failed.
>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
>> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
>> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
>> rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
>>
>> I can send single file or whole directory with this command applied 
>> directly from CLI:
>>
>> $ rsync --archive --stats -e 'ssh external.domain.com -p 222 -l acetone' 
>> /var/www/html/weewx/ CF:domains/external.domain.com/private_html/meteo/
>>
>> I can also send files with simpler command (no additional options for -e 
>> ssh because they are in .ssh/config):
>>
>> $ rsync --archive --stats -e ssh /var/www/html/weewx/ CF:domains/
>> external.domain.com/private_html/meteo/
>>
>> But *not* with:
>>
>> 

[weewx-user] Re: rsync: host key verification failed - problem

2023-07-20 Thread vince
Unless you did something custom, weewx runs as root, not as user 'pi'.

You need 'root' to be able to ssh into the remote system with the user+key 
you specified.  Same procedure you did to get 'pi' to work, just do it 
after sudo(ing) to root so you set the 'root' account up similiarly.   Two 
minute thing to do.

On Thursday, July 20, 2023 at 1:06:54 PM UTC-7 Tomasz Lewicki wrote:

> rsync: host key verification failed
>
> Dear Weewx users.
>
> I'm trying to send files generated by Weewx to external webserver (paid 
> hosting) with rsync. I'm familiar with rsync, ssh and Linux. Weewx is 
> running on Raspberry Pi as 'pi' user. Here are my configs:
>
> /home/pi/.ssh/config
>
> Host CF
> #HostName external.domain.com <- here of course is real web address
> HostName 10.20.30.40 <- here of course is real IP
> Port 222
> User acetone <- this is my username on remote webserver (hosting)
> 
> /etc/weewx/weewx.conf
>
> (...)
>
> [[RSYNC]]
> # rsync'ing to a webserver is treated as just another report
> skin = Rsync
> 
> # 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.
> #
> # If you wish to use rsync, set "enable" to "true", then
> # fill out server, user, and path.
> # The server should appear in your .ssh/config file.
> # The user is the username used in the identity file.
> # The path is the destination directory, such as 
> /var/www/html/weather.
> # Be sure that the user has write permissions on the destination!
> enable = true
> server = external.domain.com
> port = 222
> user = acetone
> path = domains/external.domain.com/private_html/meteo/
> 
> # 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
> 
> # Rsync can be configured to remove files from the remote server if
> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if 
> you
> # make a mistake in the remote path, you could could 
> unintentionally
> # cause unrelated files to be deleted. Set to 1 to enable remote 
> file
> # deletion, zero to allow files to accumulate remotely.
> delete = 0
>
> (...)
>
> I can log in to external server with ssh (passwordless) with command:
>
> $ ssh -p 222 ace...@external.domain.com
>
> or just
>
> $ ssh CF <- this is host from .ssh/config
>
> I got error message from weewx:
>
> Jul 20 21:36:04 WeewxFR24 weewx[28079] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e', 'ssh -p 222', 
> '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
> external.domain.com/private_html/meteo']]
> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload: rsync 
> reported errors. Original command: ['rsync', '--archive', '--stats', '-e', 
> 'ssh -p 222', '/var/www/html/weewx/', 'ace...@external.domain.com:~/domains/
> external.domain.com/private_html/meteo']
> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
> Host key verification failed.
> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
> Jul 20 21:36:04 WeewxFR24 weewx[28079] ERROR weeutil.rsyncupload:  
> rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
>
> I can send single file or whole directory with this command applied 
> directly from CLI:
>
> $ rsync --archive --stats -e 'ssh external.domain.com -p 222 -l acetone' 
> /var/www/html/weewx/ CF:domains/external.domain.com/private_html/meteo/
>
> I can also send files with simpler command (no additional options for -e 
> ssh because they are in .ssh/config):
>
> $ rsync --archive --stats -e ssh /var/www/html/weewx/ CF:domains/
> external.domain.com/private_html/meteo/
>
> But *not* with:
>
> rsync --archive --stats -e ssh /var/www/html/weewx/ 
> ace...@external.domain.com:domains/external.domain.com/private_html/meteo
>
> And *not* with:
>
> rsync --archive --stats -e ssh /var/www/html/weewx/ 
> external.domain.com:domains/external.domain.com/private_html/meteo
>
> As you can see, if .ssh/config is properly filled with data, it is much 
> simpler to 'do' rsync. But why it works when executed manually but not from 
> inside Weewx? Keys are valid if I can log in without password from CLI. 
> Maybe you could do [[RSYNC]] option more flexible and use .ssh/config?
>

-- 
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+unsubscr...@googlegroups.com.
To view 

Re: [weewx-user] Re: RSync using NFS

2023-03-05 Thread Mark Fraser

On 04/03/2023 21:13, paul.ba...@gmail.com wrote:


Hello,
I don't understand why you want to use rsync over NFS.
NFS juste does all the work for you.
Once the remote file system is  mounted, usually at boot or login 
depending on the setup, there is no more distinction between the local 
files and the remote ones.

So, in weewx.conf
   - disable rsync
   - set HTML_ROOT = 
something like
         HTML_ROOT = /www/html/weewx
NFS will know where /www/ is installed, of course this is defined in the 
NFS setup.

Regards,     Paul
PS Remember, in the mid 80's  SUN said
            The network IS the computer


Thanks Paul,
I'd forgotten I'd set up NFS to share the pages I wanted to sync.

The reason I'm doing this is originally I had weewx with weewx-sdr 
running outside on a Pi fitted inside an old security camera that was 
capturing data using a cheap DVB-T USB stick. This would occasionally 
stop receiving data from one sensor so I upgraded to a Nooelec RTL-SDR 
v5. While I was finding time to replace the DVB-T stick I ran weewx on 
my server with the Nooelec.


This was working, but I didn't want to open up port 80 on the server to 
the outside world. So I was copying the data over to the Raspberry Pi 
which did have an outside connection.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/56720047-a76c-2831-45ca-b83e727e2360%40gmail.com.


[weewx-user] Re: RSync using NFS

2023-03-04 Thread paul.ba...@gmail.com

Hello,
I don't understand why you want to use rsync over NFS. 
NFS juste does all the work for you. 
Once the remote file system is  mounted, usually at boot or login depending 
on the setup, there is no more distinction between the local files and the 
remote ones. 
So, in weewx.conf
  - disable rsync
  - set HTML_ROOT = 
something like 
HTML_ROOT = /www/html/weewx
NFS will know where /www/ is installed, of course this is defined in the 
NFS setup.
Regards, Paul
PS Remember, in the mid 80's  SUN said
   The network IS the computer
 
Le Thursday, March 2, 2023 à 6:37:45 PM UTC+1, vince a écrit :

> Set your server to 127.0.0.1 and rsync-over-ssh to yourself.   Just follow 
> the same procedure you'd do for setting up a remote system.  You need a 
> /root/.ssh/config file and the public key you use should be in 
> /root/.ssh/authorized_keys on the weewx system.
>
>
> On Thursday, March 2, 2023 at 12:24:38 AM UTC-8 Mark Fraser wrote:
>
> I have set up file sharing between 2 devices using NFS so that I don't 
> have to store passwords. Is it possible to have weewx rsync over this 
> connection as it seems to want a server name and port as part of the 
> configuration?
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f6f4e2f4-9e36-4e57-93f4-3a7bb1b78029n%40googlegroups.com.


[weewx-user] Re: RSync using NFS

2023-03-02 Thread vince
Set your server to 127.0.0.1 and rsync-over-ssh to yourself.   Just follow 
the same procedure you'd do for setting up a remote system.  You need a 
/root/.ssh/config file and the public key you use should be in 
/root/.ssh/authorized_keys on the weewx system.


On Thursday, March 2, 2023 at 12:24:38 AM UTC-8 Mark Fraser wrote:

I have set up file sharing between 2 devices using NFS so that I don't have 
to store passwords. Is it possible to have weewx rsync over this connection 
as it seems to want a server name and port as part of the configuration?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7ca65d55-32cf-4a64-aa06-bb03a57db386n%40googlegroups.com.


[weewx-user] Re: RSync using NFS

2023-03-02 Thread cric...@pobox.com
Well...not exactly.  I didn't look to see what weewx does with the empty 
server in the config, but either way rsync still works over ssh, which
isn't nfs.  Just straight using nfs, you soft link could link between your 
weewx directory and your destination on the other machine.
Or you can set up passwordless ssh so that rsync works.  ssh uses keys, and 
at least one (.pub) needs to be on the remote end.

What problem are you trying to solve?  Some more clear details would get 
you a better answer.

Chris

On Thursday, March 2, 2023 at 1:24:38 AM UTC-7 Mark Fraser wrote:

> I have set up file sharing between 2 devices using NFS so that I don't 
> have to store passwords. Is it possible to have weewx rsync over this 
> connection as it seems to want a server name and port as part of the 
> configuration?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f369fba1-0abb-4955-a3a0-6f3946db6944n%40googlegroups.com.


Re: [weewx-user] Re: Rsync Help or User Help :o)

2022-11-16 Thread cric...@pobox.com
Important detail:

What is important with the slashes and the path are related to the SOURCE 
path.  It doesn't matter if
the destination does or doesn't have a trailing slash.  It does matter if 
the destination specifies a file rather than
a directory, though.

On Tuesday, November 15, 2022 at 9:51:30 AM UTC-7 FIA Ranch wrote:

> Okay.. Thanks all for the thoughts and comments.
>
> For the sake of anyone fighting this same issue somewhere in the future, 
> let me get this refocused, clarified, up to date.
>
> Baseline Info
> --
> 1) Host Machine is a hosting company
> 2) The host machine is a shared Linux based machine
> 3) I own the domain and rent the hosting
> 4) In the absolute path... home3/fiaranch/ - everything under and 
> past 'fiaranch' I have full control of
>
> 5) Client Machine is mine and is a private machine to be used and abused 
> as I see fit. :o)
>
> Users Question - Closed
> With regards to this issue with WeeWX, all activity will be with my root 
> hat on.
>
> SSH Keys Issue - Closed
> Thanks to Vince I learned that user and root keys are independant.  Now 
> both root and user have their own keys and they have been tested.
>
> SSH Port Question - Closed
> The hosting company states two ports as follows:
> SSH - 22
> SSH Shared/Reseller Servers - 
> NOTE - Command line Rsync actually works with both
>
>
> Question of "/" placement - Closed
>
> Thank you cric...@pobox.com for the definition of differentiation.
>
> File placement on the host is absolute path 
> /home3/fiaranch/public_html/weather/*.*
>
> Using command line, Rsync will accept both, which makes sense based on 
> what cric...@pobox.com stated.
>
> Command (WITH trailing '/') - root@weather:~# rsync -avhze ssh --progress 
> --update --stats  /var/www/html/ --delete 
> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
>
> Result (without all the superfulous data)
> sent 595.67K bytes  received 17.85K bytes  31.46K bytes/sec
> total size is 1.79M  speedup is 2.91
>
> Command (WITHOUT trailing '/') - root@weather:~# rsync -avhze ssh 
> --progress --update --stats  /var/www/html/ --delete 
> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather
>
> Result (without all the superfulous data)
> sent 309.53K bytes  received 12.20K bytes  71.49K bytes/sec
> total size is 1.86M  speedup is 5.77
>
> Note - The result difference is mainly a time difference.  However, based 
> on differentiation cric...@pobox.com stated, I am going to go forward 
> without the trailing '/'.
>
> So that brings me to WeeWX config discussion.
>
> The WeeWX Config is now as follows:
> skin = Rsync
> enable = true
> server = fiaranch.com
> user = fiaranch
> path = /home3/fiaranch/public_html/weather
> port = 
> log_success = true
> log_failure = true
> HTML_ROOT = /var/www/html
> delete = 1
>
> Notes:
> 1) The two log entries I added from what Vince posted.  Just to see if 
> that provides any additional information.
> 2) Removed the trailing '/' from the path.
>
> Results
> Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Running 
> report 'RSYNC'
> Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Found 
> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
> Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Cannot read 
> localization file /etc/weewx/skins/Rsync/lang/en.conf for report 'RSYNC': 
> Config file not found: "/etc/weewx/skins/Rsync/lang/en.conf".
> Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine:  Using 
> defaults instead.
> Nov 15 09:34:23 weather weewx[5274] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '--delete', '-e', 'ssh 
> -p ', '/var/www/html/', 
> 'fiar...@fiaranch.com:/home3/fiaranch/public_html/weather']]
> Nov 15 09:34:26 weather weewx[5274] INFO weeutil.rsyncupload: rsync'd 56 
> files (1,093,360 bytes) in 2.42 seconds
>
> WHAT !
>
> All said and done the failures can be attributed to two things:
> 1) SSH Keys must be paired under root, not user - Thank You Vince
> 2) No trailing '/' in the path.  Even though it will work in a command 
> line Rsync, it will not work in WeeWX.
>
> Discussion Closed
>
> Thanks to all for the comments, ideas, assistance, and sharing your 
> experience!
>
> Now going to play with Rsync options to see if I can break it again!! 
>  LMFAO
>
>
>
>
>
>
>
> On Tuesday, November 15, 2022 at 9:17:55 AM UTC-7 jo...@johnkline.com 
> wrote:
>
>> A trailing slash means copy the contents of the directory.
>>
>> Note that WeeWX code will add the slash if it is a directory.  See code 
>> snippet below.
>>
>> [image: weewx.png]
>>
>> weewx/rsyncupload.py at master · weewx/weewx 
>> 
>> github.com 
>> 
>> 
>>
>> # If the source path ends 

Re: [weewx-user] Re: Rsync Help or User Help :o)

2022-11-15 Thread FIA Ranch
Okay.. Thanks all for the thoughts and comments.

For the sake of anyone fighting this same issue somewhere in the future, 
let me get this refocused, clarified, up to date.

Baseline Info
--
1) Host Machine is a hosting company
2) The host machine is a shared Linux based machine
3) I own the domain and rent the hosting
4) In the absolute path... home3/fiaranch/ - everything under and 
past 'fiaranch' I have full control of

5) Client Machine is mine and is a private machine to be used and abused as 
I see fit. :o)

Users Question - Closed
With regards to this issue with WeeWX, all activity will be with my root 
hat on.

SSH Keys Issue - Closed
Thanks to Vince I learned that user and root keys are independant.  Now 
both root and user have their own keys and they have been tested.

SSH Port Question - Closed
The hosting company states two ports as follows:
SSH - 22
SSH Shared/Reseller Servers - 
NOTE - Command line Rsync actually works with both


Question of "/" placement - Closed

Thank you cric...@pobox.com for the definition of differentiation.

File placement on the host is absolute path 
/home3/fiaranch/public_html/weather/*.*

Using command line, Rsync will accept both, which makes sense based on what 
cric...@pobox.com stated.

Command (WITH trailing '/') - root@weather:~# rsync -avhze ssh --progress 
--update --stats  /var/www/html/ --delete 
fiara...@fiaranch.com:/home3/fiaranch/public_html/weather/

Result (without all the superfulous data)
sent 595.67K bytes  received 17.85K bytes  31.46K bytes/sec
total size is 1.79M  speedup is 2.91

Command (WITHOUT trailing '/') - root@weather:~# rsync -avhze ssh 
--progress --update --stats  /var/www/html/ --delete 
fiara...@fiaranch.com:/home3/fiaranch/public_html/weather

Result (without all the superfulous data)
sent 309.53K bytes  received 12.20K bytes  71.49K bytes/sec
total size is 1.86M  speedup is 5.77

Note - The result difference is mainly a time difference.  However, based 
on differentiation cric...@pobox.com stated, I am going to go forward 
without the trailing '/'.

So that brings me to WeeWX config discussion.

The WeeWX Config is now as follows:
skin = Rsync
enable = true
server = fiaranch.com
user = fiaranch
path = /home3/fiaranch/public_html/weather
port = 
log_success = true
log_failure = true
HTML_ROOT = /var/www/html
delete = 1

Notes:
1) The two log entries I added from what Vince posted.  Just to see if that 
provides any additional information.
2) Removed the trailing '/' from the path.

Results
Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Running 
report 'RSYNC'
Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Found 
configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine: Cannot read 
localization file /etc/weewx/skins/Rsync/lang/en.conf for report 'RSYNC': 
Config file not found: "/etc/weewx/skins/Rsync/lang/en.conf".
Nov 15 09:34:23 weather weewx[5274] DEBUG weewx.reportengine:  Using 
defaults instead.
Nov 15 09:34:23 weather weewx[5274] DEBUG weeutil.rsyncupload: rsyncupload: 
cmd: [['rsync', '--archive', '--stats', '--delete', '-e', 'ssh -p ', 
'/var/www/html/', 
'fiara...@fiaranch.com:/home3/fiaranch/public_html/weather']]
Nov 15 09:34:26 weather weewx[5274] INFO weeutil.rsyncupload: rsync'd 56 
files (1,093,360 bytes) in 2.42 seconds

WHAT !

All said and done the failures can be attributed to two things:
1) SSH Keys must be paired under root, not user - Thank You Vince
2) No trailing '/' in the path.  Even though it will work in a command line 
Rsync, it will not work in WeeWX.

Discussion Closed

Thanks to all for the comments, ideas, assistance, and sharing your 
experience!

Now going to play with Rsync options to see if I can break it again!!  LMFAO







On Tuesday, November 15, 2022 at 9:17:55 AM UTC-7 jo...@johnkline.com wrote:

> A trailing slash means copy the contents of the directory.
>
> Note that WeeWX code will add the slash if it is a directory.  See code 
> snippet below.
>
> [image: weewx.png]
>
> weewx/rsyncupload.py at master · weewx/weewx 
> 
> github.com 
> 
> 
>
> # If the source path ends with a slash, rsync interprets
> # that as a request to copy all the directory's *contents*,
> # whereas if it doesn't, it copies the entire directory.
> # We want the former, so make it end with a slash.
> # Note: Don't add the slash if local_root isn't a directory
> if self.local_root.endswith(os.sep) or not 
> os.path.isdir(self.local_root):
> rsynclocalspec = self.local_root
> else:
> rsynclocalspec = self.local_root + os.sep
>
>
> On Nov 15, 2022, at 7:33 AM, 

Re: [weewx-user] Re: Rsync Help or User Help :o)

2022-11-15 Thread 'John Kline' via weewx-user
A trailing slash means copy the contents of the directory.Note that WeeWX code will add the slash if it is a directory.  See code snippet below.weewx/rsyncupload.py at master · weewx/weewxgithub.com        # If the source path ends with a slash, rsync interprets        # that as a request to copy all the directory's *contents*,        # whereas if it doesn't, it copies the entire directory.        # We want the former, so make it end with a slash.        # Note: Don't add the slash if local_root isn't a directory        if self.local_root.endswith(os.sep) or not os.path.isdir(self.local_root):            rsynclocalspec = self.local_root        else:            rsynclocalspec = self.local_root + os.sepOn Nov 15, 2022, at 7:33 AM, cric...@pobox.com  wrote:A couple of points about the trailing slashes.  A trailing slash means copy the contents of the directory.  The --archivemeans copy everything below the specified directory.  Not including a trailing slash means copy this directory and with--archive, everything below it.  It's not a matter of rsync not working because of the slashes, it just does two similar, butdifferent things.  The man pages for rsync are pretty good.As for the ssh keys, I'm pretty sure you can just copy the ~fiaranch/.ssh/id_rsa to ~root/.ssh.  No need to create root-specifickey pair and copy the public server's .ssh directory.  Oh, one other thing that's really important:The .ssh directory permissions are critical.  The directory itself must be chmod 0700.  The files inside it should be chmod 0600.This is true for all the .ssh directories on both ends of the connection.My setup is a little different; I rsync to another local machine that runs a web server.  Then I've got a separate script forpublishing the weewx (and a few other sites) to a public host, since the various href's need to be updated.On Tuesday, November 15, 2022 at 5:25:11 AM UTC-7 Greg Troxel wrote:
"gszla...@gmail.com"  writes:

> 1. Vince is correct. WeeWX runs as root and RSA generation must be done as 
> root.

I was sure Vince was correct to start with :-) but I think running weewx
as root is the wrong thing to do.   I run it as a non-root user, and
really there should be a dedicated weewx user that has permissions to do
what it needs (read the serial port, write the db, access credentials
for upload) and no more.

But this is really "how best to configure weewx on operating system X",
which is orthogonal to "how should I made weewx on system X already
configured as Y work".




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a69561f5-048a-4e2f-bc8f-e009a9cc2911n%40googlegroups.com.




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/E14937D0-EDC4-4C7B-9500-D716F41C09B4%40johnkline.com.


Re: [weewx-user] Re: Rsync Help or User Help :o)

2022-11-15 Thread cric...@pobox.com
A couple of points about the trailing slashes.  A trailing slash means copy 
the contents of the directory.  The --archive
means copy everything below the specified directory.  Not including a 
trailing slash means copy this directory and with
--archive, everything below it.  It's not a matter of rsync not working 
because of the slashes, it just does two similar, but
different things.  The man pages for rsync are pretty good.
As for the ssh keys, I'm pretty sure you can just copy the 
~fiaranch/.ssh/id_rsa to ~root/.ssh.  No need to create root-specific
key pair and copy the public server's .ssh directory.  Oh, one other thing 
that's really important:

The .ssh directory permissions are critical.  The directory itself must be 
chmod 0700.  The files inside it should be chmod 0600.
This is true for all the .ssh directories on both ends of the connection.

My setup is a little different; I rsync to another local machine that runs 
a web server.  Then I've got a separate script for
publishing the weewx (and a few other sites) to a public host, since the 
various href's need to be updated.

On Tuesday, November 15, 2022 at 5:25:11 AM UTC-7 Greg Troxel wrote:

>
> "gszla...@gmail.com"  writes:
>
> > 1. Vince is correct. WeeWX runs as root and RSA generation must be done 
> as 
> > root.
>
> I was sure Vince was correct to start with :-) but I think running weewx
> as root is the wrong thing to do. I run it as a non-root user, and
> really there should be a dedicated weewx user that has permissions to do
> what it needs (read the serial port, write the db, access credentials
> for upload) and no more.
>
> But this is really "how best to configure weewx on operating system X",
> which is orthogonal to "how should I made weewx on system X already
> configured as Y work".
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a69561f5-048a-4e2f-bc8f-e009a9cc2911n%40googlegroups.com.


Re: [weewx-user] Re: Rsync Help or User Help :o)

2022-11-15 Thread Greg Troxel

"gszla...@gmail.com"  writes:

> 1. Vince is correct. WeeWX runs as root and RSA generation must be done as 
> root.

I was sure Vince was correct to start with :-) but I think running weewx
as root is the wrong thing to do.   I run it as a non-root user, and
really there should be a dedicated weewx user that has permissions to do
what it needs (read the serial port, write the db, access credentials
for upload) and no more.

But this is really "how best to configure weewx on operating system X",
which is orthogonal to "how should I made weewx on system X already
configured as Y work".

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/rmisfikflr5.fsf%40s1.lexort.com.


signature.asc
Description: PGP signature


[weewx-user] Re: Rsync Help or User Help :o)

2022-11-15 Thread gszla...@gmail.com
Technical support at the web host was required to set things up.

1. Vince is correct. WeeWX runs as root and RSA generation must be done as 
root.
2. slahes matter. If you are missing a slash, rsync will not work. Note the 
preceding and trailing slash in HTML_ROOT
3 Port numbers are important. Some web hosts change the default port 22 to 
something else. See example below. Call them to verify.
4. no .ssh config was needed in my case.

After many days of hair pulling, this worked for me. Web hosts can be 
different. If it still doesn't work it is worth calling them..
In my case I had tto ry a number of times until I found a "senior" tech who 
knew his stuff.

*enable = true*
   * server = my_domain_name.com or or the IP address of the web host*
*port = 2002*
*user = remote_user_name*   # user name at web host
*path = public_html/belchertown* # example target path on web host
   *HTML_ROOT = /var/www/html/weewx/belchertown/* # source path on your 
home computer 

On Monday, November 14, 2022 at 8:24:05 PM UTC-5 vince wrote:

> path = the absolute path to where you want things to go.  The parent 
> directory must already be there and be writable.  I do not provide a 
> trailing slash nor a HTML_ROOT item.  Here's mine.
>
> [[RSYNC]]
> skin = Rsync
> enable = true
> server = 1.2.3.4
> user = remoteaccounthere
> path = /home/remoteaccounthere/public_html/weewx
> log_success = true 
> log_failure = true
> delete = 0
>
> You're getting permission denied errors so I'm not certain the account 
> you're logging into on the remote side has permission to log in on the 
> remote side.   The port  looks odd to me.  It should be 22.  I have no 
> idea where that  is coming from.  My syslog does not show a -p flag.
>
> The only thing I can think of is 'perhaps' you are specifying a port 
> number in your /root/.ssh/config for your remote host, but that's just a 
> guess.
>
> On Monday, November 14, 2022 at 4:01:40 PM UTC-8 FIA Ranch wrote:
>
>> First thank you very much for you time and expertise... I do 
>> appreciate it.
>>
>> I have got things running from root.
>> Can get in, out, etc with the server.
>> Can do long Rsync command at the top of this novel from root.
>>
>> However.. it did not fix the command content/format error.  
>>
>> My guess is the missing / after the 'weather' directory???  But it did 
>> get in, and no key issues reported.  Here is the tail.  Same as previous 
>> regarding the command error.
>>
>> Nov 14 16:26:27 weather weewx[80341] DEBUG weewx.reportengine:  Using 
>> defaults instead.
>> Nov 14 16:26:27 weather weewx[80341] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '--delete', '-e', 'ssh 
>> -p ', '/var/www/html/', 
>> 'fiar...@fiaranch.com:/home3/fiaranch/public_html/weather']]
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload: rsync 
>> reported errors. Original command: ['rsync', '--archive', '--stats', 
>> '--delete', '-e', 'ssh -p ', '/var/www/html/', 
>> 'fiar...@fiaranch.com:/home3/fiaranch/public_html/weather']
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
>> Permission denied, please try again.
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
>> Received disconnect from 108.167.172.147 port :2: Too many 
>> authentication failures
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
>> Disconnected from 108.167.172.147 port 
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
>> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
>> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
>> rsync error: error in rsync protocol data stream (code 12) at io.c(235) 
>> [sender=3.1.3]
>>
>> I tried one thing went into the config and added a second / after the 
>> directory "weather//" think it might pick up the first one.  No deal
>>
>> Any thoughts / ideas on that one??
>>
>> Again, thanks for you time.
>>
>> Have a good evening/day/morning, or whatever it is in your corner of the 
>> world. Early evening high in the Rockies and I am outa here until tomorrow.
>>
>> David
>>
>> On Monday, November 14, 2022 at 2:26:32 PM UTC-7 vince wrote:
>>
>>> It's doesn't matter what the fiaranch account is.
>>>
>>> Unless you did something special, weewx runs as root so you have to set 
>>> up passwordless ssh in the 'root' account for weewx's rsync uploader to 
>>> work.   All your steps looked correct to me.  You just didn't do it under 
>>> the root account.
>>>
>>> Note - do "sudo bash" to open a bash shell as root when you set things 
>>> up.  You should be able to do "ssh fiaranch.com" and have it log in 
>>> successfully if you have things right.
>>>
>>> FWIW, I have never needed to set delete=1 nor set the ServerWhatever 
>>> items in .ssh/config in many years of 

[weewx-user] Re: Rsync Help or User Help :o)

2022-11-14 Thread vince
path = the absolute path to where you want things to go.  The parent 
directory must already be there and be writable.  I do not provide a 
trailing slash nor a HTML_ROOT item.  Here's mine.

[[RSYNC]]
skin = Rsync
enable = true
server = 1.2.3.4
user = remoteaccounthere
path = /home/remoteaccounthere/public_html/weewx
log_success = true 
log_failure = true
delete = 0

You're getting permission denied errors so I'm not certain the account 
you're logging into on the remote side has permission to log in on the 
remote side.   The port  looks odd to me.  It should be 22.  I have no 
idea where that  is coming from.  My syslog does not show a -p flag.

The only thing I can think of is 'perhaps' you are specifying a port number 
in your /root/.ssh/config for your remote host, but that's just a guess.

On Monday, November 14, 2022 at 4:01:40 PM UTC-8 FIA Ranch wrote:

> First thank you very much for you time and expertise... I do 
> appreciate it.
>
> I have got things running from root.
> Can get in, out, etc with the server.
> Can do long Rsync command at the top of this novel from root.
>
> However.. it did not fix the command content/format error.  
>
> My guess is the missing / after the 'weather' directory???  But it did get 
> in, and no key issues reported.  Here is the tail.  Same as previous 
> regarding the command error.
>
> Nov 14 16:26:27 weather weewx[80341] DEBUG weewx.reportengine:  Using 
> defaults instead.
> Nov 14 16:26:27 weather weewx[80341] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '--delete', '-e', 'ssh 
> -p ', '/var/www/html/', 
> 'fiar...@fiaranch.com:/home3/fiaranch/public_html/weather']]
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload: rsync 
> reported errors. Original command: ['rsync', '--archive', '--stats', 
> '--delete', '-e', 'ssh -p ', '/var/www/html/', 
> 'fiar...@fiaranch.com:/home3/fiaranch/public_html/weather']
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
> Permission denied, please try again.
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
> Received disconnect from 108.167.172.147 port :2: Too many 
> authentication failures
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
> Disconnected from 108.167.172.147 port 
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
> Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  rsync 
> error: error in rsync protocol data stream (code 12) at io.c(235) 
> [sender=3.1.3]
>
> I tried one thing went into the config and added a second / after the 
> directory "weather//" think it might pick up the first one.  No deal
>
> Any thoughts / ideas on that one??
>
> Again, thanks for you time.
>
> Have a good evening/day/morning, or whatever it is in your corner of the 
> world. Early evening high in the Rockies and I am outa here until tomorrow.
>
> David
>
> On Monday, November 14, 2022 at 2:26:32 PM UTC-7 vince wrote:
>
>> It's doesn't matter what the fiaranch account is.
>>
>> Unless you did something special, weewx runs as root so you have to set 
>> up passwordless ssh in the 'root' account for weewx's rsync uploader to 
>> work.   All your steps looked correct to me.  You just didn't do it under 
>> the root account.
>>
>> Note - do "sudo bash" to open a bash shell as root when you set things 
>> up.  You should be able to do "ssh fiaranch.com" and have it log in 
>> successfully if you have things right.
>>
>> FWIW, I have never needed to set delete=1 nor set the ServerWhatever 
>> items in .ssh/config in many years of running the rsync uploader, but that 
>> isn't relevant to getting you set up.  Just passing it along.
>>
>> On Monday, November 14, 2022 at 12:16:44 PM UTC-8 FIA Ranch wrote:
>>
>>> Thanks.  Am not a Linux expert, but
>>> 1) fiaranch is an admin account. I understand that is not root.
>>> 2) I did all the get, install, etc, under the user account. I hear you 
>>> saying it runs under root.
>>> 3) I will create a key pair under root. Upload the public one to the 
>>> server.  See if that impacts Line 7.
>>> 4) Not seeing how that will impact the Line 6 error. But... we will 
>>> see
>>>
>>> Thanks.  
>>>
>>>
>>> On Monday, November 14, 2022 at 12:29:08 PM UTC-7 vince wrote:
>>>
 Two things.  One is you need to do your steps as the account weewx runs 
 as, which is likely root.   While doing your steps from the unprivileged 
 account 'fiaranch' does prove the remote side works and the key works, it 
 has nothing to do with weewx at all.  To get weewx rsync working you need 
 to set up the passwordless ssh for the root account almost certainly.

 Second thing is the ERROR message.  It's likely you either have no 
 .ssh/known_hosts 

[weewx-user] Re: Rsync Help or User Help :o)

2022-11-14 Thread FIA Ranch
First thank you very much for you time and expertise... I do appreciate 
it.

I have got things running from root.
Can get in, out, etc with the server.
Can do long Rsync command at the top of this novel from root.

However.. it did not fix the command content/format error.  

My guess is the missing / after the 'weather' directory???  But it did get 
in, and no key issues reported.  Here is the tail.  Same as previous 
regarding the command error.

Nov 14 16:26:27 weather weewx[80341] DEBUG weewx.reportengine:  Using 
defaults instead.
Nov 14 16:26:27 weather weewx[80341] DEBUG weeutil.rsyncupload: 
rsyncupload: cmd: [['rsync', '--archive', '--stats', '--delete', '-e', 'ssh 
-p ', '/var/www/html/', 
'fiara...@fiaranch.com:/home3/fiaranch/public_html/weather']]
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload: rsync 
reported errors. Original command: ['rsync', '--archive', '--stats', 
'--delete', '-e', 'ssh -p ', '/var/www/html/', 
'fiara...@fiaranch.com:/home3/fiaranch/public_html/weather']
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
Permission denied, please try again.
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
Received disconnect from 108.167.172.147 port :2: Too many 
authentication failures
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  
Disconnected from 108.167.172.147 port 
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  rsync: 
connection unexpectedly closed (0 bytes received so far) [sender]
Nov 14 16:26:28 weather weewx[80341] ERROR weeutil.rsyncupload:  rsync 
error: error in rsync protocol data stream (code 12) at io.c(235) 
[sender=3.1.3]

I tried one thing went into the config and added a second / after the 
directory "weather//" think it might pick up the first one.  No deal

Any thoughts / ideas on that one??

Again, thanks for you time.

Have a good evening/day/morning, or whatever it is in your corner of the 
world. Early evening high in the Rockies and I am outa here until tomorrow.

David

On Monday, November 14, 2022 at 2:26:32 PM UTC-7 vince wrote:

> It's doesn't matter what the fiaranch account is.
>
> Unless you did something special, weewx runs as root so you have to set up 
> passwordless ssh in the 'root' account for weewx's rsync uploader to work. 
>   All your steps looked correct to me.  You just didn't do it under the 
> root account.
>
> Note - do "sudo bash" to open a bash shell as root when you set things up. 
>  You should be able to do "ssh fiaranch.com" and have it log in 
> successfully if you have things right.
>
> FWIW, I have never needed to set delete=1 nor set the ServerWhatever items 
> in .ssh/config in many years of running the rsync uploader, but that isn't 
> relevant to getting you set up.  Just passing it along.
>
> On Monday, November 14, 2022 at 12:16:44 PM UTC-8 FIA Ranch wrote:
>
>> Thanks.  Am not a Linux expert, but
>> 1) fiaranch is an admin account. I understand that is not root.
>> 2) I did all the get, install, etc, under the user account. I hear you 
>> saying it runs under root.
>> 3) I will create a key pair under root. Upload the public one to the 
>> server.  See if that impacts Line 7.
>> 4) Not seeing how that will impact the Line 6 error. But... we will 
>> see
>>
>> Thanks.  
>>
>>
>> On Monday, November 14, 2022 at 12:29:08 PM UTC-7 vince wrote:
>>
>>> Two things.  One is you need to do your steps as the account weewx runs 
>>> as, which is likely root.   While doing your steps from the unprivileged 
>>> account 'fiaranch' does prove the remote side works and the key works, it 
>>> has nothing to do with weewx at all.  To get weewx rsync working you need 
>>> to set up the passwordless ssh for the root account almost certainly.
>>>
>>> Second thing is the ERROR message.  It's likely you either have no 
>>> .ssh/known_hosts entry for your remote system or an old one that doesn't 
>>> match the remote system's current host key (which is typical if you rebuilt 
>>> the remote system, os's autogenerate new keys).  That's likely why you're 
>>> getting the host key verification message.
>>>
>>> Shorter answer is - repeat your steps as root, assuming weewx also runs 
>>> as root.  Sounds like you just tested with the wrong account on your client 
>>> side.
>>>
>>> On Monday, November 14, 2022 at 11:07:06 AM UTC-8 FIA Ranch wrote:
>>>
 Is WeeWX Rsync buggy or am I!!  Likely me, and I just haven't found the 
 right bug spray to kill it!!  :o)

 About ready to just run a crontab job! Yes I understand WeeWX and 
 crontab being/getting out of sync.

 I have been fighting this for a couple of days.  So now I am looking 
 for hints.  I have run out!

 I apologize for this being a long post!  I hope I have covered all the 
 "have you tried.."

 What DOES work.

 I can sign into the server, move around, add, delete files, etc.


[weewx-user] Re: Rsync Help or User Help :o)

2022-11-14 Thread vince
It's doesn't matter what the fiaranch account is.

Unless you did something special, weewx runs as root so you have to set up 
passwordless ssh in the 'root' account for weewx's rsync uploader to work. 
  All your steps looked correct to me.  You just didn't do it under the 
root account.

Note - do "sudo bash" to open a bash shell as root when you set things up. 
 You should be able to do "ssh fiaranch.com" and have it log in 
successfully if you have things right.

FWIW, I have never needed to set delete=1 nor set the ServerWhatever items 
in .ssh/config in many years of running the rsync uploader, but that isn't 
relevant to getting you set up.  Just passing it along.

On Monday, November 14, 2022 at 12:16:44 PM UTC-8 FIA Ranch wrote:

> Thanks.  Am not a Linux expert, but
> 1) fiaranch is an admin account. I understand that is not root.
> 2) I did all the get, install, etc, under the user account. I hear you 
> saying it runs under root.
> 3) I will create a key pair under root. Upload the public one to the 
> server.  See if that impacts Line 7.
> 4) Not seeing how that will impact the Line 6 error. But... we will see
>
> Thanks.  
>
>
> On Monday, November 14, 2022 at 12:29:08 PM UTC-7 vince wrote:
>
>> Two things.  One is you need to do your steps as the account weewx runs 
>> as, which is likely root.   While doing your steps from the unprivileged 
>> account 'fiaranch' does prove the remote side works and the key works, it 
>> has nothing to do with weewx at all.  To get weewx rsync working you need 
>> to set up the passwordless ssh for the root account almost certainly.
>>
>> Second thing is the ERROR message.  It's likely you either have no 
>> .ssh/known_hosts entry for your remote system or an old one that doesn't 
>> match the remote system's current host key (which is typical if you rebuilt 
>> the remote system, os's autogenerate new keys).  That's likely why you're 
>> getting the host key verification message.
>>
>> Shorter answer is - repeat your steps as root, assuming weewx also runs 
>> as root.  Sounds like you just tested with the wrong account on your client 
>> side.
>>
>> On Monday, November 14, 2022 at 11:07:06 AM UTC-8 FIA Ranch wrote:
>>
>>> Is WeeWX Rsync buggy or am I!!  Likely me, and I just haven't found the 
>>> right bug spray to kill it!!  :o)
>>>
>>> About ready to just run a crontab job! Yes I understand WeeWX and 
>>> crontab being/getting out of sync.
>>>
>>> I have been fighting this for a couple of days.  So now I am looking for 
>>> hints.  I have run out!
>>>
>>> I apologize for this being a long post!  I hope I have covered all the 
>>> "have you tried.."
>>>
>>> What DOES work.
>>>
>>> I can sign into the server, move around, add, delete files, etc.
>>>
>>> NOTE:  It is a shared server with a shared IP address.  All of the 
>>> following have been tried both ways.  Using the domain and the shared IP.
>>>
>>> 
>>> fiaranch@weather:~$ ssh fiar...@fiaranch.com (Enter)
>>> Last login: Mon Nov 14 07:52:14 2022 from 166.sub-174-212-228.myvzw.com
>>> fiar...@fiaranch.com [~]# exit (Hit Enter)
>>> logout
>>> Connection to fiaranch.com closed.
>>> fiaranch@weather:~$ 
>>> 
>>>
>>> I can rsync from the command line
>>> -
>>> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>>>  /var/www/html/ --delete 
>>> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
>>> (Hit Enter)
>>> sending incremental file list
>>> ./
>>> #FTP.last
>>>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
>>> belchertown-dark.min.css
>>> |
>>> |
>>> blah-blah-blah
>>> |
>>> Number of files: 202 (reg: 185, dir: 17)
>>> Number of created files: 0
>>> Number of deleted files: 0
>>> Number of regular files transferred: 57
>>> Total file size: 1.91M bytes
>>> Total transferred file size: 1.15M bytes
>>> Literal data: 280.85K bytes
>>> Matched data: 872.30K bytes
>>> File list size: 0
>>> File list generation time: 0.001 seconds
>>> File list transfer time: 0.000 seconds
>>> Total bytes sent: 171.97K
>>> Total bytes received: 11.16K
>>>
>>> sent 171.97K bytes  received 11.16K bytes  73.25K bytes/sec
>>> total size is 1.91M  speedup is 10.44
>>> -
>>>
>>> Immediately run it again..
>>> --
>>> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>>>  /var/www/html/ --delete 
>>> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
>>> (Hit Enter)
>>> sending incremental file list
>>> ./
>>> #FTP.last
>>>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
>>> belchertown-dark.min.css
>>> |
>>> |
>>> blah-blah-blah
>>> |
>>> Number of files: 202 (reg: 185, dir: 17)
>>> Number of created files: 0
>>> Number of deleted files: 0
>>> Number of regular files transferred: 0
>>> Total file size: 1.91M bytes
>>> Total transferred file size: 0 bytes
>>> Literal data: 0 bytes
>>> Matched data: 0 bytes
>>> File list size: 0
>>> File list generation time: 0.001 seconds
>>> File list transfer time: 0.000 

[weewx-user] Re: Rsync Help or User Help :o)

2022-11-14 Thread FIA Ranch
Thanks.  Am not a Linux expert, but
1) fiaranch is an admin account. I understand that is not root.
2) I did all the get, install, etc, under the user account. I hear you 
saying it runs under root.
3) I will create a key pair under root. Upload the public one to the 
server.  See if that impacts Line 7.
4) Not seeing how that will impact the Line 6 error. But... we will see

Thanks.  


On Monday, November 14, 2022 at 12:29:08 PM UTC-7 vince wrote:

> Two things.  One is you need to do your steps as the account weewx runs 
> as, which is likely root.   While doing your steps from the unprivileged 
> account 'fiaranch' does prove the remote side works and the key works, it 
> has nothing to do with weewx at all.  To get weewx rsync working you need 
> to set up the passwordless ssh for the root account almost certainly.
>
> Second thing is the ERROR message.  It's likely you either have no 
> .ssh/known_hosts entry for your remote system or an old one that doesn't 
> match the remote system's current host key (which is typical if you rebuilt 
> the remote system, os's autogenerate new keys).  That's likely why you're 
> getting the host key verification message.
>
> Shorter answer is - repeat your steps as root, assuming weewx also runs as 
> root.  Sounds like you just tested with the wrong account on your client 
> side.
>
> On Monday, November 14, 2022 at 11:07:06 AM UTC-8 FIA Ranch wrote:
>
>> Is WeeWX Rsync buggy or am I!!  Likely me, and I just haven't found the 
>> right bug spray to kill it!!  :o)
>>
>> About ready to just run a crontab job! Yes I understand WeeWX and crontab 
>> being/getting out of sync.
>>
>> I have been fighting this for a couple of days.  So now I am looking for 
>> hints.  I have run out!
>>
>> I apologize for this being a long post!  I hope I have covered all the 
>> "have you tried.."
>>
>> What DOES work.
>>
>> I can sign into the server, move around, add, delete files, etc.
>>
>> NOTE:  It is a shared server with a shared IP address.  All of the 
>> following have been tried both ways.  Using the domain and the shared IP.
>>
>> 
>> fiaranch@weather:~$ ssh fiar...@fiaranch.com (Enter)
>> Last login: Mon Nov 14 07:52:14 2022 from 166.sub-174-212-228.myvzw.com
>> fiar...@fiaranch.com [~]# exit (Hit Enter)
>> logout
>> Connection to fiaranch.com closed.
>> fiaranch@weather:~$ 
>> 
>>
>> I can rsync from the command line
>> -
>> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>>  /var/www/html/ --delete 
>> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
>> (Hit Enter)
>> sending incremental file list
>> ./
>> #FTP.last
>>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
>> belchertown-dark.min.css
>> |
>> |
>> blah-blah-blah
>> |
>> Number of files: 202 (reg: 185, dir: 17)
>> Number of created files: 0
>> Number of deleted files: 0
>> Number of regular files transferred: 57
>> Total file size: 1.91M bytes
>> Total transferred file size: 1.15M bytes
>> Literal data: 280.85K bytes
>> Matched data: 872.30K bytes
>> File list size: 0
>> File list generation time: 0.001 seconds
>> File list transfer time: 0.000 seconds
>> Total bytes sent: 171.97K
>> Total bytes received: 11.16K
>>
>> sent 171.97K bytes  received 11.16K bytes  73.25K bytes/sec
>> total size is 1.91M  speedup is 10.44
>> -
>>
>> Immediately run it again..
>> --
>> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>>  /var/www/html/ --delete 
>> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
>> (Hit Enter)
>> sending incremental file list
>> ./
>> #FTP.last
>>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
>> belchertown-dark.min.css
>> |
>> |
>> blah-blah-blah
>> |
>> Number of files: 202 (reg: 185, dir: 17)
>> Number of created files: 0
>> Number of deleted files: 0
>> Number of regular files transferred: 0
>> Total file size: 1.91M bytes
>> Total transferred file size: 0 bytes
>> Literal data: 0 bytes
>> Matched data: 0 bytes
>> File list size: 0
>> File list generation time: 0.001 seconds
>> File list transfer time: 0.000 seconds
>> Total bytes sent: 5.31K
>> Total bytes received: 35
>>
>> sent 5.31K bytes  received 35 bytes  2.14K bytes/sec
>> total size is 1.91M  speedup is 357.60
>> ---
>>
>> All of the above tells me that the ssh keys are set and working.  Also 
>> says that Rsync is working between client and server. 
>>
>> Now we go to WeeWX !!!
>>
>> Following are the file setups as they currently exist.
>>
>> First the external files
>>
>> The .ssh directory
>> fiaranch@weather:~$ dir ~/.ssh (Hit Enter)
>>
>> configid_rsaknown_hosts
>>
>> Three files - config, key file, known hosts
>>
>> Config File Content
>> --
>> HostName fiaranch.com
>> IdentityFile ~/.ssh/id_rsa
>> StrictHostKeyChecking no
>> User fiaranch
>> ServerAliveInterval 30
>> ServerAliveCountMax 6
>> -
>> NOTE: The ServerAlive entries are from researching one of the debug 
>> errors.  Same with 

[weewx-user] Re: Rsync Help or User Help :o)

2022-11-14 Thread vince
Two things.  One is you need to do your steps as the account weewx runs as, 
which is likely root.   While doing your steps from the unprivileged 
account 'fiaranch' does prove the remote side works and the key works, it 
has nothing to do with weewx at all.  To get weewx rsync working you need 
to set up the passwordless ssh for the root account almost certainly.

Second thing is the ERROR message.  It's likely you either have no 
.ssh/known_hosts entry for your remote system or an old one that doesn't 
match the remote system's current host key (which is typical if you rebuilt 
the remote system, os's autogenerate new keys).  That's likely why you're 
getting the host key verification message.

Shorter answer is - repeat your steps as root, assuming weewx also runs as 
root.  Sounds like you just tested with the wrong account on your client 
side.

On Monday, November 14, 2022 at 11:07:06 AM UTC-8 FIA Ranch wrote:

> Is WeeWX Rsync buggy or am I!!  Likely me, and I just haven't found the 
> right bug spray to kill it!!  :o)
>
> About ready to just run a crontab job! Yes I understand WeeWX and crontab 
> being/getting out of sync.
>
> I have been fighting this for a couple of days.  So now I am looking for 
> hints.  I have run out!
>
> I apologize for this being a long post!  I hope I have covered all the 
> "have you tried.."
>
> What DOES work.
>
> I can sign into the server, move around, add, delete files, etc.
>
> NOTE:  It is a shared server with a shared IP address.  All of the 
> following have been tried both ways.  Using the domain and the shared IP.
>
> 
> fiaranch@weather:~$ ssh fiar...@fiaranch.com (Enter)
> Last login: Mon Nov 14 07:52:14 2022 from 166.sub-174-212-228.myvzw.com
> fiar...@fiaranch.com [~]# exit (Hit Enter)
> logout
> Connection to fiaranch.com closed.
> fiaranch@weather:~$ 
> 
>
> I can rsync from the command line
> -
> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>  /var/www/html/ --delete 
> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
> (Hit Enter)
> sending incremental file list
> ./
> #FTP.last
>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
> belchertown-dark.min.css
> |
> |
> blah-blah-blah
> |
> Number of files: 202 (reg: 185, dir: 17)
> Number of created files: 0
> Number of deleted files: 0
> Number of regular files transferred: 57
> Total file size: 1.91M bytes
> Total transferred file size: 1.15M bytes
> Literal data: 280.85K bytes
> Matched data: 872.30K bytes
> File list size: 0
> File list generation time: 0.001 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 171.97K
> Total bytes received: 11.16K
>
> sent 171.97K bytes  received 11.16K bytes  73.25K bytes/sec
> total size is 1.91M  speedup is 10.44
> -
>
> Immediately run it again..
> --
> fiaranch@weather:~$ rsync -avhze ssh --progress --update --stats 
>  /var/www/html/ --delete 
> fiar...@fiaranch.com:/home3/fiaranch/public_html/weather/
> (Hit Enter)
> sending incremental file list
> ./
> #FTP.last
>  26.05K 100%   23.51MB/s0:00:00 (xfr#1, to-chk=200/202)
> belchertown-dark.min.css
> |
> |
> blah-blah-blah
> |
> Number of files: 202 (reg: 185, dir: 17)
> Number of created files: 0
> Number of deleted files: 0
> Number of regular files transferred: 0
> Total file size: 1.91M bytes
> Total transferred file size: 0 bytes
> Literal data: 0 bytes
> Matched data: 0 bytes
> File list size: 0
> File list generation time: 0.001 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 5.31K
> Total bytes received: 35
>
> sent 5.31K bytes  received 35 bytes  2.14K bytes/sec
> total size is 1.91M  speedup is 357.60
> ---
>
> All of the above tells me that the ssh keys are set and working.  Also 
> says that Rsync is working between client and server. 
>
> Now we go to WeeWX !!!
>
> Following are the file setups as they currently exist.
>
> First the external files
>
> The .ssh directory
> fiaranch@weather:~$ dir ~/.ssh (Hit Enter)
>
> configid_rsaknown_hosts
>
> Three files - config, key file, known hosts
>
> Config File Content
> --
> HostName fiaranch.com
> IdentityFile ~/.ssh/id_rsa
> StrictHostKeyChecking no
> User fiaranch
> ServerAliveInterval 30
> ServerAliveCountMax 6
> -
> NOTE: The ServerAlive entries are from researching one of the debug 
> errors.  Same with the StrictHost That info coming up.
>
> The known_hosts file (without all the key stuff
> 
> |1|lz75l---
> |1|lMA4Y..
> fiaranch.com
> 
> NOTE: Added the domain from another research finding
>
> Now the WeeWX config file - Again omitting everything except relevant parts
>
>
> -
> [[RSYNC]]
> skin = Rsync
> enable = true
> server = fiaranch.com
> user = fiaranch
> path = /home3/fiaranch/public_html/weather/
> HTML_ROOT = /var/www/html
> delete = 1
> ---
> NOTE:  Yes, HTML_ROOT is a different 

[weewx-user] Re: rsync not working (weewx-Belchertown skin)

2022-01-14 Thread gszla...@gmail.com
Thanks. I believe you are correct.The weewx user is root so weewx rsync  
with non-root  user keysis not going to work. Learn something new every 
day..

On Thursday, January 13, 2022 at 12:11:47 PM UTC-5 tops...@gmail.com wrote:

> Is WeeWx running as the same user as your user? Error looks to me like the 
> weewx user hasn't done the key sharing to allow password-less rsync over 
> ssh.
>
> On Thursday, January 13, 2022 at 10:58:19 AM UTC-5 gszla...@gmail.com 
> wrote:
>
>> WeeWX version 4.5.1 - debian install
>> MQTT
>> GW1000 API
>> also running neowx-material skin
>> --
>> rsync works perfectly on the command line but it does not work in weewx.
>> The web host uses port  for SSH.
>> I've tried all types of things with ~.ssh/config but whether or not I 
>> even use the config file or not, I get the exact same error:
>>
>> 2022-01-12 2:39 P.M.weewx.serviceweewx[19782] ERROR 
>> weeutil.rsyncupload: [['rsync', '--archive', '--stats', '-e ssh -p ', 
>> '/var/www/html/weewx/belchertown/', 
>> 'remote_user@mydomainca:public_html/glenns/belchertown']] reported errors: 
>> Host key verification failed.. rsync: connection unexpectedly closed (0 
>> bytes received so far) [sender]. rsync error: unexplained error (code 255) 
>> at io.c(235) [sender=3.1.3]
>>
>> I did see Chri's's Jan 2 thread about his port problem for rsync but in 
>> my case adding port =  in the RSYNC section appears to work as I see -p 
>>  in the error message above.
>>
>> note: if you add a "/" slash in front of public_html for the target 
>> directory on the remote host, rsync does not work on the command line.
>>
>> note: I don't "git" git - could not see a way to download Tom's patched 
>> rsyncupload.py - so i just did a cut and paste of his code with notepad++ 
>> and duplicated the permissions. Hopefully it worked..at least I get the 
>> same error with the patched file! I have attached a copy of the patched  
>> file..just in case i didn't get the right one. I also have attached a 
>> debug=1 file  along with weewx.conf.
>>
>> Any help with this rsync problem would be greatly appreciated!
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b0b13cb7-bdfd-4b0d-a163-f823bd82f24bn%40googlegroups.com.


[weewx-user] Re: rsync not working (weewx-Belchertown skin)

2022-01-14 Thread vince
yes - connect in once as whatever user weewx is running as (which is almost 
always root)

On Friday, January 14, 2022 at 3:17:18 PM UTC-8 gszla...@gmail.com wrote:

> Thanks vince!
>
> I assume that weewx is running as root for a normal apt-get debian type of 
> install.
>
> It looks like when I ssh as root it asks for a password each time. So if 
> weewx-rsync fails each time as root, then would you not have to generate 
> keys as root instead of a  non-root user?
>
> On Thursday, January 13, 2022 at 1:28:32 PM UTC-5 vince wrote:
>
>> "Host key verification failed." is the indicator here.
>>
>> You need to attempt to ssh into the remote computer as the local weewx 
>> user (probably root) at least once so that ssh saves the other side's host 
>> key.   When it prompts you, say yes.
>>
>> It should look something like this example:
>>
>> # ssh testuser@pi
>> The authenticity of host 'nuc2 (192.168.1.171)' can't be established.
>> ECDSA key fingerprint is 4e:8a:b5:6a:12:a2:a0:6d:f6:64:07:35:d0:e7:17:1b.
>> Are you sure you want to continue connecting (yes/no)? yes
>> Warning: Permanently added 'nuc2,192.168.1.171' (ECDSA) to the list of 
>> known hosts.
>>
>>
>> Lastly,  your log and weewx.conf show a user name of 'remote_user' which 
>> I'm hoping is a typo.   If it's what you really want, you will need a user 
>> named "remote_user" created on the host you want to rsync to, and they will 
>> need to be able to write to whatever directory on the remote side that you 
>> specified in weewx.conf or you'll get permission errors.
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/376409f1-8fdd-4cee-8b8e-3997b51ee6can%40googlegroups.com.


[weewx-user] Re: rsync not working (weewx-Belchertown skin)

2022-01-14 Thread gszla...@gmail.com
Thanks vince!

I assume that weewx is running as root for a normal apt-get debian type of 
install.

It looks like when I ssh as root it asks for a password each time. So if 
weewx-rsync fails each time as root, then would you not have to generate 
keys as root instead of a  non-root user?

On Thursday, January 13, 2022 at 1:28:32 PM UTC-5 vince wrote:

> "Host key verification failed." is the indicator here.
>
> You need to attempt to ssh into the remote computer as the local weewx 
> user (probably root) at least once so that ssh saves the other side's host 
> key.   When it prompts you, say yes.
>
> It should look something like this example:
>
> # ssh testuser@pi
> The authenticity of host 'nuc2 (192.168.1.171)' can't be established.
> ECDSA key fingerprint is 4e:8a:b5:6a:12:a2:a0:6d:f6:64:07:35:d0:e7:17:1b.
> Are you sure you want to continue connecting (yes/no)? yes
> Warning: Permanently added 'nuc2,192.168.1.171' (ECDSA) to the list of 
> known hosts.
>
>
> Lastly,  your log and weewx.conf show a user name of 'remote_user' which 
> I'm hoping is a typo.   If it's what you really want, you will need a user 
> named "remote_user" created on the host you want to rsync to, and they will 
> need to be able to write to whatever directory on the remote side that you 
> specified in weewx.conf or you'll get permission errors.
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7ffed070-b737-432b-a5e2-81c6eb99396an%40googlegroups.com.


[weewx-user] Re: rsync not working (weewx-Belchertown skin)

2022-01-13 Thread vince
"Host key verification failed." is the indicator here.

You need to attempt to ssh into the remote computer as the local weewx user 
(probably root) at least once so that ssh saves the other side's host key. 
  When it prompts you, say yes.

It should look something like this example:

# ssh testuser@pi
The authenticity of host 'nuc2 (192.168.1.171)' can't be established.
ECDSA key fingerprint is 4e:8a:b5:6a:12:a2:a0:6d:f6:64:07:35:d0:e7:17:1b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'nuc2,192.168.1.171' (ECDSA) to the list of 
known hosts.


Lastly,  your log and weewx.conf show a user name of 'remote_user' which 
I'm hoping is a typo.   If it's what you really want, you will need a user 
named "remote_user" created on the host you want to rsync to, and they will 
need to be able to write to whatever directory on the remote side that you 
specified in weewx.conf or you'll get permission errors.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/45813025-8827-4656-a470-fd10e0022480n%40googlegroups.com.


[weewx-user] Re: rsync not working (weewx-Belchertown skin)

2022-01-13 Thread Topslakr Topslakr
Is WeeWx running as the same user as your user? Error looks to me like the 
weewx user hasn't done the key sharing to allow password-less rsync over 
ssh.

On Thursday, January 13, 2022 at 10:58:19 AM UTC-5 gszla...@gmail.com wrote:

> WeeWX version 4.5.1 - debian install
> MQTT
> GW1000 API
> also running neowx-material skin
> --
> rsync works perfectly on the command line but it does not work in weewx.
> The web host uses port  for SSH.
> I've tried all types of things with ~.ssh/config but whether or not I even 
> use the config file or not, I get the exact same error:
>
> 2022-01-12 2:39 P.M.weewx.serviceweewx[19782] ERROR 
> weeutil.rsyncupload: [['rsync', '--archive', '--stats', '-e ssh -p ', 
> '/var/www/html/weewx/belchertown/', 
> 'remote_user@mydomainca:public_html/glenns/belchertown']] reported errors: 
> Host key verification failed.. rsync: connection unexpectedly closed (0 
> bytes received so far) [sender]. rsync error: unexplained error (code 255) 
> at io.c(235) [sender=3.1.3]
>
> I did see Chri's's Jan 2 thread about his port problem for rsync but in my 
> case adding port =  in the RSYNC section appears to work as I see -p 
>  in the error message above.
>
> note: if you add a "/" slash in front of public_html for the target 
> directory on the remote host, rsync does not work on the command line.
>
> note: I don't "git" git - could not see a way to download Tom's patched 
> rsyncupload.py - so i just did a cut and paste of his code with notepad++ 
> and duplicated the permissions. Hopefully it worked..at least I get the 
> same error with the patched file! I have attached a copy of the patched  
> file..just in case i didn't get the right one. I also have attached a 
> debug=1 file  along with weewx.conf.
>
> Any help with this rsync problem would be greatly appreciated!
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/410ee90f-101f-4af0-85ec-cc050fbfaa62n%40googlegroups.com.


Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-03 Thread Chris Alemany
Thanks for this comment Gary. You forced me to reevaluate.. and I realized 
I was looking at an old install of weewx on my Pi, not the one that was 
active.  Not used to the Pi's software being installed more spread out. 
 The two patches are now properly applied and SSH is working well.

Thank you all for your quick work.

On Sunday, January 2, 2022 at 11:07:37 PM UTC-8 gjr80 wrote:

> It would help if you provided a longer log extract, four lines are better 
> than one but it it is still a bit like looking down a straw :). So that we 
> all have a complete picture could your restart WeeWX (keeping debug=1) and 
> let it run for a couple of archive periods. Then post a log extract showing 
> the complete WeeWX startup and the couple of report cycles.
>
> The concern I have from the log extract provided is that I don't see a 
> line similar to:
>
> Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: do_file_transfer: 
> Port = xx
>
> This line should appear if you are running the weather34.py that you 
> linked above (refer weather34.py line 351 
> ).
>  
> It could be that the log entry is missing because you did not include it in 
> the log extract or it could be that you are not running the weather34.py 
> version you think you are. We can't tell without seeing a more complete log 
> extract.
>
> Gary
>
> On Monday, 3 January 2022 at 13:08:31 UTC+10 chri...@gmail.com wrote:
>
>>
>> Still the same error essentially. Using the new code for both 
>> rsyncupload 
>> https://github.com/weewx/weewx/blob/68bf6c40332d37bdb7b2e81803edb4141fb9/bin/weeutil/rsyncupload.py
>> and 
>> weather34 
>> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
>> ).
>>
>> DEBUG log relevant entry:
>>
>> Jan  2 13:32:36 weewx-pi weewx[4572] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>> '/tmp/weather34/serverdata/', 
>> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']]
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] ERROR weeutil.rsyncupload: 
>> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
>> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']] reported 
>> errors: ssh: connect to host 100.10.10.10 port 22: Connection refused. 
>> rsync: connection unexpectedly closed (0 bytes received so far) [sender]. 
>> rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] INFO weeutil.rsyncupload: rsync 
>> executed in 0.12 seconds
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: 
>> do_file_transfer: Rsync complete
>>
>> On Sunday, January 2, 2022 at 11:03:12 AM UTC-8 tke...@gmail.com wrote:
>>
>>> The debug code will show you the parameters to the Popen() call that 
>>> invokes rsync. Unfortunately, that's all you get. Still, it should be 
>>> enough. What does it show now?
>>>
>>> -tk
>>>
>>> On Sun, Jan 2, 2022 at 9:02 AM Chris Alemany  wrote:
>>>
 I've updated the code in my rsyncupload.py file as well as a fix 
 provided by weather34.py and it is still defaulting to port 22.

 https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
 Is there a way that I could temporarily have rsyncupload output the 
 actual command it is sending? At this point we only have the error message.

 I'm going to go through and make sure I have uploaded the fixed files 
 for both.
 Thanks Tom and Gary!

 Cheers
 Chris

 On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:

> Fixed in commit 68bf6c4 
> ,
>  
> to appear in V4.6.
>
>
> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:
>
>> So, it sounds like there are two problems: the weewx code does not 
>> include quotes around the -e argument, and the weather34 code doesn't 
>> honor 
>> the port spec at all.
>>
>> I'll create a patch for the weewx code later today.
>>
>> Looked through the weather34 code. It could use a big refactor to 
>> leverage some of the services weewx offers. There's a lot of unnecessary 
>> code in there. End results are nice, though.
>>
>>
>>
>> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  
>> wrote:
>>
>>>
>>> I will pass that along, it occurred to me as well that the Standard 
>>> skin had been updating fine through all of this, so it was definitely 
>>> weather34 specific. Thanks Gary! 
>>> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>>>
 I just browsed through the WeeWX Weather 34 code and saw calls to 
 the WeeWX rsync upload code with the port forced to None. That will 
 cause 
 the 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread gjr80
It would help if you provided a longer log extract, four lines are better 
than one but it it is still a bit like looking down a straw :). So that we 
all have a complete picture could your restart WeeWX (keeping debug=1) and 
let it run for a couple of archive periods. Then post a log extract showing 
the complete WeeWX startup and the couple of report cycles.

The concern I have from the log extract provided is that I don't see a line 
similar to:

Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: do_file_transfer: 
Port = xx

This line should appear if you are running the weather34.py that you linked 
above (refer weather34.py line 351 
).
 
It could be that the log entry is missing because you did not include it in 
the log extract or it could be that you are not running the weather34.py 
version you think you are. We can't tell without seeing a more complete log 
extract.

Gary

On Monday, 3 January 2022 at 13:08:31 UTC+10 chri...@gmail.com wrote:

>
> Still the same error essentially. Using the new code for both 
> rsyncupload 
> https://github.com/weewx/weewx/blob/68bf6c40332d37bdb7b2e81803edb4141fb9/bin/weeutil/rsyncupload.py
> and 
> weather34 
> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
> ).
>
> DEBUG log relevant entry:
>
> Jan  2 13:32:36 weewx-pi weewx[4572] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
> '/tmp/weather34/serverdata/', 
> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']]
>
> Jan  2 13:32:37 weewx-pi weewx[4572] ERROR weeutil.rsyncupload: [['rsync', 
> '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']] reported 
> errors: ssh: connect to host 100.10.10.10 port 22: Connection refused. 
> rsync: connection unexpectedly closed (0 bytes received so far) [sender]. 
> rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
>
> Jan  2 13:32:37 weewx-pi weewx[4572] INFO weeutil.rsyncupload: rsync 
> executed in 0.12 seconds
>
> Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: 
> do_file_transfer: Rsync complete
>
> On Sunday, January 2, 2022 at 11:03:12 AM UTC-8 tke...@gmail.com wrote:
>
>> The debug code will show you the parameters to the Popen() call that 
>> invokes rsync. Unfortunately, that's all you get. Still, it should be 
>> enough. What does it show now?
>>
>> -tk
>>
>> On Sun, Jan 2, 2022 at 9:02 AM Chris Alemany  wrote:
>>
>>> I've updated the code in my rsyncupload.py file as well as a fix 
>>> provided by weather34.py and it is still defaulting to port 22.
>>>
>>> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
>>> Is there a way that I could temporarily have rsyncupload output the 
>>> actual command it is sending? At this point we only have the error message.
>>>
>>> I'm going to go through and make sure I have uploaded the fixed files 
>>> for both.
>>> Thanks Tom and Gary!
>>>
>>> Cheers
>>> Chris
>>>
>>> On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:
>>>
 Fixed in commit 68bf6c4 
 ,
  
 to appear in V4.6.


 On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:

> So, it sounds like there are two problems: the weewx code does not 
> include quotes around the -e argument, and the weather34 code doesn't 
> honor 
> the port spec at all.
>
> I'll create a patch for the weewx code later today.
>
> Looked through the weather34 code. It could use a big refactor to 
> leverage some of the services weewx offers. There's a lot of unnecessary 
> code in there. End results are nice, though.
>
>
>
> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  
> wrote:
>
>>
>> I will pass that along, it occurred to me as well that the Standard 
>> skin had been updating fine through all of this, so it was definitely 
>> weather34 specific. Thanks Gary! 
>> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>>
>>> I just browsed through the WeeWX Weather 34 code and saw calls to 
>>> the WeeWX rsync upload code with the port forced to None. That will 
>>> cause 
>>> the rsync uploader (used by the Weather 34 code) to always use port 22. 
>>> Setting the port number under [StdReport] [[RSYNC]] only affects rsync 
>>> reports runs under the WeeWX StdReport service (ie it will have no 
>>> impact 
>>> on the Weather 34 code).
>>>
>>> So yes in all likelihood your issue is with the Weather 34 code and 
>>> not WeeWX.
>>>
>>> Gary
>>> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com 
>>> wrote:
>>>
 I think I've 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread Chris Alemany

Still the same error essentially. Using the new code for both 
rsyncupload 
https://github.com/weewx/weewx/blob/68bf6c40332d37bdb7b2e81803edb4141fb9/bin/weeutil/rsyncupload.py
and 
weather34 
https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
).

DEBUG log relevant entry:

Jan  2 13:32:36 weewx-pi weewx[4572] DEBUG weeutil.rsyncupload: 
rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
'/tmp/weather34/serverdata/', 
'user@100.10.10.10:/home/user/public_html/weather34/serverdata']]

Jan  2 13:32:37 weewx-pi weewx[4572] ERROR weeutil.rsyncupload: [['rsync', 
'--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
'user@100.10.10.10:/home/user/public_html/weather34/serverdata']] reported 
errors: ssh: connect to host 100.10.10.10 port 22: Connection refused. 
rsync: connection unexpectedly closed (0 bytes received so far) [sender]. 
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]

Jan  2 13:32:37 weewx-pi weewx[4572] INFO weeutil.rsyncupload: rsync 
executed in 0.12 seconds

Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: 
do_file_transfer: Rsync complete

On Sunday, January 2, 2022 at 11:03:12 AM UTC-8 tke...@gmail.com wrote:

> The debug code will show you the parameters to the Popen() call that 
> invokes rsync. Unfortunately, that's all you get. Still, it should be 
> enough. What does it show now?
>
> -tk
>
> On Sun, Jan 2, 2022 at 9:02 AM Chris Alemany  wrote:
>
>> I've updated the code in my rsyncupload.py file as well as a fix provided 
>> by weather34.py and it is still defaulting to port 22.
>>
>> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
>> Is there a way that I could temporarily have rsyncupload output the 
>> actual command it is sending? At this point we only have the error message.
>>
>> I'm going to go through and make sure I have uploaded the fixed files for 
>> both.
>> Thanks Tom and Gary!
>>
>> Cheers
>> Chris
>>
>> On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:
>>
>>> Fixed in commit 68bf6c4 
>>> ,
>>>  
>>> to appear in V4.6.
>>>
>>>
>>> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:
>>>
 So, it sounds like there are two problems: the weewx code does not 
 include quotes around the -e argument, and the weather34 code doesn't 
 honor 
 the port spec at all.

 I'll create a patch for the weewx code later today.

 Looked through the weather34 code. It could use a big refactor to 
 leverage some of the services weewx offers. There's a lot of unnecessary 
 code in there. End results are nice, though.



 On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  
 wrote:

>
> I will pass that along, it occurred to me as well that the Standard 
> skin had been updating fine through all of this, so it was definitely 
> weather34 specific. Thanks Gary! 
> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>
>> I just browsed through the WeeWX Weather 34 code and saw calls to the 
>> WeeWX rsync upload code with the port forced to None. That will cause 
>> the 
>> rsync uploader (used by the Weather 34 code) to always use port 22. 
>> Setting 
>> the port number under [StdReport] [[RSYNC]] only affects rsync reports 
>> runs 
>> under the WeeWX StdReport service (ie it will have no impact on the 
>> Weather 
>> 34 code).
>>
>> So yes in all likelihood your issue is with the Weather 34 code and 
>> not WeeWX.
>>
>> Gary
>> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:
>>
>>> I think I've determined the issue.
>>>
>>> The rsync command being generated is missing the quotes:
>>> I am working with the weather34 folks and they added some debug in 
>>> the code so we could see the port being issued, which it does but when 
>>> I 
>>> issue the command at the command line I get:
>>> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/ 
>>> us...@alberniweather.ca:/home/user/public_html
>>>
>>> It is incorrect, the port needs to be in quotes or it ignores -e and 
>>> uses 22.
>>> The correct command should be:
>>>
>>> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/ 
>>> us...@alberniweather.ca:/home/user/public_html
>>>
>>>
>>> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com 
>>> wrote:
>>>
 I just tried setting port = 27 and it worked. 

 Either you are using a different weewx.conf than you think you are 
 using, or it was not set correctly in the [[RSYNC]] section

 It would really help if you posted the full log. It will tell you 
 which copy of weewx.conf it is using.

 On Sat, Jan 1, 2022 at 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread Tom Keffer
The debug code will show you the parameters to the Popen() call that
invokes rsync. Unfortunately, that's all you get. Still, it should be
enough. What does it show now?

-tk

On Sun, Jan 2, 2022 at 9:02 AM Chris Alemany  wrote:

> I've updated the code in my rsyncupload.py file as well as a fix provided
> by weather34.py and it is still defaulting to port 22.
>
> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
> Is there a way that I could temporarily have rsyncupload output the actual
> command it is sending? At this point we only have the error message.
>
> I'm going to go through and make sure I have uploaded the fixed files for
> both.
> Thanks Tom and Gary!
>
> Cheers
> Chris
>
> On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:
>
>> Fixed in commit 68bf6c4
>> ,
>> to appear in V4.6.
>>
>>
>> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:
>>
>>> So, it sounds like there are two problems: the weewx code does not
>>> include quotes around the -e argument, and the weather34 code doesn't honor
>>> the port spec at all.
>>>
>>> I'll create a patch for the weewx code later today.
>>>
>>> Looked through the weather34 code. It could use a big refactor to
>>> leverage some of the services weewx offers. There's a lot of unnecessary
>>> code in there. End results are nice, though.
>>>
>>>
>>>
>>> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  wrote:
>>>

 I will pass that along, it occurred to me as well that the Standard
 skin had been updating fine through all of this, so it was definitely
 weather34 specific. Thanks Gary!
 On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:

> I just browsed through the WeeWX Weather 34 code and saw calls to the
> WeeWX rsync upload code with the port forced to None. That will cause the
> rsync uploader (used by the Weather 34 code) to always use port 22. 
> Setting
> the port number under [StdReport] [[RSYNC]] only affects rsync reports 
> runs
> under the WeeWX StdReport service (ie it will have no impact on the 
> Weather
> 34 code).
>
> So yes in all likelihood your issue is with the Weather 34 code and
> not WeeWX.
>
> Gary
> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:
>
>> I think I've determined the issue.
>>
>> The rsync command being generated is missing the quotes:
>> I am working with the weather34 folks and they added some debug in
>> the code so we could see the port being issued, which it does but when I
>> issue the command at the command line I get:
>> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/
>> us...@alberniweather.ca:/home/user/public_html
>>
>> It is incorrect, the port needs to be in quotes or it ignores -e and
>> uses 22.
>> The correct command should be:
>>
>> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/
>> us...@alberniweather.ca:/home/user/public_html
>>
>>
>> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com
>> wrote:
>>
>>> I just tried setting port = 27 and it worked.
>>>
>>> Either you are using a different weewx.conf than you think you are
>>> using, or it was not set correctly in the [[RSYNC]] section
>>>
>>> It would really help if you posted the full log. It will tell you
>>> which copy of weewx.conf it is using.
>>>
>>> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany 
>>> wrote:
>>>
 Hi Gary,
 Thanks.
 Yes I've confirmed rsync works on that port on the computer and
 from the account needed as well as other computers. I have a cronjob 
 using
 it as well.
 Here's the Debug with the command. It doesn't seem to mention any
 port so is it ignoring the config for some reason?
 I wonder if this is an issue with the Weather34 skin as it appears
 to be the weather34 specific command that it is failing on. (Note I 
 removed
 the IP address of my server from the command.

 "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload:
 rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh',
 '/tmp/weather34/serverdata/', 
 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]


 Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload:
 [['rsync', '--archive', '--stats', '-e ssh', 
 '/tmp/weather34/serverdata/',
 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
 reported errors: ssh: connect to host changed.ip.for.privacy port 22:
 Connection refused. rsync: connection unexpectedly closed (0 bytes 
 received
 so far) [sender]. rsync error: 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread Chris Alemany
I've updated the code in my rsyncupload.py file as well as a fix provided 
by weather34.py and it is still defaulting to port 22.
https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
Is there a way that I could temporarily have rsyncupload output the actual 
command it is sending? At this point we only have the error message.

I'm going to go through and make sure I have uploaded the fixed files for 
both.
Thanks Tom and Gary!

Cheers
Chris

On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:

> Fixed in commit 68bf6c4 
> ,
>  
> to appear in V4.6.
>
>
> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:
>
>> So, it sounds like there are two problems: the weewx code does not 
>> include quotes around the -e argument, and the weather34 code doesn't honor 
>> the port spec at all.
>>
>> I'll create a patch for the weewx code later today.
>>
>> Looked through the weather34 code. It could use a big refactor to 
>> leverage some of the services weewx offers. There's a lot of unnecessary 
>> code in there. End results are nice, though.
>>
>>
>>
>> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  wrote:
>>
>>>
>>> I will pass that along, it occurred to me as well that the Standard skin 
>>> had been updating fine through all of this, so it was definitely weather34 
>>> specific. Thanks Gary! 
>>> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>>>
 I just browsed through the WeeWX Weather 34 code and saw calls to the 
 WeeWX rsync upload code with the port forced to None. That will cause the 
 rsync uploader (used by the Weather 34 code) to always use port 22. 
 Setting 
 the port number under [StdReport] [[RSYNC]] only affects rsync reports 
 runs 
 under the WeeWX StdReport service (ie it will have no impact on the 
 Weather 
 34 code).

 So yes in all likelihood your issue is with the Weather 34 code and not 
 WeeWX.

 Gary
 On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:

> I think I've determined the issue.
>
> The rsync command being generated is missing the quotes:
> I am working with the weather34 folks and they added some debug in the 
> code so we could see the port being issued, which it does but when I 
> issue 
> the command at the command line I get:
> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/ 
> us...@alberniweather.ca:/home/user/public_html
>
> It is incorrect, the port needs to be in quotes or it ignores -e and 
> uses 22.
> The correct command should be:
>
> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/ 
> us...@alberniweather.ca:/home/user/public_html
>
>
> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com 
> wrote:
>
>> I just tried setting port = 27 and it worked. 
>>
>> Either you are using a different weewx.conf than you think you are 
>> using, or it was not set correctly in the [[RSYNC]] section
>>
>> It would really help if you posted the full log. It will tell you 
>> which copy of weewx.conf it is using.
>>
>> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  
>> wrote:
>>
>>> Hi Gary,
>>> Thanks.
>>> Yes I've confirmed rsync works on that port on the computer and from 
>>> the account needed as well as other computers. I have a cronjob using 
>>> it as 
>>> well.
>>> Here's the Debug with the command. It doesn't seem to mention any 
>>> port so is it ignoring the config for some reason?
>>> I wonder if this is an issue with the Weather34 skin as it appears 
>>> to be the weather34 specific command that it is failing on. (Note I 
>>> removed 
>>> the IP address of my server from the command.
>>>
>>> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload: 
>>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>>> '/tmp/weather34/serverdata/', 
>>> 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
>>>  
>>>
>>>
>>> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload: 
>>> [['rsync', '--archive', '--stats', '-e ssh', 
>>> '/tmp/weather34/serverdata/', 
>>> 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
>>>  
>>> reported errors: ssh: connect to host changed.ip.for.privacy port 22: 
>>> Connection refused. rsync: connection unexpectedly closed (0 bytes 
>>> received 
>>> so far) [sender]. rsync error: unexplained error (code 255) at 
>>> io.c(235) 
>>> [sender=3.1.3]
>>>
>>> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>>>
 Hi,

 As far as WeeWX is concerned setting the port config option should 
 be all that's needed. 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread Tom Keffer
Fixed in commit 68bf6c4
,
to appear in V4.6.


On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:

> So, it sounds like there are two problems: the weewx code does not include
> quotes around the -e argument, and the weather34 code doesn't honor the
> port spec at all.
>
> I'll create a patch for the weewx code later today.
>
> Looked through the weather34 code. It could use a big refactor to leverage
> some of the services weewx offers. There's a lot of unnecessary code in
> there. End results are nice, though.
>
>
>
> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  wrote:
>
>>
>> I will pass that along, it occurred to me as well that the Standard skin
>> had been updating fine through all of this, so it was definitely weather34
>> specific. Thanks Gary!
>> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>>
>>> I just browsed through the WeeWX Weather 34 code and saw calls to the
>>> WeeWX rsync upload code with the port forced to None. That will cause the
>>> rsync uploader (used by the Weather 34 code) to always use port 22. Setting
>>> the port number under [StdReport] [[RSYNC]] only affects rsync reports runs
>>> under the WeeWX StdReport service (ie it will have no impact on the Weather
>>> 34 code).
>>>
>>> So yes in all likelihood your issue is with the Weather 34 code and not
>>> WeeWX.
>>>
>>> Gary
>>> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:
>>>
 I think I've determined the issue.

 The rsync command being generated is missing the quotes:
 I am working with the weather34 folks and they added some debug in the
 code so we could see the port being issued, which it does but when I issue
 the command at the command line I get:
 sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/
 us...@alberniweather.ca:/home/user/public_html

 It is incorrect, the port needs to be in quotes or it ignores -e and
 uses 22.
 The correct command should be:

 sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/
 us...@alberniweather.ca:/home/user/public_html


 On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com
 wrote:

> I just tried setting port = 27 and it worked.
>
> Either you are using a different weewx.conf than you think you are
> using, or it was not set correctly in the [[RSYNC]] section
>
> It would really help if you posted the full log. It will tell you
> which copy of weewx.conf it is using.
>
> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany 
> wrote:
>
>> Hi Gary,
>> Thanks.
>> Yes I've confirmed rsync works on that port on the computer and from
>> the account needed as well as other computers. I have a cronjob using it 
>> as
>> well.
>> Here's the Debug with the command. It doesn't seem to mention any
>> port so is it ignoring the config for some reason?
>> I wonder if this is an issue with the Weather34 skin as it appears to
>> be the weather34 specific command that it is failing on. (Note I removed
>> the IP address of my server from the command.
>>
>> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload:
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh',
>> '/tmp/weather34/serverdata/', 
>> 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
>>
>>
>> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload:
>> [['rsync', '--archive', '--stats', '-e ssh', 
>> '/tmp/weather34/serverdata/',
>> 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
>> reported errors: ssh: connect to host changed.ip.for.privacy port 22:
>> Connection refused. rsync: connection unexpectedly closed (0 bytes 
>> received
>> so far) [sender]. rsync error: unexplained error (code 255) at io.c(235)
>> [sender=3.1.3]
>>
>> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>>
>>> Hi,
>>>
>>> As far as WeeWX is concerned setting the port config option should
>>> be all that's needed. Something like (untested):
>>>
>>> [StdReport]
>>> 
>>> [[RSYNC]]
>>> 
>>> port = 27
>>>
>>> If that is not working I suggest you edit weewx.conf and set debug
>>> = 1. Save and restart WeeWX. Have a look at the log, the rsync
>>> command line being used by WeeWX should appear in the log.
>>>
>>> If the log shows that port 27 is being used by WeeWX then I would be
>>> looking elsewhere. Can you rsync with port 27 from the command line? 
>>> From
>>> another machine? Are there any firewalls blocking port 27?
>>>
>>> Gary
>>> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com
>>> wrote:
>>>
 Hello all,

 I 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-02 Thread Tom Keffer
So, it sounds like there are two problems: the weewx code does not include
quotes around the -e argument, and the weather34 code doesn't honor the
port spec at all.

I'll create a patch for the weewx code later today.

Looked through the weather34 code. It could use a big refactor to leverage
some of the services weewx offers. There's a lot of unnecessary code in
there. End results are nice, though.



On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  wrote:

>
> I will pass that along, it occurred to me as well that the Standard skin
> had been updating fine through all of this, so it was definitely weather34
> specific. Thanks Gary!
> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>
>> I just browsed through the WeeWX Weather 34 code and saw calls to the
>> WeeWX rsync upload code with the port forced to None. That will cause the
>> rsync uploader (used by the Weather 34 code) to always use port 22. Setting
>> the port number under [StdReport] [[RSYNC]] only affects rsync reports runs
>> under the WeeWX StdReport service (ie it will have no impact on the Weather
>> 34 code).
>>
>> So yes in all likelihood your issue is with the Weather 34 code and not
>> WeeWX.
>>
>> Gary
>> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:
>>
>>> I think I've determined the issue.
>>>
>>> The rsync command being generated is missing the quotes:
>>> I am working with the weather34 folks and they added some debug in the
>>> code so we could see the port being issued, which it does but when I issue
>>> the command at the command line I get:
>>> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/
>>> us...@alberniweather.ca:/home/user/public_html
>>>
>>> It is incorrect, the port needs to be in quotes or it ignores -e and
>>> uses 22.
>>> The correct command should be:
>>>
>>> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/
>>> us...@alberniweather.ca:/home/user/public_html
>>>
>>>
>>> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com wrote:
>>>
 I just tried setting port = 27 and it worked.

 Either you are using a different weewx.conf than you think you are
 using, or it was not set correctly in the [[RSYNC]] section

 It would really help if you posted the full log. It will tell you which
 copy of weewx.conf it is using.

 On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  wrote:

> Hi Gary,
> Thanks.
> Yes I've confirmed rsync works on that port on the computer and from
> the account needed as well as other computers. I have a cronjob using it 
> as
> well.
> Here's the Debug with the command. It doesn't seem to mention any port
> so is it ignoring the config for some reason?
> I wonder if this is an issue with the Weather34 skin as it appears to
> be the weather34 specific command that it is failing on. (Note I removed
> the IP address of my server from the command.
>
> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload:
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh',
> '/tmp/weather34/serverdata/', 
> 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
>
>
> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload:
> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/',
> 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
> reported errors: ssh: connect to host changed.ip.for.privacy port 22:
> Connection refused. rsync: connection unexpectedly closed (0 bytes 
> received
> so far) [sender]. rsync error: unexplained error (code 255) at io.c(235)
> [sender=3.1.3]
>
> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>
>> Hi,
>>
>> As far as WeeWX is concerned setting the port config option should
>> be all that's needed. Something like (untested):
>>
>> [StdReport]
>> 
>> [[RSYNC]]
>> 
>> port = 27
>>
>> If that is not working I suggest you edit weewx.conf and set debug =
>> 1. Save and restart WeeWX. Have a look at the log, the rsync command
>> line being used by WeeWX should appear in the log.
>>
>> If the log shows that port 27 is being used by WeeWX then I would be
>> looking elsewhere. Can you rsync with port 27 from the command line? From
>> another machine? Are there any firewalls blocking port 27?
>>
>> Gary
>> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:
>>
>>> Hello all,
>>>
>>> I just switched web hosts and they use port 27 for their SSH/RSYNC
>>> connections.  I dutifully entered port = 27 into my RSYNC section
>>> (previously there was no port line specified) put the log is reporting 
>>> that
>>> it is trying on port 22.
>>>
>>> Thoughts?
>>>
>>> Cheers, and Happy New Year,

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread Chris Alemany

I will pass that along, it occurred to me as well that the Standard skin 
had been updating fine through all of this, so it was definitely weather34 
specific. Thanks Gary! 
On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:

> I just browsed through the WeeWX Weather 34 code and saw calls to the 
> WeeWX rsync upload code with the port forced to None. That will cause the 
> rsync uploader (used by the Weather 34 code) to always use port 22. Setting 
> the port number under [StdReport] [[RSYNC]] only affects rsync reports runs 
> under the WeeWX StdReport service (ie it will have no impact on the Weather 
> 34 code).
>
> So yes in all likelihood your issue is with the Weather 34 code and not 
> WeeWX.
>
> Gary
> On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:
>
>> I think I've determined the issue.
>>
>> The rsync command being generated is missing the quotes:
>> I am working with the weather34 folks and they added some debug in the 
>> code so we could see the port being issued, which it does but when I issue 
>> the command at the command line I get:
>> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/ 
>> us...@alberniweather.ca:/home/user/public_html
>>
>> It is incorrect, the port needs to be in quotes or it ignores -e and uses 
>> 22.
>> The correct command should be:
>>
>> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/ 
>> us...@alberniweather.ca:/home/user/public_html
>>
>>
>> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com wrote:
>>
>>> I just tried setting port = 27 and it worked. 
>>>
>>> Either you are using a different weewx.conf than you think you are 
>>> using, or it was not set correctly in the [[RSYNC]] section
>>>
>>> It would really help if you posted the full log. It will tell you which 
>>> copy of weewx.conf it is using.
>>>
>>> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  wrote:
>>>
 Hi Gary,
 Thanks.
 Yes I've confirmed rsync works on that port on the computer and from 
 the account needed as well as other computers. I have a cronjob using it 
 as 
 well.
 Here's the Debug with the command. It doesn't seem to mention any port 
 so is it ignoring the config for some reason?
 I wonder if this is an issue with the Weather34 skin as it appears to 
 be the weather34 specific command that it is failing on. (Note I removed 
 the IP address of my server from the command.

 "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload: 
 rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
 '/tmp/weather34/serverdata/', 
 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
  


 Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload: 
 [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
  
 reported errors: ssh: connect to host changed.ip.for.privacy port 22: 
 Connection refused. rsync: connection unexpectedly closed (0 bytes 
 received 
 so far) [sender]. rsync error: unexplained error (code 255) at io.c(235) 
 [sender=3.1.3]

 On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:

> Hi,
>
> As far as WeeWX is concerned setting the port config option should be 
> all that's needed. Something like (untested):
>
> [StdReport]
> 
> [[RSYNC]]
> 
> port = 27
>
> If that is not working I suggest you edit weewx.conf and set debug = 1. 
> Save and restart WeeWX. Have a look at the log, the rsync command line 
> being used by WeeWX should appear in the log.
>
> If the log shows that port 27 is being used by WeeWX then I would be 
> looking elsewhere. Can you rsync with port 27 from the command line? From 
> another machine? Are there any firewalls blocking port 27?
>
> Gary
> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:
>
>> Hello all,
>>
>> I just switched web hosts and they use port 27 for their SSH/RSYNC 
>> connections.  I dutifully entered port = 27 into my RSYNC section 
>> (previously there was no port line specified) put the log is reporting 
>> that 
>> it is trying on port 22.
>>
>> Thoughts?
>>
>> Cheers, and Happy New Year,
>> Chris
>>
> -- 
 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/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com
  
 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread gjr80
I just browsed through the WeeWX Weather 34 code and saw calls to the WeeWX 
rsync upload code with the port forced to None. That will cause the rsync 
uploader (used by the Weather 34 code) to always use port 22. Setting the 
port number under [StdReport] [[RSYNC]] only affects rsync reports runs 
under the WeeWX StdReport service (ie it will have no impact on the Weather 
34 code).

So yes in all likelihood your issue is with the Weather 34 code and not 
WeeWX.

Gary
On Sunday, 2 January 2022 at 15:28:35 UTC+10 chri...@gmail.com wrote:

> I think I've determined the issue.
>
> The rsync command being generated is missing the quotes:
> I am working with the weather34 folks and they added some debug in the 
> code so we could see the port being issued, which it does but when I issue 
> the command at the command line I get:
> sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/ 
> us...@alberniweather.ca:/home/user/public_html
>
> It is incorrect, the port needs to be in quotes or it ignores -e and uses 
> 22.
> The correct command should be:
>
> sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/ 
> us...@alberniweather.ca:/home/user/public_html
>
>
> On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com wrote:
>
>> I just tried setting port = 27 and it worked. 
>>
>> Either you are using a different weewx.conf than you think you are using, 
>> or it was not set correctly in the [[RSYNC]] section
>>
>> It would really help if you posted the full log. It will tell you which 
>> copy of weewx.conf it is using.
>>
>> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  wrote:
>>
>>> Hi Gary,
>>> Thanks.
>>> Yes I've confirmed rsync works on that port on the computer and from the 
>>> account needed as well as other computers. I have a cronjob using it as 
>>> well.
>>> Here's the Debug with the command. It doesn't seem to mention any port 
>>> so is it ignoring the config for some reason?
>>> I wonder if this is an issue with the Weather34 skin as it appears to be 
>>> the weather34 specific command that it is failing on. (Note I removed the 
>>> IP address of my server from the command.
>>>
>>> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload: 
>>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>>> '/tmp/weather34/serverdata/', 
>>> 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
>>>  
>>>
>>>
>>> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload: 
>>> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
>>> 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']] 
>>> reported errors: ssh: connect to host changed.ip.for.privacy port 22: 
>>> Connection refused. rsync: connection unexpectedly closed (0 bytes received 
>>> so far) [sender]. rsync error: unexplained error (code 255) at io.c(235) 
>>> [sender=3.1.3]
>>>
>>> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>>>
 Hi,

 As far as WeeWX is concerned setting the port config option should be 
 all that's needed. Something like (untested):

 [StdReport]
 
 [[RSYNC]]
 
 port = 27

 If that is not working I suggest you edit weewx.conf and set debug = 1. 
 Save and restart WeeWX. Have a look at the log, the rsync command line 
 being used by WeeWX should appear in the log.

 If the log shows that port 27 is being used by WeeWX then I would be 
 looking elsewhere. Can you rsync with port 27 from the command line? From 
 another machine? Are there any firewalls blocking port 27?

 Gary
 On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:

> Hello all,
>
> I just switched web hosts and they use port 27 for their SSH/RSYNC 
> connections.  I dutifully entered port = 27 into my RSYNC section 
> (previously there was no port line specified) put the log is reporting 
> that 
> it is trying on port 22.
>
> Thoughts?
>
> Cheers, and Happy New Year,
> Chris
>
 -- 
>>> 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/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread Chris Alemany
I think I've determined the issue.

The rsync command being generated is missing the quotes:
I am working with the weather34 folks and they added some debug in the code 
so we could see the port being issued, which it does but when I issue the 
command at the command line I get:
sudo rsync --archive --stats -e ssh -p 27 /var/www/html/weewx/ 
u...@alberniweather.ca:/home/user/public_html

It is incorrect, the port needs to be in quotes or it ignores -e and uses 
22.
The correct command should be:

sudo rsync --archive --stats -e 'ssh -p 27' /var/www/html/weewx/ 
u...@alberniweather.ca:/home/user/public_html


On Saturday, January 1, 2022 at 5:25:27 PM UTC-8 tke...@gmail.com wrote:

> I just tried setting port = 27 and it worked. 
>
> Either you are using a different weewx.conf than you think you are using, 
> or it was not set correctly in the [[RSYNC]] section
>
> It would really help if you posted the full log. It will tell you which 
> copy of weewx.conf it is using.
>
> On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  wrote:
>
>> Hi Gary,
>> Thanks.
>> Yes I've confirmed rsync works on that port on the computer and from the 
>> account needed as well as other computers. I have a cronjob using it as 
>> well.
>> Here's the Debug with the command. It doesn't seem to mention any port so 
>> is it ignoring the config for some reason?
>> I wonder if this is an issue with the Weather34 skin as it appears to be 
>> the weather34 specific command that it is failing on. (Note I removed the 
>> IP address of my server from the command.
>>
>> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>> '/tmp/weather34/serverdata/', 
>> 'us...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']] 
>>
>>
>> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload: 
>> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
>> 'us...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']] 
>> reported errors: ssh: connect to host changed.ip.for.privacy port 22: 
>> Connection refused. rsync: connection unexpectedly closed (0 bytes received 
>> so far) [sender]. rsync error: unexplained error (code 255) at io.c(235) 
>> [sender=3.1.3]
>>
>> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>>
>>> Hi,
>>>
>>> As far as WeeWX is concerned setting the port config option should be 
>>> all that's needed. Something like (untested):
>>>
>>> [StdReport]
>>> 
>>> [[RSYNC]]
>>> 
>>> port = 27
>>>
>>> If that is not working I suggest you edit weewx.conf and set debug = 1. 
>>> Save and restart WeeWX. Have a look at the log, the rsync command line 
>>> being used by WeeWX should appear in the log.
>>>
>>> If the log shows that port 27 is being used by WeeWX then I would be 
>>> looking elsewhere. Can you rsync with port 27 from the command line? From 
>>> another machine? Are there any firewalls blocking port 27?
>>>
>>> Gary
>>> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:
>>>
 Hello all,

 I just switched web hosts and they use port 27 for their SSH/RSYNC 
 connections.  I dutifully entered port = 27 into my RSYNC section 
 (previously there was no port line specified) put the log is reporting 
 that 
 it is trying on port 22.

 Thoughts?

 Cheers, and Happy New Year,
 Chris

>>> -- 
>> 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/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0bcdf64e-4777-4e91-b0f4-1b6710d92361n%40googlegroups.com.


Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread Tom Keffer
I just tried setting port = 27 and it worked.

Either you are using a different weewx.conf than you think you are using,
or it was not set correctly in the [[RSYNC]] section

It would really help if you posted the full log. It will tell you which
copy of weewx.conf it is using.

On Sat, Jan 1, 2022 at 5:10 PM Chris Alemany  wrote:

> Hi Gary,
> Thanks.
> Yes I've confirmed rsync works on that port on the computer and from the
> account needed as well as other computers. I have a cronjob using it as
> well.
> Here's the Debug with the command. It doesn't seem to mention any port so
> is it ignoring the config for some reason?
> I wonder if this is an issue with the Weather34 skin as it appears to be
> the weather34 specific command that it is failing on. (Note I removed the
> IP address of my server from the command.
>
> "Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload:
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh',
> '/tmp/weather34/serverdata/', 
> 'u...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']]
>
>
> Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload:
> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/',
> 'u...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']]
> reported errors: ssh: connect to host changed.ip.for.privacy port 22:
> Connection refused. rsync: connection unexpectedly closed (0 bytes received
> so far) [sender]. rsync error: unexplained error (code 255) at io.c(235)
> [sender=3.1.3]
>
> On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:
>
>> Hi,
>>
>> As far as WeeWX is concerned setting the port config option should be
>> all that's needed. Something like (untested):
>>
>> [StdReport]
>> 
>> [[RSYNC]]
>> 
>> port = 27
>>
>> If that is not working I suggest you edit weewx.conf and set debug = 1.
>> Save and restart WeeWX. Have a look at the log, the rsync command line
>> being used by WeeWX should appear in the log.
>>
>> If the log shows that port 27 is being used by WeeWX then I would be
>> looking elsewhere. Can you rsync with port 27 from the command line? From
>> another machine? Are there any firewalls blocking port 27?
>>
>> Gary
>> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:
>>
>>> Hello all,
>>>
>>> I just switched web hosts and they use port 27 for their SSH/RSYNC
>>> connections.  I dutifully entered port = 27 into my RSYNC section
>>> (previously there was no port line specified) put the log is reporting that
>>> it is trying on port 22.
>>>
>>> Thoughts?
>>>
>>> Cheers, and Happy New Year,
>>> Chris
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAQj7_oPgqeF7NtNq6NCTjFQZA7PdugfEAM-A3bLeAJCw%40mail.gmail.com.


[weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread Chris Alemany
Hi Gary,
Thanks.
Yes I've confirmed rsync works on that port on the computer and from the 
account needed as well as other computers. I have a cronjob using it as 
well.
Here's the Debug with the command. It doesn't seem to mention any port so 
is it ignoring the config for some reason?
I wonder if this is an issue with the Weather34 skin as it appears to be 
the weather34 specific command that it is failing on. (Note I removed the 
IP address of my server from the command.

"Jan  1 16:58:03 weewx-pi weewx[17961] DEBUG weeutil.rsyncupload: 
rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
'/tmp/weather34/serverdata/', 
'u...@changed.ip.for.privacy:/home/user/public_html/weather34/serverdata']] 

Jan  1 16:58:03 weewx-pi weewx[17961] ERROR weeutil.rsyncupload: [['rsync', 
'--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
'u...@changed.ip.for.privacy/home/user/public_html/weather34/serverdata']] 
reported errors: ssh: connect to host changed.ip.for.privacy port 22: 
Connection refused. rsync: connection unexpectedly closed (0 bytes received 
so far) [sender]. rsync error: unexplained error (code 255) at io.c(235) 
[sender=3.1.3]

On Saturday, January 1, 2022 at 4:20:01 PM UTC-8 gjr80 wrote:

> Hi,
>
> As far as WeeWX is concerned setting the port config option should be all 
> that's needed. Something like (untested):
>
> [StdReport]
> 
> [[RSYNC]]
> 
> port = 27
>
> If that is not working I suggest you edit weewx.conf and set debug = 1. 
> Save and restart WeeWX. Have a look at the log, the rsync command line 
> being used by WeeWX should appear in the log.
>
> If the log shows that port 27 is being used by WeeWX then I would be 
> looking elsewhere. Can you rsync with port 27 from the command line? From 
> another machine? Are there any firewalls blocking port 27?
>
> Gary
> On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:
>
>> Hello all,
>>
>> I just switched web hosts and they use port 27 for their SSH/RSYNC 
>> connections.  I dutifully entered port = 27 into my RSYNC section 
>> (previously there was no port line specified) put the log is reporting that 
>> it is trying on port 22.
>>
>> Thoughts?
>>
>> Cheers, and Happy New Year,
>> Chris
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com.


[weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-01 Thread gjr80
Hi,

As far as WeeWX is concerned setting the port config option should be all 
that's needed. Something like (untested):

[StdReport]

[[RSYNC]]

port = 27

If that is not working I suggest you edit weewx.conf and set debug = 1. 
Save and restart WeeWX. Have a look at the log, the rsync command line 
being used by WeeWX should appear in the log.

If the log shows that port 27 is being used by WeeWX then I would be 
looking elsewhere. Can you rsync with port 27 from the command line? From 
another machine? Are there any firewalls blocking port 27?

Gary
On Sunday, 2 January 2022 at 09:43:48 UTC+10 chri...@gmail.com wrote:

> Hello all,
>
> I just switched web hosts and they use port 27 for their SSH/RSYNC 
> connections.  I dutifully entered port = 27 into my RSYNC section 
> (previously there was no port line specified) put the log is reporting that 
> it is trying on port 22.
>
> Thoughts?
>
> Cheers, and Happy New Year,
> Chris
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/98465ae1-70c8-4cb2-b982-d6f902f43b8en%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread Dun Mac
Thank you, Vince (once again). I had used my standard login to create the 
config file and had not created it as the root user. It is now working. 

On Thursday, April 15, 2021 at 1:19:49 PM UTC+10 vince wrote:

> You should not alter your system-wide /etc/ssh/ssh_config at all and you 
> should never get prompted for a password if you have it set up correctly.
>
> That stanza needs to be in root's ssh config file, which likely is 
> /root/.ssh/config 
> on a pi.   Your weewx.conf file needs to use the same 'server = x.x.x.x' 
> setting that the 'host' entry of root's ssh config file uses.
>
> On Wednesday, April 14, 2021 at 5:37:25 PM UTC-7 Dun Mac wrote:
>
>> This is my ~/.ssh/config file;
>> Host 107.xxx.xxx.xxx
>> IdentityFile ~/.ssh/id_rsa
>> User o1
>>
>> When my /etc/ssh/ssh_config file has;
>> PasswordAuthentication no
>> the Rsync fails .. Permission denied 
>> (publickey,gssapi-keyex,gssapi-with-mic,password)..
>>
>> When my /etc/ssh/ssh_config file has;
>> #PasswordAuthentication no
>> the rsync (running wee_reports) requests a password and then the transfer 
>> proceeds correctly
>>
>>
>>
>> On Thursday, April 15, 2021 at 2:54:53 AM UTC+10 vince wrote:
>>
>>> This is rsync 101.You need the account you are running weewx under 
>>> (root) to have a ~/.ssh/config file that tells it which key to use to 
>>> connect to the remote system, as well as which account to use on the remote 
>>> side.
>>>
>>> Host my.remote.host.com
>>>   IdentityFile ~/.ssh/my_private_key
>>>   user my_remote_username
>>>
>>> If you do that, then as root you should be able to rsync to 
>>> my.remote.host.com and it will log in there as my_remote_username
>>> On Tuesday, April 13, 2021 at 11:15:12 PM UTC-7 Dun Mac wrote:
>>>
 Hi, 
 I have established a direct connection to a web server (GreenGeeks) 
 with the SSH keys added to the remote server. I can log on to the remote 
 server via 
 "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
 When I set weewx.conf,  Rsync to true I get the following error message 
 in syslog;

 Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: 
 Running report 'RSYNC'
 Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: 
 Found configuration file /etc/weewx/skins/Rsync/skin.conf for report 
 'RSYNC'
 Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
 rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
 '/var/www/html/weewx/', 
 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
 Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
 [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
 'xxx...@107.x.1xxx.xx:Permission denied 
 (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
 unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
 unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
 reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
 Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: 
 rsync executed in 2.62 seconds

 Would someone be kind enough to post their ~/.ssh/config and their 
 /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
 an error in one of these files with my setup, please. Any other feedback 
 would also be very welcome.
 Duncan

>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6d6bbc0a-1b25-4ab5-a33d-e1999a8762can%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread vince
You should not alter your system-wide /etc/ssh/ssh_config at all and you 
should never get prompted for a password if you have it set up correctly.

That stanza needs to be in root's ssh config file, which likely is 
/root/.ssh/config 
on a pi.   Your weewx.conf file needs to use the same 'server = x.x.x.x' 
setting that the 'host' entry of root's ssh config file uses.

On Wednesday, April 14, 2021 at 5:37:25 PM UTC-7 Dun Mac wrote:

> This is my ~/.ssh/config file;
> Host 107.xxx.xxx.xxx
> IdentityFile ~/.ssh/id_rsa
> User o1
>
> When my /etc/ssh/ssh_config file has;
> PasswordAuthentication no
> the Rsync fails .. Permission denied 
> (publickey,gssapi-keyex,gssapi-with-mic,password)..
>
> When my /etc/ssh/ssh_config file has;
> #PasswordAuthentication no
> the rsync (running wee_reports) requests a password and then the transfer 
> proceeds correctly
>
>
>
> On Thursday, April 15, 2021 at 2:54:53 AM UTC+10 vince wrote:
>
>> This is rsync 101.You need the account you are running weewx under 
>> (root) to have a ~/.ssh/config file that tells it which key to use to 
>> connect to the remote system, as well as which account to use on the remote 
>> side.
>>
>> Host my.remote.host.com
>>   IdentityFile ~/.ssh/my_private_key
>>   user my_remote_username
>>
>> If you do that, then as root you should be able to rsync to 
>> my.remote.host.com and it will log in there as my_remote_username
>> On Tuesday, April 13, 2021 at 11:15:12 PM UTC-7 Dun Mac wrote:
>>
>>> Hi, 
>>> I have established a direct connection to a web server (GreenGeeks) with 
>>> the SSH keys added to the remote server. I can log on to the remote server 
>>> via 
>>> "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
>>> When I set weewx.conf,  Rsync to true I get the following error message 
>>> in syslog;
>>>
>>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: 
>>> Running report 'RSYNC'
>>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found 
>>> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
>>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
>>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>>> '/var/www/html/weewx/', 
>>> 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
>>> Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
>>> [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
>>> 'xxx...@107.x.1xxx.xx:Permission denied 
>>> (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
>>> unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
>>> unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
>>> reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
>>> Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync 
>>> executed in 2.62 seconds
>>>
>>> Would someone be kind enough to post their ~/.ssh/config and their 
>>> /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
>>> an error in one of these files with my setup, please. Any other feedback 
>>> would also be very welcome.
>>> Duncan
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9f2c5b38-94be-450e-8101-0d1c9e219479n%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread Dun Mac
This is my ~/.ssh/config file;
Host 107.xxx.xxx.xxx
IdentityFile ~/.ssh/id_rsa
User o1

When my /etc/ssh/ssh_config file has;
PasswordAuthentication no
the Rsync fails .. Permission denied 
(publickey,gssapi-keyex,gssapi-with-mic,password)..

When my /etc/ssh/ssh_config file has;
#PasswordAuthentication no
the rsync (running wee_reports) requests a password and then the transfer 
proceeds correctly



On Thursday, April 15, 2021 at 2:54:53 AM UTC+10 vince wrote:

> This is rsync 101.You need the account you are running weewx under 
> (root) to have a ~/.ssh/config file that tells it which key to use to 
> connect to the remote system, as well as which account to use on the remote 
> side.
>
> Host my.remote.host.com
>   IdentityFile ~/.ssh/my_private_key
>   user my_remote_username
>
> If you do that, then as root you should be able to rsync to 
> my.remote.host.com and it will log in there as my_remote_username
> On Tuesday, April 13, 2021 at 11:15:12 PM UTC-7 Dun Mac wrote:
>
>> Hi, 
>> I have established a direct connection to a web server (GreenGeeks) with 
>> the SSH keys added to the remote server. I can log on to the remote server 
>> via 
>> "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
>> When I set weewx.conf,  Rsync to true I get the following error message 
>> in syslog;
>>
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: 
>> Running report 'RSYNC'
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found 
>> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>> '/var/www/html/weewx/', 
>> 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
>> Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
>> [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
>> 'xxx...@107.x.1xxx.xx:Permission denied 
>> (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
>> unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
>> unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
>> reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
>> Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync 
>> executed in 2.62 seconds
>>
>> Would someone be kind enough to post their ~/.ssh/config and their 
>> /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
>> an error in one of these files with my setup, please. Any other feedback 
>> would also be very welcome.
>> Duncan
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e77902f9-91ab-46d9-8da9-7566a55a609fn%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread vince
This is rsync 101.You need the account you are running weewx under 
(root) to have a ~/.ssh/config file that tells it which key to use to 
connect to the remote system, as well as which account to use on the remote 
side.

Host my.remote.host.com
  IdentityFile ~/.ssh/my_private_key
  user my_remote_username

If you do that, then as root you should be able to rsync to 
my.remote.host.com and it will log in there as my_remote_username
On Tuesday, April 13, 2021 at 11:15:12 PM UTC-7 Dun Mac wrote:

> Hi, 
> I have established a direct connection to a web server (GreenGeeks) with 
> the SSH keys added to the remote server. I can log on to the remote server 
> via 
> "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
> When I set weewx.conf,  Rsync to true I get the following error message in 
> syslog;
>
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Running 
> report 'RSYNC'
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found 
> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
> '/var/www/html/weewx/', 
> 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
> Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
> [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
> 'xxx...@107.x.1xxx.xx:Permission denied 
> (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
> unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
> unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
> reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
> Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync 
> executed in 2.62 seconds
>
> Would someone be kind enough to post their ~/.ssh/config and their 
> /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
> an error in one of these files with my setup, please. Any other feedback 
> would also be very welcome.
> Duncan
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f5731a9e-f2e9-46be-9c84-54176bebbbe7n%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread tomn...@frontier.com
Are you testing as your own userID, but weewx is running as root?  From the 
command line you can add -v or -vv to your ssh command to get a TON of 
details about the
ssh connection.  Read it slowly and carefully.  Also, you can try the rsync 
by hand as well.  No point trying to debug it within weewx.
On Wednesday, April 14, 2021 at 12:42:54 AM UTC-6 Dun Mac wrote:

> According to the web server the public keys were accepted by the server. 
> They have sent a copy of their logs;
> ###
> Apr 14 03:24:57 ams102 sshd[2890665]: Accepted publickey for offgrid1 from 
> 49.xxx.xxx.xx port 34506 ssh2: RSA 
> SHA256:oMhJCSYLqpgYZ6mYwxcQvedv+hycs5kTOTLfVKhtPRzmGStXdRaHU
> Apr 14 03:24:57 ams102 sshd[2890665]: pam_unix(sshd:session): session 
> opened for user ox1 
> Apr 14 03:26:42 ams102 sshd[2890665]: pam_unix(sshd:session): session 
> closed for user ox1
>
> On Wednesday, April 14, 2021 at 4:15:12 PM UTC+10 Dun Mac wrote:
>
>> Hi, 
>> I have established a direct connection to a web server (GreenGeeks) with 
>> the SSH keys added to the remote server. I can log on to the remote server 
>> via 
>> "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
>> When I set weewx.conf,  Rsync to true I get the following error message 
>> in syslog;
>>
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: 
>> Running report 'RSYNC'
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found 
>> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
>> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>> '/var/www/html/weewx/', 
>> 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
>> Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
>> [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
>> 'xxx...@107.x.1xxx.xx:Permission denied 
>> (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
>> unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
>> unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
>> reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
>> Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync 
>> executed in 2.62 seconds
>>
>> Would someone be kind enough to post their ~/.ssh/config and their 
>> /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
>> an error in one of these files with my setup, please. Any other feedback 
>> would also be very welcome.
>> Duncan
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ef82e35b-160c-4ab2-acca-694ea5dcea35n%40googlegroups.com.


[weewx-user] Re: Rsync connection to remote server

2021-04-14 Thread Dun Mac
According to the web server the public keys were accepted by the server. 
They have sent a copy of their logs;
###
Apr 14 03:24:57 ams102 sshd[2890665]: Accepted publickey for offgrid1 from 
49.xxx.xxx.xx port 34506 ssh2: RSA 
SHA256:oMhJCSYLqpgYZ6mYwxcQvedv+hycs5kTOTLfVKhtPRzmGStXdRaHU
Apr 14 03:24:57 ams102 sshd[2890665]: pam_unix(sshd:session): session 
opened for user ox1 
Apr 14 03:26:42 ams102 sshd[2890665]: pam_unix(sshd:session): session 
closed for user ox1

On Wednesday, April 14, 2021 at 4:15:12 PM UTC+10 Dun Mac wrote:

> Hi, 
> I have established a direct connection to a web server (GreenGeeks) with 
> the SSH keys added to the remote server. I can log on to the remote server 
> via 
> "ssh user...@170.x.xxx.xx" and it logs on with no passwords. 
> When I set weewx.conf,  Rsync to true I get the following error message in 
> syslog;
>
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Running 
> report 'RSYNC'
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found 
> configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'
> Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: 
> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
> '/var/www/html/weewx/', 
> 'xxx...@107.x.xxx.xx:/home//weewx/wx_standard_report']]
> Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: 
> [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', 
> 'xxx...@107.x.1xxx.xx:Permission denied 
> (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection 
> unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: 
> unexplained error (code 255) /home/xxx/weewx/wx_standard_report']] 
> reported errors: xxx...@107.x.xx.xx: at io.c(235) [sender=3.1.3]
> Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync 
> executed in 2.62 seconds
>
> Would someone be kind enough to post their ~/.ssh/config and their 
> /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have 
> an error in one of these files with my setup, please. Any other feedback 
> would also be very welcome.
> Duncan
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/324b8b0a-486b-4816-874e-f085f4189791n%40googlegroups.com.


Re: [weewx-user] Re: RSYNC

2020-06-11 Thread Jose
hi Glenn
you are right. rsync -a --delete -e ssh /home/pi/backup.tar.gz 
 user@ssh.hosting:/www/ backup/  it is working fine now. thanks. 

El jueves, 11 de junio de 2020, 3:37:43 (UTC+2), Glenn McKechnie escribió:
>
> On 11/06/2020, Jose > wrote: 
> [...] 
> > 
> >  rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/ 
> > backup/ &> /dev/null 
> > 
> > this command worked fine in the past but not now. When I run this 
> command 
> > nothing happens, no updating remote hosting and even no error messages. 
> so 
> > RSYNC with WeeWX is working fine but RSYNC in command line don't. 
>
> Just focusing on your statement that you see no errors with the above 
> command. 
> It's doing exactly what you've told it to, that you want no feedback 
> from it, ever. It's dead to you. 
> Send whatever it has to say (&>) to the bit bucket (/dev/null) 
>
> Remove that redirect that you have on the end and it will probably 
> offer up a few clues. 
>
> rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/ 
> backup/ 
>
> -- 
>
>
> Cheers 
>  Glenn 
>
> rorpi - read only raspberry pi & various weewx addons 
> https://github.com/glennmckechnie 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/36663c33-5540-4cf8-a06c-1c006b27a50ao%40googlegroups.com.


Re: [weewx-user] Re: RSYNC

2020-06-10 Thread Glenn McKechnie
On 11/06/2020, Jose  wrote:
[...]
>
>  rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/
> backup/ &> /dev/null
>
> this command worked fine in the past but not now. When I run this command
> nothing happens, no updating remote hosting and even no error messages. so
> RSYNC with WeeWX is working fine but RSYNC in command line don't.

Just focusing on your statement that you see no errors with the above command.
It's doing exactly what you've told it to, that you want no feedback
from it, ever. It's dead to you.
Send whatever it has to say (&>) to the bit bucket (/dev/null)

Remove that redirect that you have on the end and it will probably
offer up a few clues.

rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/ backup/

-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAAraAzib7-a4i29QLD7TPirOEomj5Ntx2Py8NDseT3dCGHYFNA%40mail.gmail.com.


[weewx-user] Re: RSYNC

2020-06-10 Thread Greg from Oz
This works for me
rsync -ruva --delete -e "ssh -l root -i /root/.ssh/id_rsa" 
root@192.168.2.2:/backups/ $FILELOCATION/dmz/

On Thursday, 11 June 2020 07:17:02 UTC+10, Jose wrote:
>
> Hi, 
>
> remote hosting is updated with new files using RSYNC from WeeWX, thank 
> you, but if I am having some problems when I try to do it with 
>
>  rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/
> backup/ &> /dev/null
>
> this command worked fine in the past but not now. When I run this command 
> nothing happens, no updating remote hosting and even no error messages. so 
> RSYNC with WeeWX is working fine but RSYNC in command line don't. 
>
>
>
>
>
>
> El miércoles, 10 de junio de 2020, 14:00:13 (UTC+2), gjr80 escribió:
>>
>> Hi, 
>>
>> By default the WeeWX daemon runs as root, so unless you have changed this 
>> root needs passwordless ssh access to the server to which you wish to sync 
>> your files. Did you give root passwordless ssh access or was it some other 
>> account? If this is the problem you have two choices; either change WeeWX 
>> to run as the user you have given passwordless ssh access or keep WeeWX 
>> running as root and give root passwordless ssh access. 
>>
>> The wiki article ‘Run WeeWX as a non-root user’ (
>> https://github.com/weewx/weewx/wiki/Run-as-a-non-root-user) provides 
>> instructions on how to run WeeWX as a user other than root. 
>>
>> Gary
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c26d1656-bf66-40ba-96cd-cb4b6fcaabfdo%40googlegroups.com.


[weewx-user] Re: RSYNC

2020-06-10 Thread gjr80
My apologies, I thought your problem involved WeeWX rsync not working.

I assume you are trying to execute the command below from the command line 
on your WeeWX machine. As I pointed out in my previous post a common issue 
is that passwordless ssh has been setup for a given user account that is 
different to the user account that is later used to execute the rsync 
command. Are you sure the correct user account (still) has passwordless ssh 
access? If you are convinced this is correct my only other suggest is to 
look at the logs on the target server to see if you can find any 
error/reason for rejection.

Gary

On Thursday, 11 June 2020 07:17:02 UTC+10, Jose wrote:
>
> Hi, 
>
> remote hosting is updated with new files using RSYNC from WeeWX, thank 
> you, but if I am having some problems when I try to do it with 
>
>  rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/
> backup/ &> /dev/null
>
> this command worked fine in the past but not now. When I run this command 
> nothing happens, no updating remote hosting and even no error messages. so 
> RSYNC with WeeWX is working fine but RSYNC in command line don't. 
>
>
>
>
>
>
> El miércoles, 10 de junio de 2020, 14:00:13 (UTC+2), gjr80 escribió:
>>
>> Hi, 
>>
>> By default the WeeWX daemon runs as root, so unless you have changed this 
>> root needs passwordless ssh access to the server to which you wish to sync 
>> your files. Did you give root passwordless ssh access or was it some other 
>> account? If this is the problem you have two choices; either change WeeWX 
>> to run as the user you have given passwordless ssh access or keep WeeWX 
>> running as root and give root passwordless ssh access. 
>>
>> The wiki article ‘Run WeeWX as a non-root user’ (
>> https://github.com/weewx/weewx/wiki/Run-as-a-non-root-user) provides 
>> instructions on how to run WeeWX as a user other than root. 
>>
>> Gary
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d2fab229-db96-40ad-a9f6-f259ca6dd748o%40googlegroups.com.


[weewx-user] Re: RSYNC

2020-06-10 Thread Jose
Hi, 

remote hosting is updated with new files using RSYNC from WeeWX, thank you, 
but if I am having some problems when I try to do it with 

 rsync -a --delete -e ssh /home/pi/backup.tar.gz  user@ssh.hosting:/www/
backup/ &> /dev/null

this command worked fine in the past but not now. When I run this command 
nothing happens, no updating remote hosting and even no error messages. so 
RSYNC with WeeWX is working fine but RSYNC in command line don't. 






El miércoles, 10 de junio de 2020, 14:00:13 (UTC+2), gjr80 escribió:
>
> Hi, 
>
> By default the WeeWX daemon runs as root, so unless you have changed this 
> root needs passwordless ssh access to the server to which you wish to sync 
> your files. Did you give root passwordless ssh access or was it some other 
> account? If this is the problem you have two choices; either change WeeWX 
> to run as the user you have given passwordless ssh access or keep WeeWX 
> running as root and give root passwordless ssh access. 
>
> The wiki article ‘Run WeeWX as a non-root user’ (
> https://github.com/weewx/weewx/wiki/Run-as-a-non-root-user) provides 
> instructions on how to run WeeWX as a user other than root. 
>
> Gary

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1a028115-e0e0-4e14-93ff-b118fb59679fo%40googlegroups.com.


[weewx-user] Re: RSYNC

2020-06-10 Thread Greg from Oz
If weewx is running as root then usually by default the root user is not 
allowed to ssh
Did you try the root@server ssh or were you just using another user?


On Wednesday, 10 June 2020 20:21:43 UTC+10, Jose wrote:
>
> Hi
>
>
> I want to send copy from raspberrypi to a remote server with rsync to 
> update my website with last changes.
> I have verified that I can connect via ssh passwordless using public and 
> private keys with no problem to server (ssh user@server)
> The problem comes when I try to do the same with rsync; an error message 
> says that the remote host cannot be authenticated and connection fails.
> I have modified the / etc / ssh / ssh_config file adding the Host, User 
> and Identityfile (path to .ssh keys) but nothing changes. 
>
> What can I do?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8fc3a4b1-ee3e-4139-8eea-ecdd62d26f2eo%40googlegroups.com.


[weewx-user] Re: rsync fails with host key error in weewx, not from command line

2019-08-21 Thread Chris Richmond
Hi Tony,

  I've set things up (udev, specify pid file path) so I don't have to run 
as root.  Vince, what changed was the FQDN of the filer (changed domain 
names),
so that was the issue.  It's a bit of a learning experience to have two 
local domains.  As an aside, I've got <2 weeks to figure out how
to VPN between them so I can see either end once they aren't literally 
within 3ft of my chair and don't share the same ISP connection.
The wan ports are on the same domain (ISP's router ports), and each router 
(yet more linux boxes) has it's own local domain.
In the meantime, I'm pushing stuff from both sides to an external web 
service, which is what this is related to.

Thx, Chris

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6bb19d36-e9b9-4b6a-9bcc-5685f8259299%40googlegroups.com.


[weewx-user] Re: rsync fails with host key error in weewx, not from command line

2019-08-21 Thread Anthony Fandino
Chris,

Understand that weewx runs as root. host key and id must be in the 
root/.ssh/

hope that helps

Tony

On Wednesday, August 21, 2019 at 9:29:52 AM UTC-4, Chris Richmond wrote:
>
> Hi,
>I'm not new to ssh and all, but this one doesn't make sense. I'm 
> messing around with
> getting a set of hardware together for a move, and in the process ended up 
> with rsync
> errors because of host keys.  So... I removed the hostkey on the weewx end 
> and was
> able to ssh without a password to the NAS.  Still got the error, so 
> checked the reverse
> direction, which also had a problem, so corrected that.  Rechecked both 
> directions this
> morning (by hand) and no problems. *Still* weewx is failing rsync because 
> of host key
> errors.  Any more ideas.
>
> pivue:~> sudo grep rsync /var/log/syslog | tail
> Aug 21 06:25:16 pivue weewx[9927]: rsyncupload: [['rsync', '--archive', 
> '--stats', '-e ssh', '/home/weewx/public_html/', 
> 'weewxfiler2.csrhome.home:/volume1/web/vueweather']] reported errors: 
> Host key verification failed.. rsync: connection unexpectedly closed (0 
> bytes received so far) [sender]. rsync error: error in rsync protocol data 
> stream (code 12) at io.c(235) [sender=3.1.2]
> Aug 21 06:25:16 pivue weewx[9927]: rsyncupload: rsync executed in 0.30 
> seconds
> pivue:~> ssh filer2
>
> weewx@filer2:~$ ssh pivue.csrhome.home
> Linux pivue 4.19.42+ #1219 Tue May 14 21:16:38 BST 2019 armv6l
>
> Last login: Wed Aug 21 06:25:40 2019 from 192.168.2.250
> pivue:~> 
>
> Thx, Chris
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/65793b9b-489b-4029-8b86-8abb61f68dd2%40googlegroups.com.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread Tom Mitchell
Thanks, Vince.


On Tue, Apr 9, 2019 at 11:20 AM vince  wrote:

> On Tuesday, April 9, 2019 at 7:50:17 AM UTC-7, Tom Mitchell wrote:
>>
>> Thanks for the advice. What happens is gcp appends a new entry to my
>> known_hosts file (which already has the hostname and key I use) with a very
>> strange looking one, and then fails to connect after doing it once
>> successfully. I am happy to get it right, but at this point, I just don't
>> understand the rewrite and subsequent behavior.
>>
>>
> Yes - with strict host checking off, you'll get an additional line added
> automatically.   Normally it prompts.  This is ssh-101 (and admittedly a
> little annoying in some circumstances when you try to automate things).
> The known_hosts file containes the 'remote' computer(s) host key(s), not
> your account's key, not your 'local' computer or container's host key.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/qbvL3PX1vDg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread vince
On Tuesday, April 9, 2019 at 7:50:17 AM UTC-7, Tom Mitchell wrote:
>
> Thanks for the advice. What happens is gcp appends a new entry to my 
> known_hosts file (which already has the hostname and key I use) with a very 
> strange looking one, and then fails to connect after doing it once 
> successfully. I am happy to get it right, but at this point, I just don't 
> understand the rewrite and subsequent behavior.
>
>
Yes - with strict host checking off, you'll get an additional line added 
automatically.   Normally it prompts.  This is ssh-101 (and admittedly a 
little annoying in some circumstances when you try to automate things). 
The known_hosts file containes the 'remote' computer(s) host key(s), not 
your account's key, not your 'local' computer or container's host key.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread Tom Mitchell
Thanks for the advice. What happens is gcp appends a new entry to my
known_hosts file (which already has the hostname and key I use) with a very
strange looking one, and then fails to connect after doing it once
successfully. I am happy to get it right, but at this point, I just don't
understand the rewrite and subsequent behavior.

On Tue, Apr 9, 2019 at 10:45 AM vince  wrote:

> On Tuesday, April 9, 2019 at 1:57:25 AM UTC-7, Tom Mitchell wrote:
>>
>> Thanks @gary for the followup. I turned off stricthostkeychecking in the
>> .ssh/config file which resolved it. I don't know exactly this cloud server
>> does this, but it works and I am not going to dig too deep on it.
>>
>>
>>
> That's usually a really bad idea.  Strict host checking tries to make sure
> that you're not connecting to an imposter computer using the same ip
> address as the one you're trying to connect to.   What rsync is doing is
> saying "hey - I don't know who that remote system is, is this ok?" and
> asking for verification.   Very normal ssh behavior.
>
> If you're building a docker container to run weewx, you could have your
> container build proces create its ~/.ssh/known_hosts file with the host key
> for the system you typically connect to, if you have stable host keys on
> the system you're rsync'ing to (which is usually the case).  That's a far
> more secure way of doing things.
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/qbvL3PX1vDg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread vince
On Tuesday, April 9, 2019 at 1:57:25 AM UTC-7, Tom Mitchell wrote:
>
> Thanks @gary for the followup. I turned off stricthostkeychecking in the 
> .ssh/config file which resolved it. I don't know exactly this cloud server 
> does this, but it works and I am not going to dig too deep on it.
>
>
>
That's usually a really bad idea.  Strict host checking tries to make sure 
that you're not connecting to an imposter computer using the same ip 
address as the one you're trying to connect to.   What rsync is doing is 
saying "hey - I don't know who that remote system is, is this ok?" and 
asking for verification.   Very normal ssh behavior.

If you're building a docker container to run weewx, you could have your 
container build proces create its ~/.ssh/known_hosts file with the host key 
for the system you typically connect to, if you have stable host keys on 
the system you're rsync'ing to (which is usually the case).  That's a far 
more secure way of doing things.



-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread gjr80
Well you're way ahead of me. Main thing is it works.

Gary

On Tuesday, 9 April 2019 18:57:25 UTC+10, Tom Mitchell wrote:
>
> Thanks @gary for the followup. I turned off stricthostkeychecking in the 
> .ssh/config file which resolved it. I don't know exactly this cloud server 
> does this, but it works and I am not going to dig too deep on it.
>
> Thanks again.
>
>
>
> On Mon, Apr 8, 2019 at 10:50 PM gjr80 > 
> wrote:
>
>> Hi,
>>
>> Certainly seen the same message before but can't say it was under the 
>> same circumstances though. No ssh/rsync expert but just thinking aloud as 
>> to what you could do; have you tried running rsync (repeatedly) from the 
>> command line with the same credentials so you can see/deal with anything it 
>> throws up? Have you tried removing the cached key for foo.bar.com with:
>>
>> $ ssh-keygen -R 192.168.1.123
>>
>> Gary
>>
>>
>> On Sunday, 7 April 2019 06:26:33 UTC+10, Tom Mitchell wrote:
>>>
>>> Hello,
>>>
>>> weewx 3.8.2 running in a Docker container. Connecting the the database 
>>> just fine and using the Simulator. I have rsync configured to upload to a 
>>> cloud host.
>>>
>>> First time through, the report upload works fine:
>>>
>>> weewx[9]: reportengine: Running report RSYNC
>>> weewx[9]: reportengine: Found configuration file 
>>> /home/weewx/skins/Rsync/skin.conf for report RSYNC
>>> weewx[9]: manager: Added record 2019-04-06 16:05:17 EDT (1554581117) to 
>>> database 'weewx_local'
>>> LOOP:   2019-04-06 16:05:17 EDT (1554581117) altimeter: 32.3940721833, 
>>> appTemp: 28.369127419, barometer: 32.3429914465, cloudbase: 1295.87222115, 
>>> dateTime: 1554581117, dewpoint: 27.1243263624, heatindex: 32.5973641355, 
>>> humidex: 32.5973641355, inDewpoint: 31.0794006064, inHumidity: 
>>> 29.999657861, inTemp: 63.0001710695, maxSolarRad: 495.258619499, 
>>> outHumidity: 79.9997433946, outTemp: 32.5973641355, pressure: 
>>> 32.3429914465, radiation: 230.36959363, rain: 0, rainRate: 0, usUnits: 1, 
>>> UV: 3.22517431082, windchill: 32.5973641355, windDir: 359.998460368, 
>>> windGust: 5.13210704991e-05, windGustDir: 359.998460368, windSpeed: 
>>> 4.27675587487e-05
>>> weewx[9]: rsyncupload: rsync'd 160 files (271,814 bytes) in 2.10 seconds
>>>
>>> But on the subsequent passes, it acts like it doesn't recognize the 
>>> upload host:
>>>
>>> weewx[9]: reportengine: Running report RSYNC
>>> weewx[9]: reportengine: Found configuration file 
>>> /home/weewx/skins/Rsync/skin.conf for report RSYNC
>>> The authenticity of host 'foo.bar.com (a.b.c.d)' can't be established.
>>> ECDSA key fingerprint is a8:17:90:cd:08:5d:3f:84:8d:b3:9d:91:3d:e0:e2:68.
>>> Are you sure you want to continue connecting (yes/no)? weewx[9]: 
>>> manager: Added record 2019-04-06 16:10:17 EDT (1554581417) to database 
>>> 'weewx_local'
>>> LOOP:   2019-04-06 16:10:17 EDT (1554581417) altimeter: 32.3939674154, 
>>> appTemp: 28.1327127704, barometer: 32.3428868355, cloudbase: 1294.87161178, 
>>> dateTime: 1554581417, dewpoint: 26.9178545608, heatindex: 32.3864896527, 
>>> humidex: 32.38648965
>>>
>>> I do have a known_hosts file in /home/weewx/.ssh
>>> I am able to ssh in as the username configured in weewx without being 
>>> prompted.
>>>
>>> [[RSYNC]]
>>> # rsync'ing to a webserver is treated as just another report
>>> skin = Rsync
>>>
>>> # If you wish to use rsync, you must configure passwordless ssh using
>>> # public/private key authentication from the user account that weewx
>>> # runs as to the user account on the remote machine where the files
>>> # will be copied.
>>> #
>>> # The following three lines determine where files will be sent.
>>> server = foo.bar.com
>>> path = /home/tom/html/local/
>>> user = tom
>>>
>>> # Rsync can be configured to remove files from the remote server if
>>> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
>>> # make a mistake in the remote path, you could could unintentionally
>>> # cause unrelated files to be deleted. Set to 1 to enable remote file
>>> # deletion, zero to allow files to accumulate remotely.
>>> delete = 0
>>>
>>> Curious of anyone has ever seen this before.
>>>
>>> Thanks in advance.
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/qbvL3PX1vDg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: RSync failing after the first upload

2019-04-09 Thread Tom Mitchell
Thanks @gary for the followup. I turned off stricthostkeychecking in the
.ssh/config file which resolved it. I don't know exactly this cloud server
does this, but it works and I am not going to dig too deep on it.

Thanks again.



On Mon, Apr 8, 2019 at 10:50 PM gjr80  wrote:

> Hi,
>
> Certainly seen the same message before but can't say it was under the same
> circumstances though. No ssh/rsync expert but just thinking aloud as to
> what you could do; have you tried running rsync (repeatedly) from the
> command line with the same credentials so you can see/deal with anything it
> throws up? Have you tried removing the cached key for foo.bar.com with:
>
> $ ssh-keygen -R 192.168.1.123
>
> Gary
>
>
> On Sunday, 7 April 2019 06:26:33 UTC+10, Tom Mitchell wrote:
>>
>> Hello,
>>
>> weewx 3.8.2 running in a Docker container. Connecting the the database
>> just fine and using the Simulator. I have rsync configured to upload to a
>> cloud host.
>>
>> First time through, the report upload works fine:
>>
>> weewx[9]: reportengine: Running report RSYNC
>> weewx[9]: reportengine: Found configuration file
>> /home/weewx/skins/Rsync/skin.conf for report RSYNC
>> weewx[9]: manager: Added record 2019-04-06 16:05:17 EDT (1554581117) to
>> database 'weewx_local'
>> LOOP:   2019-04-06 16:05:17 EDT (1554581117) altimeter: 32.3940721833,
>> appTemp: 28.369127419, barometer: 32.3429914465, cloudbase: 1295.87222115,
>> dateTime: 1554581117, dewpoint: 27.1243263624, heatindex: 32.5973641355,
>> humidex: 32.5973641355, inDewpoint: 31.0794006064, inHumidity:
>> 29.999657861, inTemp: 63.0001710695, maxSolarRad: 495.258619499,
>> outHumidity: 79.9997433946, outTemp: 32.5973641355, pressure:
>> 32.3429914465, radiation: 230.36959363, rain: 0, rainRate: 0, usUnits: 1,
>> UV: 3.22517431082, windchill: 32.5973641355, windDir: 359.998460368,
>> windGust: 5.13210704991e-05, windGustDir: 359.998460368, windSpeed:
>> 4.27675587487e-05
>> weewx[9]: rsyncupload: rsync'd 160 files (271,814 bytes) in 2.10 seconds
>>
>> But on the subsequent passes, it acts like it doesn't recognize the
>> upload host:
>>
>> weewx[9]: reportengine: Running report RSYNC
>> weewx[9]: reportengine: Found configuration file
>> /home/weewx/skins/Rsync/skin.conf for report RSYNC
>> The authenticity of host 'foo.bar.com (a.b.c.d)' can't be established.
>> ECDSA key fingerprint is a8:17:90:cd:08:5d:3f:84:8d:b3:9d:91:3d:e0:e2:68.
>> Are you sure you want to continue connecting (yes/no)? weewx[9]: manager:
>> Added record 2019-04-06 16:10:17 EDT (1554581417) to database 'weewx_local'
>> LOOP:   2019-04-06 16:10:17 EDT (1554581417) altimeter: 32.3939674154,
>> appTemp: 28.1327127704, barometer: 32.3428868355, cloudbase: 1294.87161178,
>> dateTime: 1554581417, dewpoint: 26.9178545608, heatindex: 32.3864896527,
>> humidex: 32.38648965
>>
>> I do have a known_hosts file in /home/weewx/.ssh
>> I am able to ssh in as the username configured in weewx without being
>> prompted.
>>
>> [[RSYNC]]
>> # rsync'ing to a webserver is treated as just another report
>> skin = Rsync
>>
>> # If you wish to use rsync, you must configure passwordless ssh using
>> # public/private key authentication from the user account that weewx
>> # runs as to the user account on the remote machine where the files
>> # will be copied.
>> #
>> # The following three lines determine where files will be sent.
>> server = foo.bar.com
>> path = /home/tom/html/local/
>> user = tom
>>
>> # Rsync can be configured to remove files from the remote server if
>> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
>> # make a mistake in the remote path, you could could unintentionally
>> # cause unrelated files to be deleted. Set to 1 to enable remote file
>> # deletion, zero to allow files to accumulate remotely.
>> delete = 0
>>
>> Curious of anyone has ever seen this before.
>>
>> Thanks in advance.
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/qbvL3PX1vDg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: RSync failing after the first upload

2019-04-08 Thread gjr80
Hi,

Certainly seen the same message before but can't say it was under the same 
circumstances though. No ssh/rsync expert but just thinking aloud as to 
what you could do; have you tried running rsync (repeatedly) from the 
command line with the same credentials so you can see/deal with anything it 
throws up? Have you tried removing the cached key for foo.bar.com with:

$ ssh-keygen -R 192.168.1.123

Gary


On Sunday, 7 April 2019 06:26:33 UTC+10, Tom Mitchell wrote:
>
> Hello,
>
> weewx 3.8.2 running in a Docker container. Connecting the the database 
> just fine and using the Simulator. I have rsync configured to upload to a 
> cloud host.
>
> First time through, the report upload works fine:
>
> weewx[9]: reportengine: Running report RSYNC
> weewx[9]: reportengine: Found configuration file 
> /home/weewx/skins/Rsync/skin.conf for report RSYNC
> weewx[9]: manager: Added record 2019-04-06 16:05:17 EDT (1554581117) to 
> database 'weewx_local'
> LOOP:   2019-04-06 16:05:17 EDT (1554581117) altimeter: 32.3940721833, 
> appTemp: 28.369127419, barometer: 32.3429914465, cloudbase: 1295.87222115, 
> dateTime: 1554581117, dewpoint: 27.1243263624, heatindex: 32.5973641355, 
> humidex: 32.5973641355, inDewpoint: 31.0794006064, inHumidity: 
> 29.999657861, inTemp: 63.0001710695, maxSolarRad: 495.258619499, 
> outHumidity: 79.9997433946, outTemp: 32.5973641355, pressure: 
> 32.3429914465, radiation: 230.36959363, rain: 0, rainRate: 0, usUnits: 1, 
> UV: 3.22517431082, windchill: 32.5973641355, windDir: 359.998460368, 
> windGust: 5.13210704991e-05, windGustDir: 359.998460368, windSpeed: 
> 4.27675587487e-05
> weewx[9]: rsyncupload: rsync'd 160 files (271,814 bytes) in 2.10 seconds
>
> But on the subsequent passes, it acts like it doesn't recognize the upload 
> host:
>
> weewx[9]: reportengine: Running report RSYNC
> weewx[9]: reportengine: Found configuration file 
> /home/weewx/skins/Rsync/skin.conf for report RSYNC
> The authenticity of host 'foo.bar.com (a.b.c.d)' can't be established.
> ECDSA key fingerprint is a8:17:90:cd:08:5d:3f:84:8d:b3:9d:91:3d:e0:e2:68.
> Are you sure you want to continue connecting (yes/no)? weewx[9]: manager: 
> Added record 2019-04-06 16:10:17 EDT (1554581417) to database 'weewx_local'
> LOOP:   2019-04-06 16:10:17 EDT (1554581417) altimeter: 32.3939674154, 
> appTemp: 28.1327127704, barometer: 32.3428868355, cloudbase: 1294.87161178, 
> dateTime: 1554581417, dewpoint: 26.9178545608, heatindex: 32.3864896527, 
> humidex: 32.38648965
>
> I do have a known_hosts file in /home/weewx/.ssh
> I am able to ssh in as the username configured in weewx without being 
> prompted.
>
> [[RSYNC]]
> # rsync'ing to a webserver is treated as just another report
> skin = Rsync
>
> # If you wish to use rsync, you must configure passwordless ssh using
> # public/private key authentication from the user account that weewx
> # runs as to the user account on the remote machine where the files
> # will be copied.
> #
> # The following three lines determine where files will be sent.
> server = foo.bar.com
> path = /home/tom/html/local/
> user = tom
>
> # Rsync can be configured to remove files from the remote server if
> # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
> # make a mistake in the remote path, you could could unintentionally
> # cause unrelated files to be deleted. Set to 1 to enable remote file
> # deletion, zero to allow files to accumulate remotely.
> delete = 0
>
> Curious of anyone has ever seen this before.
>
> Thanks in advance.
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Rsync vs FTP - which to choose/what are the pros and cons?

2018-10-08 Thread Thomas Keffer
Good suggestion. Done in commit 790715

.

On Mon, Oct 8, 2018 at 5:33 AM Philip Kutzenco  wrote:

> Thomas,
>
> Can I make a request that the Rsync block in the initially default
> weewx.conf file be updated (for the next version) to include the following
> lines (which are included in the default weewx.conf FTP block but not the
> default weewx.conf RSYNC block):
>
> # To upload files from something other than what HTML_ROOT is set
> # to above, specify a different HTML_ROOT here.
> #HTML_ROOT = public_html
>
> It may be obvious to others, but it wasn't to me initially, that you need
> to specify that variable in the block to upload files generated by a
> specific skin. If you don't add an explicit HTML_ROOT definition in that
> block, the default HTML_ROOT definition from the beginning of weewx.conf is
> used.
>
> By the way, I've gotten my external website set up and working great using
> Rsync to feed my weewx output files there. Thanks to everyone for weewx
> help and to you, in particular, for the terrific weewx software!!
>
> phil
>
> On Friday, October 5, 2018 at 5:26:09 PM UTC-4, Philip Kutzenco wrote:
>>
>> I am moving my weewx web server output to an outside hoster. What
>> considerations should I take into account to decide whether to use Rsync or
>> FTP (both should be available to me). I've looked at the user guide
>> sections for both options and (optimistically) believe I will be able to
>> set up either.
>>
>> What are the pros & cons of each method?
>>
>> Apologies if this question has been asked/answered before. If so, please
>> point me to the discussion or wiki topic.
>>
>> phil
>>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Rsync vs FTP - which to choose/what are the pros and cons?

2018-10-08 Thread Philip Kutzenco
Thomas,

Can I make a request that the Rsync block in the initially default 
weewx.conf file be updated (for the next version) to include the following 
lines (which are included in the default weewx.conf FTP block but not the 
default weewx.conf RSYNC block):

# To upload files from something other than what HTML_ROOT is set
# to above, specify a different HTML_ROOT here.
#HTML_ROOT = public_html

It may be obvious to others, but it wasn't to me initially, that you need 
to specify that variable in the block to upload files generated by a 
specific skin. If you don't add an explicit HTML_ROOT definition in that 
block, the default HTML_ROOT definition from the beginning of weewx.conf is 
used.

By the way, I've gotten my external website set up and working great using 
Rsync to feed my weewx output files there. Thanks to everyone for weewx 
help and to you, in particular, for the terrific weewx software!!

phil

On Friday, October 5, 2018 at 5:26:09 PM UTC-4, Philip Kutzenco wrote:
>
> I am moving my weewx web server output to an outside hoster. What 
> considerations should I take into account to decide whether to use Rsync or 
> FTP (both should be available to me). I've looked at the user guide 
> sections for both options and (optimistically) believe I will be able to 
> set up either.
>
> What are the pros & cons of each method?
>
> Apologies if this question has been asked/answered before. If so, please 
> point me to the discussion or wiki topic.
>
> phil
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: rsync to two different servers

2017-01-20 Thread gjr80
I run mutliple RSYNC reports, albeit to the same server but different with 
different HTML_ROOT settings. Can't see why it wont work, its just another 
report with its own settings.

Gary

On Saturday, 21 January 2017 11:15:11 UTC+10, vince wrote:
>
> Would weewx support rsync to 'two' remote servers ?
>
> I'm going to be moving my site to a different ISP and have the new server 
> online but haven't repointed DNS at it yet.  If I set up multiple blocks in 
> weewx ala the [RSYNC] one, just with a different name ala [RSYNC2] with the 
> appropriate remote info in it for the new site, would weewx run the rsync 
> skin twice essentially and synchronize up to both locations ?
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.