impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 9, 2019 17:53:23 GMT -8
My Weather Station is going to be remotely mounted - 2 hours away from where I live... So its not practical to touch it physically whenever I want to.
I have struggled over the last month with reliability... Setting it up, configuring it - would require lots of experimentation and lots of reboots. I have the software where I want it, but the reboot process often causes an issue.
I am using a switchdoc supplied SD card, software - updated to v42... with just a couple of text changes - so no other software / processes running....
About one in 10 times when I do a reboot it does not recover.... If I do a sudo reboot, or reboot via the gui… it occasionally fails...
As I am running it headless, it has been hard to work out why I could not VNC or SSH to the machine like I normally can. A very hard way to determine what is going wrong when you can not see the boot screens. I was finally able to replicate the issue with a HDMI monitor plugged in to see what was happening.
I thought that the wifi was failing, could not connect on startup - but the monitor proved me wrong.
After performing a reboot The screen goes black, white cursor is flashing at the top left, and at the bottom right of the screen it says "plymouth-reboot.service". Then it hangs... all non responsive until I power it down at the plugpack.
It is hanging on the shutdown, not the startup...
I have done some googling... no real answers - other than it might be awaiting for a service to close and that service is not responding... A little talk of runlevels, and things above my comprehension....
I question if the instructions for auto starting SkyWeather is the correct way to do it? Modify /etc/rc.local with sudo pigpiod
cd /home/pi/SDL_Pi_SkyWeather
nohup sudo python SkyWeather.py &
Is it SkyWeather not stopping correctly as a service? Could it be that it is doing something at a particular time causing the issue and that is why my problem only occurs every now and again and not repeatable each and every time I do a sudo reboot ?
Anyone else had a similar issue ? How Do I resolve this one!!!
|
|
|
Post by SDL on Aug 10, 2019 7:01:04 GMT -8
Hmm. I think you may have a bad Raspberry Pi. How are you powering the station?
This doesn't sound like a SD Card problem. Do you have a Pi to swap out.
BP
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 10, 2019 14:21:13 GMT -8
No - as I have around 4 Pi's of differing types - and I can make this occur on each one....
Last night though I went and bought a new SD Card, installed NOOBS, and with nothing else installed - checked the reboot method that causes me issues. I was able to successfully reboot 30 times in succession without an error...
I am now installing manually the SkyWeather software, to repeat the testing again.
Was it a corrupted SD Card ? Maybe... but I had this from day 1 and its been annoying me... (Oh it was one of your supplied SD Cards...)
Fingers crossed I finally resolve it.
However - in creating a new SD card from scratch - it takes so long, and is such a long struggle - as reported earlier, your steps are out of date / incomplete....
There is no detailed instructions for installing SQL, creating the SQL Database, there is no detailed info on installing or creating phypmyadmin and where there is a brief mention it refers to SQLLIte and not Mariodb which is what is used today.
I struggled - and this is the 4th time I have tried... I struggled to get phpmyadmin working - having to grant privledges on users to be able to see new database I created.... Its just too hard
The new NOOBS as of now is hugely different to the one I used a month ago.... I don't even know if I have done things right - which is the reason I bought your card last time. Otherwise I would write out the steps - but I am still testing and have I forgotten something....
SERIOUSLY - You tell customers that they can do this all themselves... but the doco is old and everything is different - go format an SD Card, and try it yourself, write it out - even make it a separate document for people to use..... YOU HAVE TO MAKE THIS EASIER AND SIMPLER....
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 10, 2019 23:03:59 GMT -8
Oh man - its back... reboots fail or take an hour to recover... Each time it is not the bootup but the shutdown that causes the issue - with just a message at the bottom of the screen saying "plymouth-reboot.service" But I have narrowed it down to the cause - having wasted 2 days on it !! and I mean 2 days non stop for 12+ hours.... argghh am I on the testing payroll yet? If I run Skyweather.py in a terminal window - it all works fine..... I can do a sudo reboot in another terminal window and be back up and running again in a minute. However if I modify rc.local to autorun SkyWeather.py as per your instructions.... Nine times out of ten it hangs on the sudo reboot. It does not like running the software as a background service... It will not close properly - the shutdown is waiting and waiting and waiting... it never shuts down - and therefore never starts up again and you can not connect to it... Maybe the above only works well for command line and not the GUI Would it be better to use systmd to autostart skyweather - the difference being this would then run after the multi user interface has started - where as rc.local is well before... Or something like this - so it starts a terminal window and runs - just like I would do manually..... raspberrypi.stackexchange.com/questions/92784/terminal-and-program-run-on-boot-upI am not a raspberry / Linux expert - and need help to work out why this is occurring....
|
|
|
Post by SDL on Aug 11, 2019 13:33:38 GMT -8
Thanks for the comments regarding SD Cards.
The reason we sell SD Cards is that install instructions change constantly by multiple people and companies on a regular basis. Also, Stretch Versus Buster also brings problems. It is a huge problem.
Regarding the reboot problem:
We need to figure this out. Interesting that it takes a bunch of time to reboot. I saw that on one of our remote stations last week. It is possible that I can duplicate it.
Your idea of systemd has merit. I'll check that out.
BP
It does NOT happen on every system. But now I think I have a system that I can test, so I can get to a way around it.
Still sounds like a Linux problem. New
|
|
|
Post by SDL on Aug 11, 2019 14:45:13 GMT -8
I'm playing around with my system that takes a long time to reboot. Others have no problem.
I timed the reboot of the lab system and it was about a minute. Normal
I am timing a remote system (that has the problem I think) about 20 miles away right now.
What OS are you using (depends on which Version of the SD Card you have - older ones have stretch and new ones have buster to get ready for the RP4.)
Run this:
cat /etc/os-release
And post the result. We see some examples of the plymouth problem.
BP
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 11, 2019 15:10:15 GMT -8
pi@farm:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 11, 2019 15:11:42 GMT -8
pi@farm:~ $ cat /etc/rpi-issue Raspberry Pi reference 2019-07-10 Generated using pi-gen, github.com/RPi-Distro/pi-gen, 175dfb027ffabd4b8d5080097af0e51ed9a4a56c, stage5 pi@farm:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 11, 2019 15:12:28 GMT -8
pi@farm:~ $ uname -r 4.19.58-v7+
pi@farm:~ $ /opt/vc/bin/vcgencmd version Jul 9 2019 14:42:57 Copyright (c) 2012 Broadcom version 6c3fe3f096a93de3b34252ad98cdccadeb534be2 (clean) (release) (start_x)
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 11, 2019 15:13:53 GMT -8
pi@farm:~ $ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
Hardware : BCM2835 Revision : a020d3 Serial : 00000000a14c56bf
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 16, 2019 17:54:32 GMT -8
Im a little amazed…. Reporting having boot issues, am told you have a bad raspberry pi... When I prove that its the comment oh yea - we have a couple of units just like that... So waiting for a response - I have played a little... Following instructions here www.dexterindustries.com/howto/auto-run-python-programs-on-the-raspberry-pi/I have added the SkyWeather to a cron job for start up... Well actually I created a script which contains the pigpiod and nohup commands... Now its working again - takes about 3 minutes from reboot to reporting updates to Weather Underground... 5 reboots in a row - each worked, better odds than I got with rc.local Not out of the woods yet - but it looks promising....
|
|
|
Post by SDL on Aug 18, 2019 13:18:22 GMT -8
Well, here was the situation. We actually don't have a couple like that, we have one that did that for a while and then quit. And I thought it was the flakey wifi extender that was taking so long too reconnect. From the outside, it looked like that. I didn't check an cross correlate the boot up time since I thought I knew what it was.
When you reported this problem, It clicked in my mind that this was maybe the same problem. As it turns out maybe, maybe not. Since it now boots up correctly. Hmmm.
I really wish I had a system that I could actually duplicate this problem.
However, there is nothing wrong at all with your solution. It's different, and it starts up in a different stage in the OS startup.
If I *may* and could ask you to go put back the rc.local and see if it still fails? I will run some more tests on my once misbehaving unit. I need to know something about the distrrubiution of these failures.
You also said "up the odds of it starting". Remind me what your distribution of "long boots", "short boots" and total failures were. There is information in that.
BP
|
|
impactoz
Full Member
Posts: 142
Raspberry Pi: Yes
|
Post by impactoz on Aug 26, 2019 0:35:38 GMT -8
Just reporting back... Since moving to the new method - had no issues...
I have Cron run a script in my personal bin directory I created.
I called the script runsw and set the permissions correctly for execution...
The cron setup looks like this;
pi@farm:~ $ crontab -l
@reboot /home/pi/bin/runsw
And my script looks like this;
#!/bin/bash # This is a script to automatically run SkyWeather
cd /home/pi/SDL_Pi_SkyWeather rm weatherold.out mv weather.out weatherold.out sudo pigpiod sudo python SkyWeather.py &>weather.out &
Output is now going to a file weather.out - operates like before, it writes out 4kb chunks... easily read it in a text editor or tail it... But I am always concerned about things that never end... so each time the machine boots, it clears out this log file..
Well actually it does not immediately delete it - it makes a backup to an old version - so not only do I clear out the log file, but I am preserving the previous one in case I need to look at things already executed.
|
|