Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

RaspberryPi: CumulusMX init.d System Startup Script

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

Hello John

I made a simple "debug" version for you.

1. Login to your raspberry pi and rename the existing cumulusmx into cumulusmx.org
sudo mv /etc/init.d/cumulusmx /etc/init.d/cumulusmx_org

2. download this debug version from here and transfer it to your Raspberry Pi into the folder /etc/init.d/
cumulusmx.zip
unzip the file: sudp unzip /etc/init.d/cumulusmx.zip
remove the zip: sudo rm /etc/init.d/cumulusmx.zip

3. Change Owner of this script to root
sudo chown root:root /etc/init.d/cumulusmx

4. Made it executable in case it is not: sudo chmod +x /etc/init.d/cumulusmx

reboot your system

Once it is up again, you should find a file /tmp/startup.log .
this file contain a few more information which parts of the init script are being started.
Send me the content of the file, once the you rebooted.

To revert the changes back to the original
a) sudo mv /etc/init.d/cumulusmx /etc/init.d/cumulusmx_debug
b) sudo mv /etc/init.d/cumulusmx_org /etc/init.d/cumulusmx
You do not have the required permissions to view the files attached to this post.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote: reboot your system

Once it is up again, you should find a file /tmp/startup.log .
this file contain a few more information which parts of the init script are being started.
This is the 8GB

Code: Select all

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun 15 20:09:07 2016 from bomb20
pi@WeatherServer:~ $ cat /tmp/startup.log
START - Beore Loop
/mnt/SSD/CumulusMX/Cumulus.ini is available starting proceed
Started successfully with root <start>
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx status
Jun 15 20:15:01 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX...                             Running
pi@WeatherServer:~ $
This is the 4GB

Code: Select all

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun 15 19:19:46 2016 from bomb20
pi@WeatherServer:~ $ cat /tmp/startup.log
START - Beore Loop
/mnt/SSD/CumulusMX/Cumulus.ini is available starting proceed
Started successfully with root <start>
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx status
Jun 15 20:23:42 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX...                             Service not running
pi@WeatherServer:~ $


Bizzarre, no?
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

John
Have I already asked you, if you are able to start cumulusmx with the init script when the System is already being started? I mean 5 Minuts after system is booted?
The 4gb Card.
Wait 5 minutes After start
Check if cumulus is running (sudo /etc/init.d/cumulusmx status)
And Start it with /etc/init.d/cumulusmx start
And Check again with status. But please Keep in mind Cumulus needs about 30 seconds to fully Up and running.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:John
Have I already asked you, if you are able to start cumulusmx with the init script when the System is already being started? I mean 5 Minuts after system is booted?
The 4gb Card.
Wait 5 minutes After start
Check if cumulus is running (sudo /etc/init.d/cumulusmx status)
And Start it with /etc/init.d/cumulusmx start
And Check again with status. But please Keep in mind Cumulus needs about 30 seconds to fully Up and running.
yes, the scripts will start CumulusMX immediately after a login, no problems.
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

Okay John....this is a really tricky thing
so we know, the init Script is coming to the point, where /mnt/SSD/CumulusMX/cumulusmx.sh is being started.
But for any reason, cumulusmx will not start.
You already know, there is another logfile.
I would suggest: Deletr the existing cumulusmxsh.log
sudo rm /mnt/SSD/CumulusMX/cumulusmxsh.log
restart the system and lets see, whats in the cumulusmxsh.log file. (/mnt/SSD/CumulusMX/cumulusmxsh.log)
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:restart the system and lets see, whats in the cumulusmxsh.log file. (/mnt/SSD/CumulusMX/cumulusmxsh.log)

Code: Select all

pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx stop
Jun 17 01:19:34 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Stopping CumulusMX

pi@WeatherServer:~ $ sudo rm /mnt/SSD/CumulusMX/cumulusmxsh.log
pi@WeatherServer:~ $ sudo shutdown -r now

Broadcast message from pi@WeatherServer on pts/1 (Fri 2016-06-17 01:20:43 BST):

The system is going down for reboot NOW!

pi@WeatherServer:~ $ Connection to 192.168.1.250 closed by remote host.
Connection to 192.168.1.250 closed.

RECONNECTING, PLEASE WAIT...

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun 17 01:08:45 2016
pi@WeatherServer:~ $ cat /mnt/SSD/CumulusMX/cumulusmxsh.log
2016-06-17 01:20:15 - CumulusMX 2.5.2.0 (2016-05-02) Script is being called with some Parameter
2016-06-17 01:20:24 - System - CumulusMX is being Stopped with -q
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx start
Jun 17 01:24:13 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Starting CumulusMX...                             pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx status
Jun 17 01:25:01 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX...                             Running
pi@WeatherServer:~ $ cat /mnt/SSD/CumulusMX/cumulusmxsh.log
2016-06-17 01:20:15 - CumulusMX 2.5.2.0 (2016-05-02) Script is being called with some Parameter
2016-06-17 01:20:24 - System - CumulusMX is being Stopped with -q
2016-06-17 01:24:15 - CumulusMX 2.5.2.0 (2016-05-02) Script is being called with some Parameter
2016-06-17 01:24:17 - CumulusMX trying to start with these parameters /mnt/SSD/CumulusMX/CumulusMX.exe -port 8998
2016-06-17 01:24:41 - System - CumulusMX is successfully being started
Is it due to the context the script is being run in at boot time? Everything else is the same.
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

Hello John

sorry for answering late.....but a I had a lot of other things to do.....
well....I am still without any idea.

You deleted the cumulusmxsh.log and restarted the Pi.
After reboot, you looked into the cumulusmxsh.log and you can see, that while the system shutdown, it stopped the cumulusmx because you see 2 lines in this script after reboot (-q)
But, cumulusmx.sh was not started at boot time....definately not.
Then you waited 5 Minutes and started the init script manually and Cumuslux was started via init Script and cumulusmx.sh without any problems.

Conclusion: the init Script ran at reboot (Debug Version) but was not able to call the cumulusmx.sh script. (empty Logfile)

So I am out of ideas........

I have one remaining question and I am sure you already answered it, but maybe I did not get it :-)
On your 4GB SD Card, where the init Script is not working, when you insert a "sleep 30" in the upper area of this file
for example here: sudo nano /etc/init.d/cumulusmx

### END INIT INFO
CumulusMX_HOME=/CumulusMX
CumulusMX_USER=pi
sleep 30
NAME=CumulusMX
PIDFILE=/tmp/$NAME.pid


will this work ?
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:I have one remaining question and I am sure you already answered it, but maybe I did not get it :-)

will this work ?
I have tried a sleep at the top earlier but that does not work.

I think you are right that the cumulusmx.sh script is not run at all by the init script, for whatever reason. We know it is executable because the 8GB Jessie init can run it, but is it a permissions thing and the 4GB Jessie init has no rights?
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

Hello John

you can compare the access right of the script with
ls -al /etc/init.d/cumulusmx

-rwxr-xr-x 1 root root 2213 Jun 8 10:08 /etc/init.d/cumulusmx

To change it in case
sudo chmod +x /etc/init.d/cumulusmx
sudo chown root:root /etc/init.d/cumulusmx

and if you like, you can try: sudo chmod 777 /etc/init.d/cumulusmx
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:you can compare the access right of the script with
ls -al /etc/init.d/cumulusmx
That is owned by root, but we know that runs OK. The problem is with /mnt/SSD/CumulusMX/cumulusmx.sh - we do not have any evidence of that running at boot time. Does the Jessie OS running init on the 4GB card have the same access rights as the 8GB at boot time?

I checked and it was owned by pi:pi but changing that did not work:

Code: Select all

pi@WeatherServer:~ $ ls -hls /mnt/SSD/CumulusMX/cumulusmx.sh
68K -rwxrw-rw- 1 root root 67K May  3 14:30 /mnt/SSD/CumulusMX/cumulusmx.sh
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by water01 »

Surely your permissions therefore are incorrect
Numeric Mode 0762

Permissions rwxrw--w-

Special Attributes None

User Permissions read & write & execute

Group Permissions read & write

Other users Permissions write only


Therefore there is no execute permissions for root.

I would do a sudo chmod 777 /etc/init.d/cumulusmx as jank suggested then you know ALL users from ROOT upwards have execute permissions.
David
Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

water01 wrote:Surely your permissions therefore are incorrect
Therefore there is no execute permissions for root.
I would do a sudo chmod 777 /etc/init.d/cumulusmx as jank suggested then you know ALL users from ROOT upwards have execute permissions.
Hello David....hopefully this will do it...otherwise I would ran out of ideas and my last option would be, to download an image of the 4GB SD Card and test locally on my Pi, until it works :-)

@John: For testing, please change the permissions of both file
sudo chmod 777 /etc/init.d/cumulusmx
sudo chmod 777 /mnt/SSD/CumulusMX/cumulusmx.sh
...to exclude a "missing rights" problem. Since you are the only owner and user of the raspberryPi, it should not be a security hole :-)
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:@John: For testing, please change the permissions of both file
sudo chmod 777 /etc/init.d/cumulusmx
sudo chmod 777 /mnt/SSD/CumulusMX/cumulusmx.sh
...to exclude a "missing rights" problem. Since you are the only owner and user of the raspberryPi, it should not be a security hole :-)
I so wanted that to work, it looked like the answer, although I think it not needed on the first one that does run at boot

Code: Select all

pi@WeatherServer:~ $ sudo chmod 777 /mnt/SSD/CumulusMX/cumulusmx.sh
pi@WeatherServer:~ $ ls -hls /mnt/SSD/CumulusMX/cumulusmx.sh
68K -rwxrwxrwx 1 root root 67K May  3 14:30 /mnt/SSD/CumulusMX/cumulusmx.sh
pi@WeatherServer:~ $ sudo chmod 777  /etc/init.d/cumulusmx
pi@WeatherServer:~ $ ls -hls /etc/init.d/cumulusmx
4.0K -rwxrwxrwx 1 root root 2.9K Jun 17 01:15 /etc/init.d/cumulusmx
but it doesn't.

I'll try putting the start section of cumulusmx.sh in cumulusmx
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

jpsc wrote:but it doesn't.
I'll try putting the start section of cumulusmx.sh in cumulusmx
John....I don't want to give up :-)
The next thing I would do would be with this 4GB SD Card:

sudo cp -rp /mnt/SSD/CumulusMX/ /tmp/CumulusMX
This will make a copy of the complete CumulusMX folder from your external device to the SD Card
Now please change the path information in file /etc/init.d/cumulusmx

CumulusMX_HOME=/CumulusMX
I think, no other file need to be changed.
Disconnect the Externla drive with the original CumulusMX folder (Because my cumulusmx scirpt will search for folders with name CumulusMX and I have no idea which one will be found first /tmp or external drive)

Once this is done, please try again if this change is able to boot.
If not,is it possible for you to create a DD Image of your SD Card and upload it somewhere on a drive where I can download it ?
I am not sure if your onternet connection is fast enough ? I have 120Mbit/s so it should not be a problem to download a 4GB File within minutes. If yes, I would send you the commands to create an image of your SD Card
(Before you do it, you should of course change the password of the user PI )
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:Once this is done, please try again if this change is able to boot.
I'll try this tonight
jank wrote: If not,is it possible for you to create a DD Image of your SD Card and upload it somewhere on a drive where I can download it ?
I am not sure if your onternet connection is fast enough ? I have 120Mbit/s so it should not be a problem to download a 4GB File within minutes. If yes, I would send you the commands to create an image of your SD Card
I am happy to do this, I'm only on 40Mb/s here in the sticks ;)
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
Post Reply