Running sudo service rabbitmq-server start results in the following output:
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
systemctl status output for rabbitmq-server.service is as follows:
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2019-01-30 13:45:25 +08; 4s ago
Process: 32710 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl shutdown (code=exited, status=69)
Process: 6836 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=64)
Main PID: 6836 (code=exited, status=64)
Jan 30 13:45:25 ip-172-31-1-92 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=64/n/a
Jan 30 13:45:25 ip-172-31-1-92 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
Jan 30 13:45:25 ip-172-31-1-92 systemd[1]: Failed to start RabbitMQ broker.
Turns out the problem was I had set the environment variable RABBITMQ_CONFIG_FILE to /etc/rabbitmq/rabbitmq.config but created that file as rabbitmq.conf. The server crashed as a result trying to look for a file that didn't exist.
Related
I am following this below guide to install free SSL on AWS linux server using Certbot.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt
I have followed the instructions under "Prepare to install" till STEP 2 in the above guide. But I can't able to restart httpd after editing etc/httpd/conf/httpd.conf file as mentioned in the guide.
See the error I got below:
[ec2-user#ip-172-31-40-34 ~]$ sudo systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Result of systemctl status httpd.service
[ec2-user#ip-172-31-40-34 ~]$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-03-31 06:22:10 UTC; 6min ago
Docs: man:httpd.service(8)
Process: 5145 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5145 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: Sta...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal httpd[5145]: AH...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal httpd[5145]: In...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: htt...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: Fai...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: Uni...
Mar 31 06:22:10 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: htt...
Hint: Some lines were ellipsized, use -l to show in full.
Result of journalctl -xe
[ec2-user#ip-172-31-40-34 ~]$ journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Mar 31 06:30:02 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: Starte
-- Subject: Unit session-86.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-86.scope has finished starting up.
--
-- The start-up result is done.
Mar 31 06:30:02 ip-172-31-40-34.eu-central-1.compute.internal CROND[5164]: (root
Mar 31 06:30:02 ip-172-31-40-34.eu-central-1.compute.internal systemd[1]: Remove
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Mar 31 06:30:51 ip-172-31-40-34.eu-central-1.compute.internal dhclient[2878]: XM
Mar 31 06:32:41 ip-172-31-40-34.eu-central-1.compute.internal dhclient[2878]: XM
[1]+ Stopped journalctl -xe
Output of the apachectl configtest
[ec2-user#ip-172-31-40-34 httpd]$ apachectl configtest
AH00526: Syntax error on line 48 of /etc/httpd/conf/httpd.conf:
Invalid command '\xcb', perhaps misspelled or defined by a module not included in the server configuration
I uninstalled apache, php, mysql, proftpd, wordpress, cerbot and letsencrypt to get a new, fresh install of apache.
After uninstalling all packages and reinstalling apache, i got this error:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "restart" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-08-28 15:46:46 CEST; 23ms ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 10693 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Aug 28 15:46:46 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Aug 28 15:46:46 raspberrypi apachectl[10693]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory
Aug 28 15:46:46 raspberrypi apachectl[10693]: Action 'start' failed.
Aug 28 15:46:46 raspberrypi apachectl[10693]: The Apache error log may have more information.
Aug 28 15:46:46 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 28 15:46:46 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 28 15:46:46 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u8+rpi1) ...
I tried to remove all apache-related packages by
sudo apt-get remove apache2
sudo apt autoremove
but this didn't work either.
You have an typing error on line 225 of file /etc/apache2/apache2.conf
I flashed a new image onto the Pi because I couldn't make it run.
I am trying to install rabbitmq. So I am facing issue as follow. For installation, I am using this blog
Reading package lists... Done
Building dependency tree
Reading state information... Done
rabbitmq-server is already the newest version (3.8.7-1).
The following packages were automatically installed and are no longer required:
erlang-diameter erlang-edoc erlang-erl-docgen erlang-eunit erlang-ic erlang-inviso erlang-nox erlang-odbc erlang-percept erlang-ssh libodbc1 libsctp1
Use 'sudo apt autoremove' to remove them.
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.
Do you want to continue? [Y/n] y
Setting up rabbitmq-server (3.8.7-1) ...
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-08-31 17:20:23 IST; 4ms ago
Process: 6118 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 6118 (code=exited, status=1/FAILURE)
Aug 31 17:20:23 mahesh-Latitude-3500 systemd[1]: Failed to start RabbitMQ broker.
dpkg: error processing package rabbitmq-server (--configure):
installed rabbitmq-server package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Many times I have removed all packages of rabbitmq and installed it again but nothing worked.
I tried fixing this issue with the following command as I got from other blogs.
$ sudo apt-get update --fix-missing
$ sudo dpkg --configure -a
$ sudo apt-get install -f
$ sudo apt-get install rabbitmq-server -y --fix-missing
Logs after running systemctl status rabbitmq-server.service
rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-08-31 17:43:11 IST; 1s ago
Process: 1878 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 1878 (code=exited, status=1/FAILURE)
And logs after running journalctl -xe
-- Unit rabbitmq-server.service has begun starting up.
Aug 31 17:44:17 mahesh-Latitude-3500 rabbitmq-server[3761]: Configuring logger redirection
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ## ## RabbitMQ 3.8.7
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ## ##
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ########## Copyright (c) 2007-2020 VMware, Inc. or its affiliates.
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ###### ##
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Doc guides: https://rabbitmq.com/documentation.html
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Support: https://rabbitmq.com/contact.html
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Tutorials: https://rabbitmq.com/getstarted.html
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Monitoring: https://rabbitmq.com/monitoring.html
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Logs: /var/log/rabbitmq/rabbit#mahesh-Latitude-3500.log
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: /var/log/rabbitmq/rabbit#mahesh-Latitude-3500_upgrade.log
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Config file(s): (none)
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Starting broker...
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: BOOT FAILED
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: ===========
Aug 31 17:44:19 mahesh-Latitude-3500 rabbitmq-server[3761]: Error during startup: {error,{could_not_start_listener,"::",5672,eaddrinuse}}
Aug 31 17:44:20 mahesh-Latitude-3500 rabbitmq-server[3761]: {"init terminating in do_boot",{error,{could_not_start_listener,"::",5672,eaddrinuse}}}
Aug 31 17:44:20 mahesh-Latitude-3500 rabbitmq-server[3761]: init terminating in do_boot ({error,{could_not_start_listener,::,5672,eaddrinuse}})
Aug 31 17:44:20 mahesh-Latitude-3500 rabbitmq-server[3761]: [1B blob data]
Aug 31 17:44:20 mahesh-Latitude-3500 rabbitmq-server[3761]: Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done
Aug 31 17:44:20 mahesh-Latitude-3500 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
Aug 31 17:44:20 mahesh-Latitude-3500 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
Aug 31 17:44:20 mahesh-Latitude-3500 systemd[1]: Failed to start RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit rabbitmq-server.service has failed.
--
-- The result is RESULT.
Aug 31 17:44:30 mahesh-Latitude-3500 systemd[1]: rabbitmq-server.service: Service hold-off time over, scheduling restart.
Aug 31 17:44:30 mahesh-Latitude-3500 systemd[1]: rabbitmq-server.service: Scheduled restart job, restart counter is at 179.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit rabbitmq-server.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Aug 31 17:44:30 mahesh-Latitude-3500 systemd[1]: Stopped RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit rabbitmq-server.service has finished shutting down.
Aug 31 17:44:30 mahesh-Latitude-3500 systemd[1]: Starting RabbitMQ broker...
-- Subject: Unit rabbitmq-server.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit rabbitmq-server.service has begun starting up.
Nothing has worked. Please help.
Thanks in advance.
The problem most likely is that the port rabbitmq is trying to use is currently in use by another process.
This is stated in the output of journalctl -xe
... : Error during startup: {error,{could_not_start_listener,"::",5672,eaddrinuse}}
you can see all the ports currently in use on the machine with
$ lsof -i -P -n
or to check specifically for that port
$ lsof -i -P -n|grep 5672
so you could either kill the process using port 5672 or change the port used by rabbitmq
I am trying to install rabbitmq from last 16 hours and tried on ubunutu 18 and 16.04 by following commands:
https://gist.github.com/fernandoaleman/72f0ad39e11915c0077d544b50096b50
I don't know why it is not starting:
rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2018-10-31 05:19:15 EDT; 11ms ago
Process: 723 ExecStop=/bin/sh -c while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done (code=exited, status=0/SUCCESS)
Process: 340 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
Process: 32210 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 32210 (code=exited, status=1/FAILURE)
Oct 31 05:19:15 vps47024 systemd[1]: Failed to start RabbitMQ broker.
Oct 31 05:19:15 vps47024 systemd[1]: rabbitmq-server.service: Unit entered ...e.
Oct 31 05:19:15 vps47024 systemd[1]: rabbitmq-server.service: Failed with r...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I also tried with this
https://www.howtoinstall.co/en/ubuntu/trusty/rabbitmq-server?action=remove
But same issue again..
Kindly help me out on this!
I installed redis using
sudo apt-get -y install redis-server
The default data directory is /var/lib/redis/, but when I changed to another directory /some path/redisDB in file: sudo gedit /etc/redis/redis.conf, I cannot start the redis sever again. I get an error as
Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details.
systemctl status redis-server.service
redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled;
vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Do 2018-06-14 17:29:03 CEST; 8s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 18601 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
Process: 18597 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 18594 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
Process: 18730 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Process: 18727 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)
Main PID: 18000 (code=exited, status=0/SUCCESS)
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Failed to start Advanced key-value store.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Unit entered failed state.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Stopped Advanced key-value store.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Start request repeated too quickly.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Failed to start Advanced key-value store.
The path you have referenced does not exist or user under which redis is started has no write permissions to it.