Re: [weewx-user] Failed to update 4.10.2 to 5.0.2 with setup.py old installation

148 weergaven
Naar het eerste ongelezen bericht

Tom Keffer

ongelezen,
10 apr 2024, 07:16:5510 apr
aan weewx...@googlegroups.com
You did not update your weewx service file, /etc/systemd/system/weewx.service. This is step #4 in the instructions. 



On Wed, Apr 10, 2024 at 1:05 AM Juan Antonio Mosquera Casais <juan.antonio.m...@gmail.com> wrote:
Hello, I have weewx 4.10.2 installed via setup.py, and I followed the instructions at https://github.com/weewx/weewx/wiki/v5-upgrade but when trying to start the service I get this error:

Apr 10 07:39:51 raspberrypi systemd[1225]: weewx.service: Failed to locate executable /home/weewx/bin/weewxd: No such file or directory
Apr 10 07:39:51 raspberrypi systemd[1225]: weewx.service: Failed at step EXEC spawning /home/weewx/bin/weewxd: No such file or directory
Apr 10 07:39:51 raspberrypi systemd[1]: Started WeeWX weather system.
Apr 10 07:39:51 raspberrypi systemd[1]: weewx.service: Main process exited, code=exited, status=203/EXEC
Apr 10 07:39:51 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.

It is because in the instructions the bin has to be moved to bin.old, if I put the bin back it works, but with version 4.10.2. How can I update to version 5.0.2 and keep my old configuration? Thank you.

--
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/689f6dd3-1de9-4d6b-90b2-1c7fc0b36fc7n%40googlegroups.com.

Juan Antonio Mosquera Casais

ongelezen,
10 apr 2024, 13:42:3910 apr
aan weewx-user
Thanks... but... step 4 done>

history

 1323  sudo cp /home/weewx/util/systemd/weewx.service /etc/systemd/system
 1324  sudo systemctl daemon-reload
 1325  sudo systemctl enable weewx
 1326  sudo systemctl start weewx

vince

ongelezen,
10 apr 2024, 13:46:0110 apr
aan weewx-user
Check to see if you have multiple weewx.service files on your system.  It's possible you have one under /etc and a different one under /usr and systemd is using the old one.

If that is not the case, post your /etc/systemd/system/weewx.service file please.

Juan Antonio Mosquera Casais

ongelezen,
10 apr 2024, 15:27:5410 apr
aan weewx-user
pi@raspberrypi:/etc $ cat /etc/systemd/system/weewx.service
# systemd unit configuration file for WeeWX
#
# For information about running WeeWX under systemd,
# be sure to read https://github.com/weewx/weewx/wiki/systemd
#
[Unit]
Description=WeeWX weather system
Documentation=https://weewx.com/docs

Requires=time-sync.target
After=time-sync.target
RequiresMountsFor=/home

[Service]
ExecStart=/home/weewx/bin/weewxd /home/weewx/weewx.conf
StandardOutput=null
# To run as a non-root user, uncomment and set username and group here:
#User=weewx
#Group=weewx

[Install]
WantedBy=multi-user.target

vince

ongelezen,
10 apr 2024, 17:20:4310 apr
aan weewx-user
So is there a /home/weewx/bin/weewxd file ?
What is in your /home/weewx tree ?

Did you perhaps install as user 'pi' and everything is under there ?

Tom Keffer

ongelezen,
10 apr 2024, 18:12:3710 apr
aan weewx...@googlegroups.com
Juan, your service file, weewx.service, looks like the old V4.10 service file. The new V5.0 file has a few more entries.

Double check that you did step #2: upgrade the old examples and utility files. 

Juan Antonio Mosquera Casais

ongelezen,
11 apr 2024, 00:49:3011 apr
aan weewx-user
Ok, thanks, sorry, this step i reply N, if i reply Y>

pi@raspberrypi:/home/weewx $  source ~/weewx-venv/bin/activate
(weewx-venv) pi@raspberrypi:/home/weewx $  weectl station upgrade --config=/home/weewx/weewx.conf
Using configuration file /home/weewx/weewx.conf

Upgrade examples, utility files in /home/weewx (Y/n)?
Removing example directory /home/weewx/examples
Copying examples into /home/weewx/examples
Traceback (most recent call last):
  File "/home/pi/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/pi/weewx-venv/lib/python3.9/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/pi/weewx-venv/lib/python3.9/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/pi/weewx-venv/lib/python3.9/site-packages/weectllib/station_cmd.py", line 333, in upgrade_station
    weectllib.station_actions.station_upgrade(config_dict=config_dict,
  File "/home/pi/weewx-venv/lib/python3.9/site-packages/weectllib/station_actions.py", line 802, in station_upgrade
    examples_dir = copy_examples(config_dict, examples_root=examples_root,
  File "/home/pi/weewx-venv/lib/python3.9/site-packages/weectllib/station_actions.py", line 618, in copy_examples
    shutil.copytree(examples_resources, examples_dir)
  File "/usr/lib/python3.9/shutil.py", line 557, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/usr/lib/python3.9/shutil.py", line 458, in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/weewx/examples'

Thanks.

Tom Keffer

ongelezen,
11 apr 2024, 08:20:3111 apr
aan weewx...@googlegroups.com
I suspect this may be a permissions issue. What do you get for the following commands?

ls -l /home/weewx
ls -l /home/weewx/examples

Make sure everything in the directory "/home/weewx" is writable by user "pi". Usually, it's easiest just to have everything under /home/weewx owned by user "pi":

sudo chown -R pi:pi /home/weewx


Juan Antonio Mosquera Casais

ongelezen,
11 apr 2024, 09:45:4311 apr
aan weewx-user
Ok Tom, this is de problem, thanks...

I updated to 5.0.2... but other question, i need modify rsyncupdaload.py, where is now?

Thanks!

Juan Antonio Mosquera Casais

ongelezen,
11 apr 2024, 10:40:4711 apr
aan weewx-user
Yes, i found, thanks
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten