WeeWX updated - Restart of Service failed

173 views
Skip to first unread message

Uwe S.

unread,
Feb 11, 2024, 8:21:48 AM2/11/24
to weewx-user
Morning everyone,

i have updated my WeeWX installation (Installed on Debian Bookworm in a Proxmox container) using the apt-update command.

But the service can't be started anymore, it throws this error which i am unable so solve with my limited Python skills:

Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__: Caught unrecoverable exception:
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  module 'weeutil.weeutil' has no attribute 'log_traceback'
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  Traceback (most recent call last):
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/crt.py", line 550, in handle_data
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      self.write_data(self.realtime_txt,
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/crt.py", line 567, in write_data
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      with open(filename, 'w') as f:
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****           ^^^^^^^^^^^^^^^^^^^
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  PermissionError: [Errno 13] Permission denied: '/var/tmp/realtime.txt'
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  Traceback (most recent call last):
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      engine.run()
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 206, in run
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last):
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", line 550, in handle_data
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      callback(event)
Feb 11 09:16:20 WeeWX weewxd[5800]:     self.write_data(self.realtime_txt,
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", line 567, in write_data
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/crt.py", line 540, in handle_new_loop
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      self.handle_data(event.packet)
Feb 11 09:16:20 WeeWX weewxd[5800]:     with open(filename, 'w') as f:
Feb 11 09:16:20 WeeWX weewxd[5800]:          ^^^^^^^^^^^^^^^^^^^
Feb 11 09:16:20 WeeWX weewxd[5800]: PermissionError: [Errno 13] Permission denied: '/var/tmp/realtime.txt'
Feb 11 09:16:20 WeeWX weewxd[5800]: During handling of the above exception, another exception occurred:
Feb 11 09:16:20 WeeWX weewxd[5800]: Traceback (most recent call last):
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", line 265, in <module>
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/crt.py", line 563, in handle_data
Feb 11 09:16:20 WeeWX weewxd[5800]:     main()
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 11 09:16:20 WeeWX weewxd[5800]:     engine.run()
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewx/engine.py", line 206, in run
Feb 11 09:16:20 WeeWX weewxd[5800]:     self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      weeutil.weeutil.log_traceback('crt: **** ')
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 11 09:16:20 WeeWX weewxd[5800]:     callback(event)
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", line 540, in handle_new_loop
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 11 09:16:20 WeeWX weewxd[5800]:     self.handle_data(event.packet)
Feb 11 09:16:20 WeeWX weewxd[5800]:   File "/etc/weewx/bin/user/crt.py", line 563, in handle_data
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  AttributeError: module 'weeutil.weeutil' has no attribute 'log_traceback'
Feb 11 09:16:20 WeeWX weewxd[5800]:     weeutil.weeutil.log_traceback('crt: **** ')
Feb 11 09:16:20 WeeWX weewxd[5800]:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 11 09:16:20 WeeWX weewxd[5800]: AttributeError: module 'weeutil.weeutil' has no attribute 'log_traceback'
Feb 11 09:16:20 WeeWX weewxd[5800]: CRITICAL __main__:     ****  Exiting.
Feb 11 09:16:20 WeeWX systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE

Any help would be much appreciated.
Thanks

Uwe S.

unread,
Feb 11, 2024, 8:31:43 AM2/11/24
to weewx-user
Answering myself, as it was easier than i thought.
The instance wasn't able to access the files in /var/tmp which worked before the update.
Changed the ownership and the system was running again.

Tom Keffer

unread,
Feb 11, 2024, 1:27:23 PM2/11/24
to weewx...@googlegroups.com
Glad that worked out, but you've uncovered another problem: the error handler for crt calls a non-existent function. 

I've created issue #11 to track, but it's likely to be a very long time before anyone gets around to it!

--
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/9eb03fad-b54a-423b-97e9-7fe51ddf4c08n%40googlegroups.com.

matthew wall

unread,
Feb 11, 2024, 8:35:03 PM2/11/24
to weewx-user
On Sunday, February 11, 2024 at 8:27:23 AM UTC-5 tke...@gmail.com wrote:
Glad that worked out, but you've uncovered another problem: the error handler for crt calls a non-existent function. 

I've created issue #11 to track, but it's likely to be a very long time before anyone gets around to it!

thanks tom.  fix is available in weewx-crt 0.23

a robust, future-proof fix for the /var/tmp permissions will take a bit more thought.  meanwhile, if anyone sees a permission failure from weewx-crt, or wonders why weewx-crt does not update the realtime file, just delete the previous realtime.txt (or other output file).

Reply all
Reply to author
Forward
0 new messages