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 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Cumulus as a server - start/stop through init.d
Moderator: mcrossley
- HansR
- Posts: 5968
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Cumulus as a server - start/stop through init.d
Yes, I have been using that a long time. But never for the backup. I have my own daily backup script which sends the whole Cumulus directory tree to the NAS and once a week I make a complete image backup.
I used it only for start/stop/status, rarely did a restart.
I wanted an automatic reboot possibility, so when the CMX daemon facility was there, it was time to switch to the cumulusmx.sh delivered with CMX.
Now with the systemd it is similar and I just have to change the stop/start commands in the backup procedure.
So it was not a direct move, but yes I went from the start/stop script to the deamon start/stop.
BTW: that may be goodbye to the start/stop script, but applause for @jank because it saved a lot of trouble
I used it only for start/stop/status, rarely did a restart.
I wanted an automatic reboot possibility, so when the CMX daemon facility was there, it was time to switch to the cumulusmx.sh delivered with CMX.
Now with the systemd it is similar and I just have to change the stop/start commands in the backup procedure.
So it was not a direct move, but yes I went from the start/stop script to the deamon start/stop.
BTW: that may be goodbye to the start/stop script, but applause for @jank because it saved a lot of trouble
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
I'm pretty sure you can't define your own verbs/commands, and you can't alter the output of the status command. But there is always the show command which displays the properties of the unit. It may be possible to populate a custom property with the output from the console file and then do:
Code: Select all
systemctl show cumulusmx | grep yourpropertyname
Code: Select all
cat $MX_INSTALL/MXdiags/ServiceConsoleLog.txt
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
You could always create your own systemd units for backup and update, and cause those units to call restart on the MX unit.
-
- Posts: 225
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Cumulus as a server - start/stop through init.d
Now I know its been said that there is a log file in MXdiag you can tail to see, but a thought on a systemd, or init.d script (either system should do this) to be able to pull up the console to see like if we ran it from the prompt. Using screen will allow you to pull that up, with an systemd script it can be as simple as adding this
Code: Select all
ExecStart=/usr/bin/mono-service -d:/home/install/CumulusMX CumulusMX.exe -service
##change too
ExecStart=/usr/bin/screen -dmfa -S Cumulus /usr/bin/mono-service -d:/home/install/CumulusMX CumulusMX.exe -service
you can then
Code: Select all
screen -r Cumulus
It can also be done with init.d if someone what to translate that to a working script
Just my thought on it, Ill give it a try this next weekend when i have time
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
- HansR
- Posts: 5968
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Cumulus as a server - start/stop through init.d
Personally, I think this is just full circle going back to where we were, kind of retrograde.
So, no, this is not for me.
Nice to know it is possible in systemd though
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
I can't see this working. If you start CumulusMX as a service, there is no output in the terminal in which you start it. When running MX as a service, terminal output is redirected to the file MXdiags/ServiceConsoleLog.txt. Therefore if you use screen in your startup command and dojlmr731 wrote: ↑Mon 31 Aug 2020 2:10 amNow I know its been said that there is a log file in MXdiag you can tail to see, but a thought on a systemd, or init.d script (either system should do this) to be able to pull up the console to see like if we ran it from the prompt. Using screen will allow you to pull that up, with an systemd script it can be as simple as adding thisCode: Select all
ExecStart=/usr/bin/mono-service -d:/home/install/CumulusMX CumulusMX.exe -service ##change too ExecStart=/usr/bin/screen -dmfa -S Cumulus /usr/bin/mono-service -d:/home/install/CumulusMX CumulusMX.exe -service
Code: Select all
screen -r
-
- Posts: 225
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Cumulus as a server - start/stop through init.d
Not sure what you will see but im thinking that you should see all the start up till normal running then any errors that come across. Is it needed NO it was just in response to a a post where there might be a need to see console output. I have yet to set it up so not even sure what is outputted to the log file and if just stdout > then screen would do the same so yes redundant, or does the log file include any other actions that happen, guess its just im used to seeing the term up and if no errors have been broadcasted i know everything is fine.
I use screen alot just so i dont have many terminal windows open and can quickly switch around.
I use screen alot just so i dont have many terminal windows open and can quickly switch around.
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
My point is that you are starting Cumulus as a mono service and there isn't any terminal output when you do this without screen - it is redirected (both stdout and stderr) to the log file. So if you start it using screen you won't see any output on startup either (as it has been redirected to a file), nor when you re-attach to your screen.
- mcrossley
- Posts: 12771
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
Thanks @Freddie, I'll add this file to the distribution, and remove the init.d script.
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Cumulus as a server - start/stop through init.d
hi im just looking at your bit off code and you said mono /usr/bin/mono-servicefreddie wrote: ↑Sat 29 Aug 2020 2:28 pm For a systemd service, its configuration is stored in a file known as a unit. To create a unit for Cumulus MX, create a file called cumulusmx.service in /etc/systemd/system/. Pop this code into the file:[Service] section notes: you should modify the ExecStart line to suit your system. /usr/bin/mono-service is the path to the mono-service executable (should be pretty standard across all systems, but I would double-check it is there). -d:/home/install/CumulusMX is the location of your Cumulus MX installation. Also, modify User and Group to suit your local setup. Lastly, ExecStopPost=/bin/rm /tmp/CumulusMX.exe.lock is for systemd to remove the lock file created on service startup in order to signal successful startup/shutdown.Code: Select all
[Unit] Description=CumulusMX service Documentation=https://cumuluswiki.org/a/Main_Page After=network-online.target [Service] User=root Group=root ExecStart=/usr/bin/mono-service -d:/home/install/CumulusMX CumulusMX.exe -service Type=forking ExecStopPost=/bin/rm /tmp/CumulusMX.exe.lock [Install] WantedBy=multi-user.target
Cumulus is started and stopped with the following commands:Status and restart are available too:Code: Select all
systemctl start cumulusmx systemctl stop cumulusmx
If you make a change to the unit file, you need to run the following command so that systemd re-reads your file:Code: Select all
systemctl restart cumulusmx systemctl status cumulusmx
There is no need to do this when you first create the unit file.Code: Select all
systemctl daemon-reload
To have Cumulus start on reboot, issue the following command:Finally, to stop the service running on reboot, use the following:Code: Select all
systemctl enable cumulusmx
NOTE:Code: Select all
systemctl disable cumulusmx
All the above systemctl commands should be run as root (or prefixed with sudo) - except for status which can be executed by a normal user.
The unit file can be called whatever you want, provided it is suffixed with .service. If you do decide to use another name then you will need to use this name with your systemctl commands.
but when i start the service
Job for cumulusmx.service failed because the control process exited with error code.
See "systemctl status cumulusmx.service" and "journalctl -xe" for details.
and ive tred looking for the /usr/bin/mono-service but i cnt find it
● cumulusmx.service - CumulusMX service
Loaded: loaded (/etc/systemd/system/cumulusmx.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-01-19 12:33:44 GMT; 56s ago
Docs: https://cumuluswiki.org/a/Main_Page
Process: 1202 ExecStart=/usr/bin/mono-service -d:/home/pi/CumulusMX CumulusMX.exe -service (code=exited, status=203/EXEC)
Process: 1203 ExecStopPost=/bin/rm /tmp/CumulusMX.exe.lock (code=exited, status=1/FAILURE)
Jan 19 12:33:44 cumulusmx systemd[1]: Starting CumulusMX service...
Jan 19 12:33:44 cumulusmx systemd[1202]: cumulusmx.service: Failed to execute command: No such file or directory
Jan 19 12:33:44 cumulusmx systemd[1202]: cumulusmx.service: Failed at step EXEC spawning /usr/bin/mono-service: No such file or directory
Jan 19 12:33:44 cumulusmx systemd[1]: cumulusmx.service: Control process exited, code=exited, status=203/EXEC
Jan 19 12:33:44 cumulusmx rm[1203]: /bin/rm: cannot remove '/tmp/CumulusMX.exe.lock': No such file or directory
Jan 19 12:33:44 cumulusmx systemd[1]: cumulusmx.service: Control process exited, code=exited, status=1/FAILURE
Jan 19 12:33:44 cumulusmx systemd[1]: cumulusmx.service: Failed with result 'exit-code'.
Jan 19 12:33:44 cumulusmx systemd[1]: Failed to start CumulusMX service.
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
mono-service is correct. What version of mono do you have installed, and did you install the mono-complete package?
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Cumulus as a server - start/stop through init.d
Mono JIT compiler version 6.12.0.107 (tarball Thu Dec 10 05:44:54 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: preemptive
GC: sgen (concurrent by default)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: preemptive
GC: sgen (concurrent by default)
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Cumulus as a server - start/stop through init.d
and i got the mono infor
sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
then run this sudo apt install mono-devel
https://cumuluswiki.org/a/Setting_up_Raspberry_Pi
sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
then run this sudo apt install mono-devel
https://cumuluswiki.org/a/Setting_up_Raspberry_Pi
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
No - not mono-devel - that is the problem. Uninstall mono-devel and install mono-complete
-
- Posts: 2479
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Cumulus as a server - start/stop through init.d
It specifically mentions mono-complete in this article.