OpenNMS Minion update to version 29.0.0-1 issue

Hi,
I’m trying to update my opennms-minion server from version 28.1.1-1 to 29.0.0-1, this is the procedure I followed:

  1. Install updates.
  2. Run command: systemctl daemon-reload.
  3. Remove all *.rpmsave or *.rpmnew files in /opt/minion/ directory.
  4. Run command: systemctl restart minion

At this point this is the error I get:

Nov 18 11:21:54 minion_server systemd[1]: Starting The OpenNMS Minion distributed client....
Nov 18 11:21:55 minion_server minion[4293]: id: opennms: no such user
Nov 18 11:21:55 minion_server systemd[1]: minion.service: control process exited, code=exited status=4
Nov 18 11:21:55 minion_server systemd[1]: Failed to start The OpenNMS Minion distributed client..
Nov 18 11:21:55 minion_server systemd[1]: Unit minion.service entered failed state.
Nov 18 11:21:55 minion_server systemd[1]: minion.service failed.

Could you help me about this issue please?

Thank you and best regards

1 Like

Unless you’ve already upgraded your core to 29.0.0, which requires 29.0.0 minions, leave them at 28.1.1. 29.0.0 is pretty broken, 29.0.1 should be released with fixes in the next few days.

1 Like

Hi,

I’ve just updated opennms-minion from 29.0.0-1 to 29.0.1.1 but I’m still getting errors like below;

systemctl status minion.service
● minion.service - The OpenNMS Minion distributed client.
     Loaded: loaded (/lib/systemd/system/minion.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-11-22 09:16:21 UTC; 4min 16s ago
    Process: 8513 ExecStart=/etc/init.d/minion start (code=exited, status=4)

Nov 22 09:16:20 opg-dc001-nms-aa systemd[1]: Starting The OpenNMS Minion distributed client....
Nov 22 09:16:21 opg-dc001-nms-aa minion[8731]: id: ‘opennms’: no such user
Nov 22 09:16:21 opg-dc001-nms-aa systemd[1]: minion.service: Control process exited, code=exited, status=4/NOPERMISSION
Nov 22 09:16:21 opg-dc001-nms-aa systemd[1]: minion.service: Failed with result 'exit-code'.
Nov 22 09:16:21 opg-dc001-nms-aa systemd[1]: Failed to start The OpenNMS Minion distributed client..

After that I’ve created ‘opennms’ user because the error logs were saying “id: ‘opennms’: no such user”. Then I tried it again and received below error logs;

sudo systemctl enable --now minion
Synchronizing state of minion.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable minion
Job for minion.service failed because the control process exited with error code.
See "systemctl status minion.service" and "journalctl -xe" for details.

systemctl status minion.service
● minion.service - The OpenNMS Minion distributed client.
     Loaded: loaded (/lib/systemd/system/minion.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-11-22 09:21:18 UTC; 7s ago
    Process: 9012 ExecStart=/etc/init.d/minion start (code=exited, status=1/FAILURE)

Nov 22 09:20:43 opg-dc001-nms-aa systemd[1]: Starting The OpenNMS Minion distributed client....
Nov 22 09:20:43 opg-dc001-nms-aa runuser[9281]: pam_unix(runuser:session): session opened for user opennms by (uid=0)
Nov 22 09:20:43 opg-dc001-nms-aa runuser[9281]: pam_unix(runuser:session): session closed for user opennms
Nov 22 09:20:43 opg-dc001-nms-aa runuser[9283]: pam_unix(runuser:session): session opened for user opennms by (uid=0)
Nov 22 09:20:43 opg-dc001-nms-aa runuser[9283]: pam_unix(runuser:session): session closed for user opennms
Nov 22 09:21:18 opg-dc001-nms-aa systemd[1]: minion.service: Control process exited, code=exited, status=1/FAILURE
Nov 22 09:21:18 opg-dc001-nms-aa systemd[1]: minion.service: Failed with result 'exit-code'.
Nov 22 09:21:18 opg-dc001-nms-aa systemd[1]: Failed to start The OpenNMS Minion distributed client..

It’s a new Ubuntu installation;
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

I also removed and purged everything about opennms-minion package to make it ready for fresh re-install but I couldn’t be success.

I’ll be grateful for your helps.
Thanks in advance!

Not sure why the minion init script is looking for an opennms user…

Can you edit /etc/init.d/minion to run with bash -x, try to start the minion, and post the entire journalctl output?

1 Like

Thanks for your reply Dino,

Tbh, I’m not a LinuxExpert but into the file I see “RUNAS=“opennms”” parameter and value. I’m going to copy-paste whole /etc/init.d/minion file here;

#!/bin/sh -
#
# chkconfig:   345 99 01
# description: Starts and stops the OpenNMS Minion distributed client
# processname: java
#
### BEGIN INIT INFO
# Provides:          minion
# Required-Start:    $network $remote_fs
# Required-Stop:     $network $remote_fs
# Should-Start:      $local_fs
# Should-Stop:       $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: OpenNMS Minion
# Description:       OpenNMS Minion in a Karaf Container
### END INIT INFO

NAME="minion"
DESC="Minion"
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CONTAINER_HOME="/usr/share/minion"
SYSCONFDIR="/etc/default"
RUNAS="opennms"
STOP_RETRIES=10
STOP_WAIT=5
PING_REQUIRED=TRUE
PIDFILE="/var/log/minion/minion.pid"

and rest of the config includes “runas” parameter many times.

I’m going to try your suggestion right now.

Because of the my reply limit I’m going to add a fresh Ubuntu VM (20.04.3 LTS) and Minion(29.0.1-1) installation logs here;

"
0 updates can be applied immediately.

Last login: Tue Nov 23 10:23:56 2021 from 172.
.
.
gpg: key 57801F6F5B9EFD43: public key "OpenNMS Signing Key 2012 (1024-bit) <opennms@opennms.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
localadmin@gpu-dc001-nms-a:~$ sudo add-apt-repository -s 'deb ... stable main'
...
stable Release (expected stable but got opennms-29)
localadmin@gpu-dc001-nms-a:~$ sudo apt -y install opennms-minion
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java fontconfig-config fonts-dejavu-core haveged java-common jicmp jicmp6 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libfontconfig1 libgraphite2-3 libharfbuzz0b
  libhavege1 libjpeg-turbo8 libjpeg8 liblcms2-2 libpcsclite1 openjdk-11-jre-headless
Suggested packages:
  default-jre cups-common liblcms2-utils pcscd libnss-mdns fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
  ca-certificates-java fontconfig-config fonts-dejavu-core haveged java-common jicmp jicmp6 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libfontconfig1 libgraphite2-3 libharfbuzz0b
  libhavege1 libjpeg-turbo8 libjpeg8 liblcms2-2 libpcsclite1 openjdk-11-jre-headless opennms-minion
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 315 MB of archives.
After this operation, 517 MB of additional disk space will be used.
.
.
.
+----[SHA256]-----+
chown: cannot access '/var/lib/minion/data/tmp': No such file or directory
chown: cannot access '/var/lib/minion/data/tmp/README': No such file or directory
dpkg: error processing package opennms-minion (--configure):
 installed opennms-minion package post-installation script subprocess returned error exit status 123
Setting up libjpeg-turbo8:amd64 (2.0.3-0ubuntu1.20.04.1) ...
Setting up jicmp (2.0.2-1) ...
Setting up libharfbuzz0b:amd64 (2.6.4-1ubuntu4) ...
Setting up jicmp6 (2.0.2-1) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up haveged (1.9.1-6ubuntu1) ...
Created symlink /etc/systemd/system/default.target.wants/haveged.service → /lib/systemd/system/haveged.service.
Setting up fontconfig-config (2.13.1-2ubuntu3) ...
Setting up libavahi-common3:amd64 (0.7-4ubuntu7.1) ...
Setting up libfontconfig1:amd64 (2.13.1-2ubuntu3) ...
Setting up libavahi-client3:amd64 (0.7-4ubuntu7.1) ...
Setting up libcups2:amd64 (2.3.1-9ubuntu1.1) ...
Setting up ca-certificates-java (20190405ubuntu1) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:NAVER_Global_Root_Certification_Authority.pem
Adding debian:Trustis_FPS_Root_CA.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:SZAFIR_ROOT_CA2.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:ACCVRAIZ1.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:certSIGN_Root_CA_G2.pem
Adding debian:Amazon_Root_CA_4.pem
Adding debian:e-Szigno_Root_CA_2017.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:emSign_Root_CA_-_G1.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem
Adding debian:OISTE_WISeKey_Global_Root_GC_CA.pem
Adding debian:UCA_Extended_Validation_Root.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:Entrust_Root_Certification_Authority_-_G4.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:Trustwave_Global_ECC_P384_Certification_Authority.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:Certigna.pem
Adding debian:Cybertrust_Global_Root.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:Izenpe.com.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:SSL.com_Root_Certification_Authority_ECC.pem
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:Microsoft_ECC_Root_Certificate_Authority_2017.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:SSL.com_Root_Certification_Authority_RSA.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
Adding debian:Secure_Global_CA.pem
Adding debian:Network_Solutions_Certificate_Authority.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Amazon_Root_CA_2.pem
Adding debian:Certigna_Root_CA.pem
Adding debian:emSign_Root_CA_-_C1.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:UCA_Global_G2_Root.pem
Adding debian:EC-ACC.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem
Adding debian:GDCA_TrustAUTH_R5_ROOT.pem
Adding debian:GTS_Root_R2.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:Trustwave_Global_Certification_Authority.pem
Adding debian:GTS_Root_R1.pem
Adding debian:ISRG_Root_X1.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem
Adding debian:Certum_Trusted_Network_CA_2.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:AffirmTrust_Premium.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:TrustCor_RootCert_CA-2.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_RSA_R2.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:Amazon_Root_CA_1.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:Chambers_of_Commerce_Root_-_2008.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Hongkong_Post_Root_CA_3.pem
Adding debian:Amazon_Root_CA_3.pem
Adding debian:GlobalSign_Root_CA_-_R2.pem
Adding debian:emSign_ECC_Root_CA_-_G3.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:TrustCor_ECA-1.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:GlobalSign_Root_CA_-_R6.pem
Adding debian:Sonera_Class_2_Root_CA.pem
Adding debian:AC_RAIZ_FNMT-RCM.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:Microsoft_RSA_Root_Certificate_Authority_2017.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:SecureTrust_CA.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:GTS_Root_R3.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_ECC.pem
Adding debian:Trustwave_Global_ECC_P256_Certification_Authority.pem
Adding debian:emSign_ECC_Root_CA_-_C3.pem
Adding debian:Global_Chambersign_Root_-_2008.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:GTS_Root_R4.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
Adding debian:QuoVadis_Root_CA.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:VeriSign_Universal_Root_Certification_Authority.pem
Adding debian:TrustCor_RootCert_CA-1.pem
done.
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for systemd (245.4-4ubuntu3.13) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ca-certificates (20210119~20.04.2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
Setting up openjdk-11-jre-headless:amd64 (11.0.11+9-0ubuntu2~20.04) ...
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Errors were encountered while processing:
 opennms-minion
E: Sub-process /usr/bin/dpkg returned an error code (1)
localadmin@gpu-dc001-nms-a:~$ sudo apt -fy install opennms-minion
Reading package lists... Done
Building dependency tree
Reading state information... Done
opennms-minion is already the newest version (29.0.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up opennms-minion (29.0.1-1) ...
chown: cannot access '/var/lib/minion/data/tmp': No such file or directory
chown: cannot access '/var/lib/minion/data/tmp/README': No such file or directory
dpkg: error processing package opennms-minion (--configure):
 installed opennms-minion package post-installation script subprocess returned error exit status 123
Errors were encountered while processing:
 opennms-minion
E: Sub-process /usr/bin/dpkg returned an error code (1)
localadmin@gpu-dc001-nms-a:~$

I also installed new CentOS 8 and tried to install minion 29.0.1-1 on it, but again I received “no such user” error for ‘opennms’ user;

[localadmin@gpu-dc001-nms-a ~]$ sudo systemctl enable --now minion
Synchronizing state of minion.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable minion
Created symlink /etc/systemd/system/multi-user.target.wants/minion.service → /usr/lib/systemd/system/minion.service.
Job for minion.service failed because the control process exited with error code.
See "systemctl status minion.service" and "journalctl -xe" for details.
[localadmin@gpu-dc001-nms-a ~]$ systemctl status minion.service
● minion.service - The OpenNMS Minion distributed client.
   Loaded: loaded (/usr/lib/systemd/system/minion.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2021-11-23 12:32:42 CET; 21s ago
  Process: 32728 ExecStart=/etc/init.d/minion start (code=exited, status=4)

Nov 23 12:32:42 gpu-dc001-nms-a systemd[1]: Starting The OpenNMS Minion distributed client....
Nov 23 12:32:42 gpu-dc001-nms-a minion[32728]: id: ‘opennms’: no such user
Nov 23 12:32:42 gpu-dc001-nms-a systemd[1]: minion.service: Control process exited, code=exited status=4
Nov 23 12:32:42 gpu-dc001-nms-a systemd[1]: minion.service: Failed with result 'exit-code'.
Nov 23 12:32:42 gpu-dc001-nms-a systemd[1]: Failed to start The OpenNMS Minion distributed client..
[localadmin@gpu-dc001-nms-a ~]$

Thanks for your time and help.

You could find the output at below;

Nov 22 15:27:29 opg-dc001-nms-aa sudo[12771]: localadmin : TTY=pts/0 ; PWD=/home/localadmin ; USER=root ; COMMAND=/usr/bin/vim /etc/init.d/minion
Nov 22 15:27:29 opg-dc001-nms-aa sudo[12771]: pam_unix(sudo:session): session opened for user root by localadmin(uid=0)
Nov 22 15:27:56 opg-dc001-nms-aa sudo[12771]: pam_unix(sudo:session): session closed for user root
Nov 22 15:28:19 opg-dc001-nms-aa polkitd(authority=local)[892]: Registered Authentication Agent for unix-process:12975:2943471 (system bus name :1.75 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object p>
Nov 22 15:28:22 opg-dc001-nms-aa polkitd(authority=local)[892]: Operator of unix-process:12975:2943471 successfully authenticated as unix-user:localadmin to gain ONE-SHOT authorization for action org.freede>
Nov 22 15:28:22 opg-dc001-nms-aa systemd[1]: Starting The OpenNMS Minion distributed client....
Nov 22 15:28:23 opg-dc001-nms-aa runuser[13244]: pam_unix(runuser:session): session opened for user opennms by (uid=0)
Nov 22 15:28:23 opg-dc001-nms-aa runuser[13244]: pam_unix(runuser:session): session closed for user opennms
Nov 22 15:28:23 opg-dc001-nms-aa runuser[13246]: pam_unix(runuser:session): session opened for user opennms by (uid=0)
Nov 22 15:28:23 opg-dc001-nms-aa runuser[13246]: pam_unix(runuser:session): session closed for user opennms
Nov 22 15:28:41 opg-dc001-nms-aa polkitd(authority=local)[892]: Unregistered Authentication Agent for unix-process:12975:2943471 (system bus name :1.75, object path /org/freedesktop/PolicyKit1/Authenticatio>
Nov 22 15:28:58 opg-dc001-nms-aa systemd[1]: minion.service: Control process exited, code=exited, status=1/FAILURE
Nov 22 15:28:58 opg-dc001-nms-aa systemd[1]: minion.service: Failed with result 'exit-code'.
Nov 22 15:28:58 opg-dc001-nms-aa systemd[1]: Failed to start The OpenNMS Minion distributed client..
lines 937-1001/1001 (END)