I've tried to change weewx.service but without results.
Telent doesn't echo anything.
The network should work because the old weewx (3.8.xxx) on the other 
webserver is working.

Il giorno martedì 30 aprile 2024 alle 19:03:43 UTC+2 Tom Keffer ha scritto:

> I am wondering whether the network is up and running by the time weewxd 
> tries to access it. Try editing your weewx systemd service file (normally 
> located in /lib/systemd/system/weewx.service) so it looks something like 
> the following:
>
> [Unit]
> Description=WeeWX
> Documentation=https://weewx.com/docs
> Requires=time-sync.target
> After=time-sync.target
> After=network-online.target
> Requires=network-online.target
>
> Then
>
> *sudo systemctl daemon-reload*
> *sudo systemctl restart weewx*
>
> If that doesn't work, we can try putting a sleep command in the startup.
>
> Also, can you telnet to the logger and perform the logger TEST function? 
> The IP address of your logger got cut off in the log, but it would look 
> something like this (replace 140.105.xxx.yyy with the IP address):
>
> telnet 140.105.xxx.yyy 22222
> press <enter> a few times.
> Then type "TEST", all caps. It will not echo.
> then <enter>
> The logger should respond with "TEST".
>
>
>
>
> On Tue, Apr 30, 2024 at 9:21 AM Marco Citossi <mcit...@gmail.com> wrote:
>
>> Yes it's ethernet.
>>
>> Here it is the log:
>>
>>
>> apr 30 18:07:10 web4.xxx systemd[1]: Started WeeWX.
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Initializing 
>> weewxd version 5.0.2
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Command line: 
>> /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Using Python 3.6.8 
>> (default, Jan 16 2024, 02:08:59) 
>>
>>                                                  [GCC 8.5.0 20210514 (Red 
>> Hat 8.5.0-20.0.1)]
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Located at 
>> /usr/bin/python3
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Platform 
>> Linux-5.4.17-2136.330.7.1.el8uek.x86_64-x86_64-with-oracle-8.9
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Locale: 
>> 'en_US.UTF-8'
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Entry path: 
>> /usr/share/weewx/weewxd.py
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: WEEWX_ROOT: 
>> /etc/weewx
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Configuration 
>> file: /etc/weewx/weewx.conf
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: User module: 
>> /etc/weewx/bin/user
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO __main__: Debug: 1
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: DEBUG __main__: Initializing 
>> engine
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: INFO weewx.engine: Loading 
>> station type Vantage (weewx.drivers.vantage)
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: DEBUG weewx.drivers.vantage: 
>> Driver version is 3.6.2
>>
>> apr 30 18:07:10 web4.xxx weewxd[22596]: DEBUG weewx.drivers.vantage: 
>> Option loop_request=1
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: ERROR weewx.drivers.vantage: 
>> Socket error while opening port 22222 to ethernet host 140.105.>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: ERROR weewx.engine: Import of 
>> driver failed: timed out (<class 'weewx.WeeWxIOError'>)
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>> Traceback (most recent call last):
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 35>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     self.socket.connect((self.host, self.port))
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>> socket.timeout: timed out
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>> During handling of the above exception, another exception o>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>> Traceback (most recent call last):
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/engine.py", line 115, in set>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     self.console = loader_function(config_dict, self)
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 32>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     return VantageService(engine, config_dict)
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 20>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     Vantage.__init__(self, **config_dict[DRIVER_NAME])
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 53>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     self.port.openPort()
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 35>
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>>     raise weewx.WeeWxIOError(ex)
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL weewx.engine:     ****  
>> weewx.WeeWxIOError: timed out
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL __main__: Unable to load 
>> driver: timed out
>>
>> apr 30 18:07:14 web4.xxx weewxd[22596]: CRITICAL __main__:     ****  
>> Exiting...
>>
>> apr 30 18:07:14 web4.xxx systemd[1]: weewx.service: Main process exited, 
>> code=exited, status=4/NOPERMISSION
>>
>> apr 30 18:07:14 web4.xxx systemd[1]: weewx.service: Failed with result 
>> 'exit-code'.
>>
>> Il giorno martedì 30 aprile 2024 alle 16:54:54 UTC+2 Tom Keffer ha 
>> scritto:
>>
>>> Apologies. You have an ethernet device, right? So, it's going to connect 
>>> to a network port, not a USB port. 
>>>
>>> Could you please post the full log? The systemctl status reports are 
>>> very brief and don't give line numbers.
>>>
>>> Set debug=1, then try restarting weewx. Post the log.
>>>
>>> Thanks.
>>>
>>> On Tue, Apr 30, 2024 at 4:28 AM Marco Citossi <mcit...@gmail.com> wrote:
>>>
>>>> the problem is that if I stop the service and I restart it works for 
>>>> just a glimpse. I try again status and I get the error.
>>>>
>>>> weewx.service - WeeWX
>>>>
>>>>    Loaded: loaded (/usr/lib/systemd/system/weewx.service; enabled; 
>>>> vendor preset: disabled)
>>>>
>>>>    Active: active (running) since Tue 2024-04-30 12:00:53 CEST; 4s ago
>>>>
>>>>      Docs: https://weewx.com/docs
>>>>
>>>>  Main PID: 19495 (python3)
>>>>
>>>>     Tasks: 1 (limit: 48736)
>>>>
>>>>    Memory: 9.1M
>>>>
>>>>    CGroup: /system.slice/weewx.service
>>>>
>>>>            └─19495 python3 /usr/share/weewx/weewxd.py 
>>>> /etc/weewx/weewx.conf
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Il giorno martedì 30 aprile 2024 alle 09:57:26 UTC+2 Marco Citossi ha 
>>>> scritto:
>>>>
>>>>> The device has an ethernet port. Now it is working in another 
>>>>> webserver.
>>>>> I've also tried to stop the service in the other web server but the 
>>>>> result is the same.
>>>>> If I do lsusb I don't get anything.
>>>>>
>>>>> Il giorno lunedì 29 aprile 2024 alle 20:14:20 UTC+2 Tom Keffer ha 
>>>>> scritto:
>>>>>
>>>>>> It seems that your device is not being recognized by the udev rule, 
>>>>>> perhaps because it is has an ethernet port. 
>>>>>>
>>>>>> Check the vendor and product ID of your logger with the command 
>>>>>> "lsusb". It will output something like
>>>>>>
>>>>>> Bus 001 Device 003: ID 18e8:6238 Qcom 
>>>>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>>> Bus 002 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. 
>>>>>> CP2102/CP2109 UART Bridge Controller [CP210x family]
>>>>>> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>>>>>>
>>>>>> In this case, 10c4 is the vendor ID and ea60 is the product id. 
>>>>>> Substitute whatever values you get for the "idVendor" and "idProduct" 
>>>>>> fields, respectively, in the rules file. Then unplug the logger and plug 
>>>>>> it 
>>>>>> back in again.
>>>>>>
>>>>>> See what you get for ownership after that.
>>>>>>
>>>>>> -tk
>>>>>>
>>>>>>
>>>>>> On Mon, Apr 29, 2024 at 10:05 AM Marco Citossi <mcit...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi! 
>>>>>>>
>>>>>>> I've checked the article you suggested and looking the permissions 
>>>>>>> in /etc/udev/rules.d/60-weewx.rules I see in the file:
>>>>>>>
>>>>>>>
>>>>>>> *# davis vantage via usb-serial*
>>>>>>>
>>>>>>>
>>>>>>> SUBSYSTEM=="tty",ATTRS{idVendor}=="10c4",ATTRS{idProduct}=="ea60",MODE="0664",GROUP="weewx",SYMLINK+="vantage"
>>>>>>>
>>>>>>>
>>>>>>> SUBSYSTEM=="tty",ATTRS{idVendor}=="10c4",ATTR{idProduct}=="ea61",MODE="0664",GROUP="weewx",SYMLINK+="vantage"
>>>>>>>
>>>>>>>
>>>>>>> It seems already ok.
>>>>>>>
>>>>>>>
>>>>>>> If I try with ls -l /dev/ttyS0 I get:
>>>>>>>
>>>>>>>
>>>>>>> crw-rw---- 1 root dialout 4, 64 28 apr 23.12 /dev/ttyS0
>>>>>>>
>>>>>>>
>>>>>>> and it seems ok.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Il giorno lunedì 29 aprile 2024 alle 18:52:45 UTC+2 Tom Keffer ha 
>>>>>>> scritto:
>>>>>>>
>>>>>>>> Looks like a permissions issue accessing the port. See the wiki 
>>>>>>>> article How to fix device permissions 
>>>>>>>> <https://github.com/weewx/weewx/wiki/Understanding-permissions#how-to-fix-device-permissions>
>>>>>>>>  and 
>>>>>>>> see if that helps.
>>>>>>>>
>>>>>>>> On Mon, Apr 29, 2024 at 9:48 AM Marco Citossi <mcit...@gmail.com> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi! I've installed weewx in Oracle Linux 8.9 following the guide 
>>>>>>>>> for RedHat.
>>>>>>>>>
>>>>>>>>> The installation has completed without errors. It has been 
>>>>>>>>> installed in default folders,  in /var/www/html/weewx (weewx:weewx), 
>>>>>>>>> /usr/share/weewx (root:root) and /etc/weewx (weewx:weewx) for bin and 
>>>>>>>>> weewx.conf
>>>>>>>>>
>>>>>>>>> Only weewx.conf is root:weewx.
>>>>>>>>>
>>>>>>>>> Device driver is VantagePro2 , ethernet port.
>>>>>>>>>
>>>>>>>>> Old installation (3.8.0a1) in old web server is working.
>>>>>>>>>
>>>>>>>>>  
>>>>>>>>>
>>>>>>>>> When I try to start weewx, it starts for a while then I get this 
>>>>>>>>> error:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ● weewx.service - WeeWX
>>>>>>>>>
>>>>>>>>>    Loaded: loaded (/usr/lib/systemd/system/weewx.service; enabled; 
>>>>>>>>> vendor preset: disabled)
>>>>>>>>>
>>>>>>>>>    Active: failed (Result: exit-code) since Mon 2024-04-29 
>>>>>>>>> 18:23:46 CEST; 14s ago
>>>>>>>>>
>>>>>>>>>      Docs: https://weewx.com/docs
>>>>>>>>>
>>>>>>>>>   Process: 11571 ExecStart=/usr/bin/weewxd /etc/weewx/weewx.conf 
>>>>>>>>> (code=exited, status=4)
>>>>>>>>>
>>>>>>>>>  Main PID: 11571 (code=exited, status=4)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******      Vantage.*__init__*(self, **config_d>
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******    File "/usr/share/weewx/weewx/driver>
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******      self.port.openPort()
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******    File "/usr/share/weewx/weewx/driver>
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******      raise weewx.WeeWxIOError(ex)
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL weewx.engine:     
>>>>>>>>> ******  weewx.WeeWxIOError: timed out
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL *__main__*: 
>>>>>>>>> Unable to load driver: timed out
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx weewxd[11571]: CRITICAL *__main__*:     
>>>>>>>>> ******  Exiting...
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx systemd[1]: weewx.service: Main process 
>>>>>>>>> exited, code=exited, status=4/NOPERMISSION
>>>>>>>>>
>>>>>>>>> apr 29 18:23:46 web4.xxx systemd[1]: weewx.service: Failed with 
>>>>>>>>> result 'exit-code'.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> If I do a restart for a while I get: 
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> weewx.service - WeeWX
>>>>>>>>>
>>>>>>>>>    Loaded: loaded (/usr/lib/systemd/system/weewx.service; enabled; 
>>>>>>>>> vendor preset: disabled)
>>>>>>>>>
>>>>>>>>>    Active: active (running) since Mon 2024-04-29 18:32:53 CEST; 3s 
>>>>>>>>> ago
>>>>>>>>>
>>>>>>>>>      Docs: https://weewx.com/docs
>>>>>>>>>
>>>>>>>>>  Main PID: 11671 (python3)
>>>>>>>>>
>>>>>>>>>     Tasks: 1 (limit: 48736)
>>>>>>>>>
>>>>>>>>>    Memory: 11.3M
>>>>>>>>>
>>>>>>>>>    CGroup: /system.slice/weewx.service
>>>>>>>>>
>>>>>>>>>            └─11671 python3 /usr/share/weewx/weewxd.py 
>>>>>>>>> /etc/weewx/weewx.conf
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: Locale: 
>>>>>>>>> 'en_US.UTF-8'
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: Entry 
>>>>>>>>> path: /usr/share/weewx/weewxd.py
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: 
>>>>>>>>> WEEWX_ROOT: /etc/weewx
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: 
>>>>>>>>> Configuration file: /etc/weewx/weewx.conf
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: User 
>>>>>>>>> module: /etc/weewx/bin/user
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO *__main__*: Debug: 1
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: DEBUG *__main__*: 
>>>>>>>>> Initializing engine
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: INFO weewx.engine: Loading 
>>>>>>>>> station type Vantage (weewx.drivers.vantage)
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: DEBUG 
>>>>>>>>> weewx.drivers.vantage: Driver version is 3.6.2
>>>>>>>>>
>>>>>>>>> apr 29 18:32:53 web4.xxx weewxd[11671]: DEBUG 
>>>>>>>>> weewx.drivers.vantage: Option loop_request=1
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> 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/68ba097e-fc7d-4812-bd1c-64e0b2266f68n%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/68ba097e-fc7d-4812-bd1c-64e0b2266f68n%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/7fd824ba-0097-4ace-a8af-2e77a7c0e7f4n%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/weewx-user/7fd824ba-0097-4ace-a8af-2e77a7c0e7f4n%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/13d39773-b506-4e85-9d97-537018ff82f4n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/13d39773-b506-4e85-9d97-537018ff82f4n%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/c9a9bf78-6507-47a7-a2e7-20a35e18d3ffn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/c9a9bf78-6507-47a7-a2e7-20a35e18d3ffn%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/e4cdb671-ea72-49bb-ac93-105af06fdfdan%40googlegroups.com.

Reply via email to