OpenMediaVault-Plugin-Developers / installScript

script that installs omv-extras and openmediavault if not installed already.
1.1k stars 207 forks source link

Monit package causes installation to fail on Raspberry Pi #34

Closed PREngineer closed 2 years ago

PREngineer commented 4 years ago

The Monit package is causing the installation to fail.

Setting up monit (1:5.26.0-1) ... Job for monit.service failed because the control process exited with error code. See "systemctl status monit.service" and "journalctl -xe" for details. invoke-rc.d: initscript monit, action "start" failed. ● monit.service - LSB: service and resource monitoring daemon Loaded: loaded (/etc/init.d/monit; generated) Active: failed (Result: exit-code) since Fri 2020-08-21 00:59:40 EDT; 180ms ago Docs: man:systemd-sysv-generator(8) Process: 5130 ExecStart=/etc/init.d/monit start (code=exited, status=1/FAILURE)

Aug 21 00:59:39 pi1 systemd[1]: Starting LSB: service and resource monitoring daemon... Aug 21 00:59:40 pi1 monit[5130]: Starting daemon monitor: monitSegmentation fault Aug 21 00:59:40 pi1 monit[5130]: failed! Aug 21 00:59:40 pi1 systemd[1]: monit.service: Control process exited, code=exited, status=1/FAILURE Aug 21 00:59:40 pi1 systemd[1]: monit.service: Failed with result 'exit-code'. Aug 21 00:59:40 pi1 systemd[1]: Failed to start LSB: service and resource monitoring daemon. dpkg: error processing package monit (--configure): installed monit package post-installation script subprocess returned error exit status 1 Setting up python3-colorama (0.3.7-1) ...

ryecoaaron commented 4 years ago

While I don't think it will help since I've never been able to reproduce this error (actually problem with monit package not install script or OMV), I changed to the install script to install monit before OMV. I just tried the change on a fresh 05-27 raspberry pi os lite image and it worked fine. https://github.com/OpenMediaVault-Plugin-Developers/installScript/commit/d3e59cd9b09a2bd447e3d5967597ea7be69ac1c3

You will have to write a fresh image for it to really make any difference.

udop1 commented 4 years ago

@PREngineer Although I didn't do this on a Raspberry Pi, I managed to find a solution, I hope this works for you as well if @ryecoaaron 's solution didn't (I've quoted the page for your convenience):

On Debian Buster, Monit is available on backports repository. Add buster-backports: printf "%s\n" "deb http://ftp.de.debian.org/debian buster-backports main" | \ sudo tee /etc/apt/sources.list.d/buster-backports.list Install monit: sudo apt update sudo apt install -t buster-backports monit

Source: https://unix.stackexchange.com/a/574401

cptTesa commented 4 years ago

Same to me. Fiddling around with the failing monit issue since weeks. Tried a new SD card, older Buster version, older monit version (https://forum.openmediavault.org/index.php?thread/30788-monit-error-on-fresh-install-of-omv5-on-a-raspberry-pi/) Already tried what @udop1 mentioned. Thanks for that btw.

pi@raspberrypi:~ $ sudo dpkg --configure -a Setting up monit (1:5.26.0-1~bpo10+1) ... [....] Starting daemon monitor: monitSegmentation fault failed! invoke-rc.d: initscript monit, action "start" failed. dpkg: error processing package monit (--configure): installed monit package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: monit

I can't believe, that this issue is only happening to two people?! Any help would be highly appreciated. Thanks and greetings from germany

ryecoaaron commented 4 years ago

I just tested this on an RPi on Friday. Are you writing the image and running the script first thing? That is what I did.

ryecoaaron commented 4 years ago

What I dislike is that I am trying to fix the install script for a problem with the monit package and a problem I can't reproduce. Not a good use of my time.

cptTesa commented 4 years ago

Dear @ryecoaaron I'm really sorry that I can't provide any further details on that. But this is more or less exactly what I did, or what I did the last time: Download Raspberry OS, at the moment the latest release from 2020/05. Do an apt update, followed by apt upgrade. Then fire up the install script. It always fails with the message in the initial post. Thanks a lot. Edit: also tried it without the update/ upgrade stuff. Same result

ryecoaaron commented 4 years ago

Can you try one more workflow?

write image boot system change hostname (ie hostnamectl set-hostname rpi4b) reboot run install script

cptTesa commented 4 years ago

Clean SD card, burned the image, ssh on the pi, changed the hostname, reboot, started the install script, that's it:

● monit.service - LSB: service and resource monitoring daemon Loaded: loaded (/etc/init.d/monit; generated) Active: failed (Result: exit-code) since Mon 2020-08-24 18:51:02 BST; 173ms ago Docs: man:systemd-sysv-generator(8) Process: 2995 ExecStart=/etc/init.d/monit start (code=exited, status=1/FAILURE)

Aug 24 18:51:01 omvdocker systemd[1]: Starting LSB: service and resource monitoring daemon... Aug 24 18:51:02 omvdocker monit[2995]: Starting daemon monitor: monitSegmentation fault Aug 24 18:51:02 omvdocker monit[2995]: failed! Aug 24 18:51:02 omvdocker systemd[1]: monit.service: Control process exited, code=exited, status=1/FAILURE Aug 24 18:51:02 omvdocker systemd[1]: monit.service: Failed with result 'exit-code'. Aug 24 18:51:02 omvdocker systemd[1]: Failed to start LSB: service and resource monitoring daemon. dpkg: error processing package monit (--configure): installed monit package post-installation script subprocess returned error exit status 1 Processing triggers for man-db (2.8.5-2) ... Processing triggers for systemd (241-7~deb10u4+rpi1) ... Errors were encountered while processing: monit E: Sub-process /usr/bin/dpkg returned an error code (1) failed installing monit

PREngineer commented 4 years ago

I read here that the latest version of monit in Raspbian is broken for certain devices and that I should try to install a previous version. But it didn't fix it for me either.

I'm about to give up on OMV for my Raspberry PI.

ryecoaaron commented 4 years ago

On a failed system, can someone please post the output of: apt-cache policy monit?

monit is supplied by OMV and raspbian. My system from Friday has the raspbian version which is older than the OMV version.

cptTesa commented 4 years ago

pi@omvdocker:~ $ apt-cache policy monit? python-mnemonic: Installed: (none) Candidate: 0.18-1 Version table: 0.18-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages darcs-monitor: Installed: (none) Candidate: 0.4.2-14 Version table: 0.4.2-14 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libclam-qtmonitors-dev: Installed: (none) Candidate: (none) Version table: monitorix: Installed: (none) Candidate: 3.10.1-1 Version table: 3.10.1-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libeclipse-ui-monitoring-java: Installed: (none) Candidate: 1.1.300+eclipse4.10-1 Version table: 1.1.300+eclipse4.10-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0.3+lowlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: cameramonitor: Installed: (none) Candidate: 0.2-2.1 Version table: 0.2-2.1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0+lowlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: libuniversal-moniker-perl: Installed: (none) Candidate: 0.08-8 Version table: 0.08-8 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0+physicalmonitorenumerationapi-dev: Installed: (none) Candidate: (none) Version table: libktpcommoninternals9: Installed: (none) Candidate: 17.08.3-1+b3 Version table: 17.08.3-1+b3 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages mnemonicode: Installed: (none) Candidate: 0.73-1 Version table: 0.73-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages icecc-monitor: Installed: (none) Candidate: 3.2.0-1 Version table: 3.2.0-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages gnome-system-monitor: Installed: (none) Candidate: 3.30.0-2 Version table: 3.30.0-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages icingaweb2-module-monitoring: Installed: (none) Candidate: 2.6.2-3+deb10u1 Version table: 2.6.2-3+deb10u1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages monitoring-plugins-basic: Installed: (none) Candidate: 2.2-6 Version table: 2.2-6 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages mate-system-monitor: Installed: (none) Candidate: 1.20.2-1 Version table: 1.20.2-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libmonitoring-icinga2-client-rest-perl: Installed: (none) Candidate: 2.0.0-2 Version table: 2.0.0-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0.3.6+highlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: libfile-monitor-lite-perl: Installed: (none) Candidate: 0.652003-1 Version table: 0.652003-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages python3-mnemonic: Installed: (none) Candidate: 0.18-1 Version table: 0.18-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages python-daemonize-doc: Installed: (none) Candidate: (none) Version table: abi-monitor: Installed: (none) Candidate: 1.12-2 Version table: 1.12-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages mate-system-monitor-common: Installed: (none) Candidate: 1.20.2-1 Version table: 1.20.2-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi+physicalmonitorenumerationapi-dev: Installed: (none) Candidate: (none) Version table: python3-daemonize: Installed: (none) Candidate: 2.4.7-2 Version table: 2.4.7-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages kopano-monitor: Installed: (none) Candidate: 8.7.0-3 Version table: 8.7.0-3 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages monit: Installed: 1:5.26.0-1 Candidate: 1:5.26.0-1 Version table: *** 1:5.26.0-1 500 500 http://packages.openmediavault.org/public usul/main armhf Packages 100 /var/lib/dpkg/status 1:5.25.2-3 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages parcimonie: Installed: (none) Candidate: 0.11.0-1 Version table: 0.11.0-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libipmimonitoring6: Installed: (none) Candidate: 1.6.3-1.1 Version table: 1.6.3-1.1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages monitoring-plugins-common: Installed: (none) Candidate: 2.2-6 Version table: 2.2-6 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages monitoring-plugins: Installed: (none) Candidate: 2.2-6 Version table: 2.2-6 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages daemonize: Installed: (none) Candidate: 1.7.7-1 Version table: 1.7.7-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages ganglia-monitor-python: Installed: (none) Candidate: 3.6.0-7 Version table: 3.6.0-7 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages nordugrid-arc-ldap-monitor: Installed: (none) Candidate: 5.4.3-2 Version table: 5.4.3-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages python-daemonize: Installed: (none) Candidate: 2.4.7-2 Version table: 2.4.7-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages puppet-module-sbitio-monit: Installed: (none) Candidate: 1.0.0-2 Version table: 1.0.0-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages ups-monitor: Installed: (none) Candidate: (none) Version table: bareos-traymonitor: Installed: (none) Candidate: 16.2.6-5 Version table: 16.2.6-5 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libmonitoring-availability-perl: Installed: (none) Candidate: 0.46-1 Version table: 0.46-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0+highlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: librust-winapi-0.3.6+physicalmonitorenumerationapi-dev: Installed: (none) Candidate: (none) Version table: libmnemonicsetter-java: Installed: (none) Candidate: 0.5-1 Version table: 0.5-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libktpcommoninternalsprivate6: Installed: (none) Candidate: (none) Version table: libktpcommoninternalsprivate7: Installed: (none) Candidate: (none) Version table: librust-winapi-0.3.6+lowlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: argonaut-fai-monitor: Installed: (none) Candidate: 1.2.3-2 Version table: 1.2.3-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages gnome-shell-extension-multi-monitors: Installed: (none) Candidate: 16-1 Version table: 16-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages bacula-traymonitor: Installed: (none) Candidate: (none) Version table: monitoring-plugins-btrfs: Installed: (none) Candidate: 11-2 Version table: 11-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi+lowlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: librust-winapi-0.3+physicalmonitorenumerationapi-dev: Installed: (none) Candidate: (none) Version table: nordugrid-arc-ws-monitor: Installed: (none) Candidate: 5.4.3-2 Version table: 5.4.3-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libipmimonitoring-dev: Installed: (none) Candidate: 1.6.3-1.1 Version table: 1.6.3-1.1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages cairo-dock-system-monitor-plug-in: Installed: (none) Candidate: 3.4.1-4+b7 Version table: 3.4.1-4+b7 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libktpcommoninternalsprivate-dev: Installed: (none) Candidate: (none) Version table: golang-github-nebulouslabs-entropy-mnemonics-dev: Installed: (none) Candidate: 0.0~git20170316.0.7b01a64-1 Version table: 0.0~git20170316.0.7b01a64-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi+highlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: gmidimonitor: Installed: (none) Candidate: 3.6+dfsg0-3 Version table: 3.6+dfsg0-3 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libmonitoring-plugin-perl: Installed: (none) Candidate: 0.40-1 Version table: 0.40-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages librust-winapi-0.3+highlevelmonitorconfigurationapi-dev: Installed: (none) Candidate: (none) Version table: bacula-tray-monitor: Installed: (none) Candidate: 9.4.2-2 Version table: 9.4.2-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages jenkins-memory-monitor-doc: Installed: (none) Candidate: 1.9-1 Version table: 1.9-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages monitoring-plugins-standard: Installed: (none) Candidate: 2.2-6 Version table: 2.2-6 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages gnome-shell-extension-system-monitor: Installed: (none) Candidate: 36-1 Version table: 36-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages ganglia-monitor: Installed: (none) Candidate: 3.6.0-7+b1 Version table: 3.6.0-7+b1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages nut-monitor: Installed: (none) Candidate: 2.7.4-8 Version table: 2.7.4-8 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libmonitoring-livestatus-class-perl: Installed: (none) Candidate: 0.06-1.1 Version table: 0.06-1.1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libthread-conveyor-monitored-perl: Installed: (none) Candidate: 0.14-1 Version table: 0.14-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages jenkins-memory-monitor: Installed: (none) Candidate: 1.9-1 Version table: 1.9-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages nordugrid-arc-monitor: Installed: (none) Candidate: (none) Version table: libmonitoring-livestatus-perl: Installed: (none) Candidate: 0.80-1 Version table: 0.80-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages libfile-monitor-perl: Installed: (none) Candidate: 1.00-1 Version table: 1.00-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages cairo-dock-system-monitor-plugin: Installed: (none) Candidate: (none) Version table: libmoosex-daemonize-perl: Installed: (none) Candidate: 0.21-1 Version table: 0.21-1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

ryecoaaron commented 4 years ago

Thanks for the output. You didn’t need the question mark on the end of the command. That was just part of my sentence:) But it does tell me you have to omv package installed. Maybe the omv package has issues on raspbian. I have something to try now.

cptTesa commented 4 years ago

Great news. I was quite sure that it was part of your sentence. Fiddled its way into the console. Copy/Paste issue ;-) Anyways. Thanks for digging in. Good night.

ryecoaaron commented 4 years ago

No matter what version I install on fresh images, I can't get it to fail. I even tried upgrading and downgrading multiple times. Can someone try:

write fresh image boot system sudo apt-get update sudo apt-get install monit

If it fails, can you post the output of: sudo systemctl status monit sudo journalctl -u monit

cptTesa commented 4 years ago

Done what you said:

pi@raspberrypi:~ $ sudo apt-get install monit Reading package lists... Done Building dependency tree
Reading state information... Done Suggested packages: default-mta | postfix | mail-transport-agent sysvinit-core The following NEW packages will be installed: monit 0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded. Need to get 291 kB of archives. After this operation, 847 kB of additional disk space will be used. Get:1 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf monit armhf 1:5.25.2-3 [291 kB] Fetched 291 kB in 1s (488 kB/s) Selecting previously unselected package monit. (Reading database ... 39873 files and directories currently installed.) Preparing to unpack .../monit_1%3a5.25.2-3_armhf.deb ... Unpacking monit (1:5.25.2-3) ... Setting up monit (1:5.25.2-3) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for systemd (241-7~deb10u4+rpi1) ...

Installed flawlessly. But version 1:5.25.2-3. Fired up the script afterwards leads to an monit upgrade version 1:5.26.9-1.

pi@raspberrypi:~ $ sudo systemctl status monit ● monit.service - LSB: service and re Loaded: loaded (/etc/init.d/monit; Active: failed (Result: exit-code) Docs: man:systemd-sysv-generator Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi monit[337Aug 25 16:49:40 raspberrypi monit[337Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1lines 1-11/11 (END)

pi@raspberrypi:~ $ sudo journalctl -u monit -- Logs begin at Tue 2020-08-25 16:17Aug 25 16:42:11 raspberrypi systemd[1Aug 25 16:42:11 raspberrypi monit[868Aug 25 16:42:11 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi monit[337Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi monit[337Aug 25 16:49:40 raspberrypi monit[337Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1Aug 25 16:49:40 raspberrypi systemd[1lines 1-14/14 (END)

cptTesa commented 4 years ago

I think the phone messed it up. Will edit later

ryecoaaron commented 4 years ago

@cptTesa did the monit upgrade fail?

cptTesa commented 4 years ago

Think so. As "the script mentioned" one package is upgradable and upgraded monit.

The upgrade itself went fine. Afterwards same behavior as above:

.... Errors were encountered while processing: monit E: Sub-process /usr/bin/dpkg returned an error code (1) failed installing monit

ryecoaaron commented 4 years ago

I made another change to the script where it installs monit from the raspberrypi repos (on RPis) and won't upgrade monit to the OMV version.

cptTesa commented 4 years ago

Alright @ryecoaaron Things went fine. Somehow. Installation done. Saw some red entries around the php-stuff. Now there is a 502 Bad gateway reported by nginx on the main page. But so far: thanks a lot.