Closed rhombixt closed 2 months ago
Now it’s crashed .
What crashed, the pi? That may indicate a failing SD card if the OS has crashed.
Can you use ssh to log into the pi?
Were you experiencing any issues before you upgraded, for example communication errors (it should show a red error at the bottom of the web interface before the upgrade)?
you can show the output of the following files:
/var/log/genmon.log /var/log/genserv.log /var/log/genloader.log
The "Loading Generator Monitor" is often an indication that genmon is loaded but if you are getting communication errors then this message will be displayed. Genmon will show this message until all of the modbus registers are read at least once. If you lost serial comms then this could take between 2 and 10 minutes, depending on the speed of your pi.
The web timed out eventually- so it went from loading to timed out. then I rebooted the pi however it did not load the program . I posted my issue then tried looking at other folks who had upgrade issues and tied your fixes and it’s not working . I use genmon and the gengpioin application that both need to start at the same time . This happens the last time I tried to upgrade as well in 2017 and you teamed in and fixed a bunch of issues . I have it setup if you want to access . The other logs don’t show anything , the loader log does
I had no issues before but it was a very old version I was running . I did an upgrade that went sideways that you fixed in 2017 and I have not touched it since.
2024-08-08 15:33:49,770 : Error in InstallLibrary using pip : ['/usr/bin/python3', '-m', 'pip', 'install', 'paho-mqtt==1.6.1']: b'Traceback (most recent call last):\n File "/usr/lib/python3.4/runpy.py", line 151, in _run_module_as_main\n mod_name, mod_spec, code = _get_module_details(mod_name)\n File "/usr/lib/python3.4/runpy.py", line 118, in _get_module_details\n return _get_module_details(pkg_main_name)\n File "/usr/lib/python3.4/runpy.py", line 104, in _get_module_details\n spec = importlib.util.find_spec(mod_name)\n File "/usr/lib/python3.4/importlib/util.py", line 86, in find_spec\n parent = import(parent_name, fromlist=[\'path\'])\n File "/usr/lib/python3/dist-packages/pip/init.py", line 74, in
That is your issue. If this is running from a version in 2017 there is no telling what would happen. the genmon github repository was created in March of 2017 so you are dealing with a version from the first year of genmon. I suggest you run the install again. There have been many changes to not only genmon but all of the dependent libraries in the past 7 years.
The recommendation is to either:
1) upgrade genmon periodically on regular intervals (no more 1 year at most between updates) or 2) install it once and live with the current functionality
this is the case with most open source software. Since most open source project rely on software from multiple source (for example genmon uses about 22 different open source libraries and some of those have other dependancies as well) it is impossible to do testing with all variations of all software so staying relatively current is the key to maintaining the health of open source software.
You can make a copy of the files in the /etc/genmon folder by logging into genmon and running this command (these files contain your genmon settings):
cd genmon
./genmonmaint.sh -b
The above command will create a file named genmon_back.tar.gz in the genmon folder.
Then stop genmon with this command:
./startgenmon.sh stop
Next I would update your system software:
sudo apt-get update
sudo apt-get dist-upgrade
then update to the latest software with this command (from the genmon directory):
./genmonmaint.sh -u
type 'y' at the prompt to update.
then run the setup script:
./genmonmaint.sh -i
This will ask you some questions that you will either respond yes (y) or no (n). When it ask to copy the config files type N for no. When asking to start genmon on boot, type N for no as you already have that from the last install.
Once this is complete you can restart your pi with this command:
sudo reboot now
then wait for the pi to restart and check with web interface
What about the gengpioin application ?
How do you uninstall it ?
The script startgenmon.sh should also stop any add on programs.
Also, type this command:
sudo crontab -l
that is a lowercase L at the end not a one. Just making sure your old install used the startgenmon.sh command on startup. If the above returns nothing then select Y when asked to start on boot.
When I run this comes up..
@reboot sleep 30 && /bin/bash /home/pi/genmon/startgenmon.sh start
web page did not load
Genloader
2024-08-08 15:33:49,770 : Error in InstallLibrary using pip : ['/usr/bin/python3', '-m', 'pip', 'install', 'paho-mqtt==1.6.1']: b'Traceback (most recent call last):\n File "/usr/lib/python3.4/runpy.py", line 151, in _run_module_as_main\n mod_name, mod_spec, code = _get_module_details(mod_name)\n File "/usr/lib/python3.4/runpy.py", line 118, in _get_module_details\n return _get_module_details(pkg_main_name)\n File "/usr/lib/python3.4/runpy.py", line 104, in _get_module_details\n spec = importlib.util.find_spec(mod_name)\n File "/usr/lib/python3.4/importlib/util.py", line 86, in find_spec\n parent = import(parent_name, fromlist=[\'path\'])\n File "/usr/lib/python3/dist-packages/pip/init.py", line 74, in
in your logs you can see this URL:
http://mirrordirector.raspbian.org/raspbian/dists/jessie/main/binary-armhf/Packages
This indicates you are running the Jessie version of the OS which is based on Debian 8. The current version of Raspbian / Debian is 12. The long term support for your OS (Jessie) ended in 2020 so you can not update your software via the apt package manager. This is causing the genmon install script to fail. genloader tries to install packages that are missing as a back up to the install script and it is failing as well.
You really have 2 choices: 1) down load an older version of genmon and put it in the genmon folder on your pi. You can scroll back through old releases here: https://github.com/jgyates/genmon/releases . With this option I would not be able to help much as I only support the latest version
2) get a new SD card, install the latest version of the Raspberry pi OS and install genmon from scratch using these instructions: https://github.com/jgyates/genmon/wiki/3.3--Setup-genmon-software . This will put you on the latest version with an operating system that still has several years of long term support.
Every version of linux has some cutoff date for support. Here is history of Debian based OSes (like the Raspberry pi OS): https://en.wikipedia.org/wiki/Debian_version_history
The current stable version of Debian is bookworm.
ok i will complete tonight. Update when I am done.
I assume a 64 bit os is ok for pi 3?
Also - can I restore my settings with the backup you made me perform or is it not necessary?
If you plan on using the OS GUI on the Pi itself for anything you may want to go with 32-bit OS, but if you are going with Lite then 64-bit should be fine.
Personally I use the 64 bit lite version.
Yes you can restore from the backup. You may just want to run the install scrip and use the default settings. You can always restore from you backup later, after you get everything up and running. For example you can just restore your email settings if you don't remember the password. You can just restore your outtage log, etc.
Getting an error when running the genmonmaint/sh -i Error 13 permission denied /genmon/genenv
seems everything with the new OS is about permissions. I had to use the sudo command to get the git installer to work
how do I change the genmon directory so it's open?
If you log in via ssh you should be in the directory for the user you logged in as. In this situation you should not have permission issues with the file system. What directory did you run the install commands?
I have the terminal window open , changed directory to genmon
changed user to root and ran - its going now.
Some observations with your instructions in the wiki
sudo apt-get update sudo apt-get dist-upgrade (should just be sudo dist-upgrade )
git clone https://github.com/jgyates/genmon.git did not work - had to use sudo in front of it ( i supposed if I was running as root i would not have to use sudo )
If you used the sudo command with the git command, then the genmon folder is now owned by the root user. You should not have had to use sudo git. What directory where you in when you ran the git command?
just my home directory I believe - from the terminal window based on the last step
have I done something wrong - should I re-format and do everything over again?
/home - there is no pi directory just my user folder and rpi-first-boot-wizard
If you run this from your user folder you would have the right permissions. In earlier versions of the raspberry pi os the default user name is pi, so this would be user folder
ok well when I ran it - it said permission denied. Should I use the chown command on the folder?
I would get into you user folder, run git and then genmonmaint.sh from you home/user/genmon folder. Then delete the genmon folder in home with sudo rm.
its up and running despite being in the wrong spot - any issues with leaving as is?
Try doing a software update from the about page, then look at /var/log/gender.log for any errors. If no errors you are probably ok
I am going to close this thread but feel free to post here with any follow up status or questions.i am glad it is work for you
Have there been any changes to gpio at all? Different io ports for alarms or are they the same?
I don’t have a gender under the logs folder
Genserv shows no errors
There have been many changes over the years, I don't recall changing the default gpio values.
Thanks. I created a second SD card and made a second image . I managed to do everything from start to finish a second time with no issues. Thanks for the assistance.
no problem. I am glad it is working for you.
Steps to Reproduce
Clicked on upgrade and I’m stuck. I have teamviewer remote access if needed .
Expected Result
Genmon said update complete but won’t load
Actual Result
Loading generator monitor …
Version Info
Logs
Can’t access due to loading window