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 
> <https://github.com/weewx/weewx/commit/68bf6c40332d37b9999db7b2e81803edb4141fb9>,
>  
> to appear in V4.6.
>
>
> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer <tke...@gmail.com> 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 <chri...@gmail.com> 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 <chri...@gmail.com> 
>>>>>> 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
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/weewx-user/1d922b4e-66d1-4a3e-a20c-1aed297fea1an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/90fc5657-4737-4d45-9987-416f5261fb28n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/90fc5657-4737-4d45-9987-416f5261fb28n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0a630ac6-2082-44c8-9242-f82ec69d7c07n%40googlegroups.com.

Reply via email to