Slapd won't start via service - email

Doing sudo service slapd start throws an error:
-- Unit slapd.service has begun starting up.
Apr 08 08:47:31 mail slapd[31144]: * Starting OpenLDAP slapd Apr 08
08:47:32 mail slapd[31149]: #(#) $OpenLDAP: slapd (Ubuntu) (May 30
2017 19:20:53)
$buildd#lgw01-18:/build/openldap-JXEADB/openldap-2.4.42+dfsg/debian/build/se
Apr 08 08:47:32 mail slapd[31149]: DIGEST-MD5 common mech free
Apr 08 08:47:32 mail slapd[31144]: ...fail!
Apr 08 08:47:32 mail systemd[1]: slapd.service: Control process exited,
code=exited status=1
Apr 08 08:47:32 mail systemd[1]: Failed to start LSB:
OpenLDAP standalone server (Lightweight Directory Access Protoco
-- Subject: Unit slapd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit slapd.service has failed.
-- The result is failed.
Apr 08 08:47:32 mail systemd[1]: slapd.service: Unit entered failed state.
Apr 08 08:47:32 mail systemd[1]: slapd.service: Failed with result 'exit-code'.
I did check directory permissions. Fine.
Starting sudo -u openldap slapd -d 1 is working fine, no errors thrown.
Any ideas why it won't start? The journalctl output is not helpful what exactly the error is.

Related

Unable to start postgres

I added some files to systemed folder on my CentOS, after that postgresql service can not start with the error -
Job for postgresql-14.service failed because the control process exited with error code. See "systemctl status postgresql-14.service" and "journalctl -xe" for details.
systemctl status -
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: Starting PostgreSQL 14 database server...
Feb 08 20:47:38 82-166-106-208.barak-online.net postmaster[2525]: 2023-02-08 20:47:38.805 IST [2525] LOG: redirecting log output to logging collector process
Feb 08 20:47:38 82-166-106-208.barak-online.net postmaster[2525]: 2023-02-08 20:47:38.805 IST [2525] HINT: Future log output will appear in directory "log".
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: postgresql-14.service: main process exited, code=exited, status=1/FAILURE
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: Failed to start PostgreSQL 14 database server.
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: Unit postgresql-14.service entered failed state.
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: postgresql-14.service failed.
journalctl -xe
-- Unit postgresql-14.service has begun starting up.
Feb 08 20:47:38 82-166-106-208.barak-online.net postmaster[2525]: 2023-02-08 20:47:38.805 IST [2525] LOG: redirecting log output to logging collector process
Feb 08 20:47:38 82-166-106-208.barak-online.net postmaster[2525]: 2023-02-08 20:47:38.805 IST [2525] HINT: Future log output will appear in directory "log".
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: postgresql-14.service: main process exited, code=exited, status=1/FAILURE
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: Failed to start PostgreSQL 14 database server.
-- Subject: Unit postgresql-14.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-14.service has failed.
--
-- The result is failed.
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: Unit postgresql-14.service entered failed state.
Feb 08 20:47:38 82-166-106-208.barak-online.net systemd[1]: postgresql-14.service failed.
Feb 08 20:47:38 82-166-106-208.barak-online.net polkitd[774]: Unregistered Authentication Agent for unix-process:2512:147782 (system bus name :1.40, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN
lines 2104-2163/2163 (END)
Appears to be an authentication error, check this out https://www.sqlshack.com/learn-postgresql-install-postgresql-on-centos-linux/

Job for mongod.service failed because a fatal signal was delivered to the control process

I installe mongodb following this tutorial https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-red-hat/ but this is the result of sudo systemctl status mongod
[root#ns1 ~]# sudo systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Wed 2022-07-06 00:31:55 +03; 14min ago
Docs: https://docs.mongodb.org/manual
Process: 561243 ExecStart=/usr/bin/mongod $OPTIONS (code=killed, signal=ILL)
Process: 561241 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 561239 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 561238 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Starting MongoDB Database Server...
Jul 06 00:31:55 ns1.localhost.com systemd[1]: mongod.service: control process exited, code=killed status=4
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Failed to start MongoDB Database Server.
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Unit mongod.service entered failed state.
Jul 06 00:31:55 ns1.localhost.com systemd[1]: mongod.service failed.
journalctl -xe
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID c15063 has been created for the user root.
--
-- The leading process of the session is 561230.
Jul 06 00:31:55 ns1.localhost.com sudo[561230]: pam_unix(sudo:session): session opened for user root by root
Jul 06 00:31:55 ns1.localhost.com polkitd[458]: Registered Authentication Agent for unix-process:561232:1926
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Starting MongoDB Database Server...
-- Subject: Unit mongod.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has begun starting up.
Jul 06 00:31:55 ns1.localhost.com kernel: traps: mongod[561243] trap invalid opcode ip:55b5947535da sp:7ffd0
Jul 06 00:31:55 ns1.localhost.com systemd[1]: mongod.service: control process exited, code=killed status=4
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Failed to start MongoDB Database Server.
-- Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has failed.
--
-- The result is failed.
Jul 06 00:31:55 ns1.localhost.com systemd[1]: Unit mongod.service entered failed state.
Jul 06 00:31:55 ns1.localhost.com systemd[1]: mongod.service failed.
Jul 06 00:31:55 ns1.localhost.com polkitd[458]: Unregistered Authentication Agent for unix-process:561232:19
Jul 06 00:31:55 ns1.localhost.com sudo[561230]: pam_unix(sudo:session): session closed for user root
Jul 06 00:31:55 ns1.localhost.com systemd-logind[459]: Removed session c15063.
-- Subject: Session c15063 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Error running mongodb as service on Centos 7

I've got a VPS with Centos 7, But when I try to run MongoDB as service I get the following message:
Apr 06 03:11:46 server.backupserver.com systemd[1]: Starting MongoDB Database Server...
Apr 06 03:11:46 server.backupserver.com mongod[3767]: about to fork child process, waiting until server is ready for connections.
Apr 06 03:11:46 server.backupserver.com mongod[3767]: forked process: 3769
Apr 06 03:11:49 server.backupserver.com systemd[1]: Can't open PID file /var/run/mongodb/mongod.pid (yet?) after start: Too many levels of symbolic links
Apr 06 03:13:17 server.backupserver.com systemd[1]: mongod.service start operation timed out. Terminating.
Apr 06 03:13:17 server.backupserver.com systemd[1]: Failed to start MongoDB Database Server.
Apr 06 03:13:17 server.backupserver.com systemd[1]: Unit mongod.service entered failed state.
Apr 06 03:13:17 server.backupserver.com systemd[1]: mongod.service failed.
I tested the responses from another topics, but it doesn't work yet.
The "var/run/mongodb" directory and the file "mongod.pid" has the right permissions and user (mongod).
Please, help
This seems to be a message that systemd can produce under a variety of conditions. To troubleshoot:
Start with a pristine Docker, Vagrant, VirtualBox etc. image of CentOS 7.
Follow the official MongoDB installation instructions.
If you succeed, follow the official installation instructions on your VPS.

SonarQube is unable to start on CentOS: systemd returns (code=exited, status=203/EXEC)

Following https://www.vultr.com/docs/how-to-install-sonarqube-on-centos-7 to install SonarQube on my CentOS.
When I'm trying to start the SonarQube via sudo systemctl start sonar it is giving below error:
Job for sonar.service failed because the control process exited with error code. See "systemctl status sonar.service" and "journalctl -xe" for details.
Output of systemctl status sonar.service:
sonar.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonar.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2019-04-24 16:56:39 UTC; 19s ago
Process: 23573 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start (code=exited, status=203/EXEC)
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service: control process exited, code=exited status=203
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service holdoff time over, scheduling restart.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: start request repeated too quickly for sonar.service
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
Output of journalctl -xe:
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Starting SonarQube service...
-- Subject: Unit sonar.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has begun starting up.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[23573]: Failed at step EXEC spawning /opt/sonarqube/bin/linux-x86-64/sona
-- Subject: Process /opt/sonarqube/bin/linux-x86-64/sonar.sh could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /opt/sonarqube/bin/linux-x86-64/sonar.sh could not be executed and failed.
--
-- The error number returned by this process is 2.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service: control process exited, code=exited status=203
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
-- Subject: Unit sonar.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has failed.
--
-- The result is failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service holdoff time over, scheduling restart.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: start request repeated too quickly for sonar.service
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Failed to start SonarQube service.
-- Subject: Unit sonar.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sonar.service has failed.
--
-- The result is failed.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: Unit sonar.service entered failed state.
Apr 24 16:56:39 ip-172-31-13-96.ap-south-1.compute.internal systemd[1]: sonar.service failed.
status=203/EXEC means that systemd cannot execute ExecStart script. The most "popular" reasons are:
incorrect path to script
script has invalid permissions:
service user does not have permission to read script
script is not marked as executable
I hope /opt/sonarqube/bin/linux-x86-64/sonar.sh exists, so please verify that the script is marked as executable.

unable to set replica set in mongodb3.2

I am trying to setup a demo replicaset from standalone MongoDB in MongoDB 3.2 with the following options in mongod.conf:
#replication:
oplogSizeMB: 10240
replSetName: "rs0"
But when I am trying to start mongodb it is throwing error:
Starting mongod (via systemctl): Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details. [FAILED]
output of journalctl -xe says:
Jul 02 07:53:56 smartJN3-LTest-Blr1 systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
-- Subject: Unit mongod.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has begun starting up.
Jul 02 07:53:56 smartJN3-LTest-Blr1 runuser[29989]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
Jul 02 07:53:56 smartJN3-LTest-Blr1 runuser[29989]: pam_unix(runuser:session): session closed for user mongod
Jul 02 07:53:56 smartJN3-LTest-Blr1 mongod[29982]: Starting mongod: [FAILED]
Jul 02 07:53:56 smartJN3-LTest-Blr1 systemd[1]: mongod.service: control process exited, code=exited status=1
Jul 02 07:53:56 smartJN3-LTest-Blr1 systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
-- Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has failed.
--
-- The result is failed.
Jul 02 07:53:56 smartJN3-LTest-Blr1 systemd[1]: Unit mongod.service entered failed state.
Jul 02 07:53:56 smartJN3-LTest-Blr1 systemd[1]: mongod.service failed.
Jul 02 07:53:56 smartJN3-LTest-Blr1 polkitd[2089]: Unregistered Authentication Agent for unix-process:29977:8668980 (system bus name :1.114, object path /org
This is on CentOS 7.2 . Thanks
Anyone any help. Thanks
fixed it myself. stupid me, I didn't uncomment the section header replication, which is why the settings were never picked.