Why not start rabbitmq-server? - rabbitmq

Good evening. Faced with the problem: at some point the message broker "floating" (stopped updating the web interface and make the connection). When you try to restart rabbitmq-server start command process stops responding after the message output:
RabbitMQ 3.6.6. Copyright (C) 2007-2016 Pivotal Software, Inc.
Licensed under the MPL. See www.rabbitmq.com
Logs: /var/log/rabbitmq/rabbit#dbserver.log
/var/log/rabbitmq/rabbit#dbserver-sasl.log
Starting broker...
Prompt, as fixed a?
P.S. Command systemctl status rabbitmq-server.service printed:
● rabbitmq-server.service - RabbitMQ broker.
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2016-12-11 15:11:24 UTC; 15s ago
Process: 2872 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
Process: 2795 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=73)
Main PID: 2795 (code=exited, status=73)
Status: "Processing port mapping requests..."
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: * epmd reports: node 'rabbit' not running at all
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: no other nodes on dbserver
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: * suggestion: start the node
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: current node details:
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: - node name: 'rabbitmq-cli-41#dbserver'
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: - home dir: /var/lib/rabbitmq
Dec 11 15:11:24 dbserver rabbitmqctl[2872]: - cookie hash: /637Yxskpg6/iDHKRZfS8g==
Dec 11 15:11:24 dbserver systemd[1]: Failed to start RabbitMQ broker.
Dec 11 15:11:24 dbserver systemd[1]: rabbitmq-server.service: Unit entered failed state.
Dec 11 15:11:24 dbserver systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.

Although I couldn't verify if exit code status=73 means exactly this, for me this issue turned out to be running out of disk space. If you check the rabbitmq logs (/var/log/rabbitmq/), it should give you more context if this is a different error.

Related

Unable to start httpd service on Centos 7 "GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject"

When trying to (re)start httpd service I get the following error:
** (pkttyagent:2574): WARNING **: 01:33:55.345: Unable to register authentication agent:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject Error registering authentication agent:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0) Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Then
systemctl status httpd.service
sheds no light on the problem:
httpd.service - Web server Apache
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-07-22 01:33:55 BST; 26min ago
Process: 2578 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)
Jul 22 01:33:55 server... systemd[1]: Starting Web server Apache...
Jul 22 01:33:55 server... systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 22 01:33:55 server... systemd[1]: Failed to start Web server Apache.
Jul 22 01:33:55 server... systemd[1]: Unit httpd.service entered failed state.
Jul 22 01:33:55 server... systemd[1]: httpd.service failed.
What might be causing this? Where should I look to debug?
[Thu Jul 23 05:40:44.885963 2020] [ssl:emerg] [pid 2877:tid 140514669713280] AH02565: Certificate and private key do not match
Looks like key and certificate do not match. Please check md5 of the key and cert file.
This usually happens when trying to restart a systemd service.
The workaround is as follows:
Run this as root
groupadd -g 23 nohidproc
usermod -a -G nohidproc polkitd
mount -o remount,rw,hidepid=2,gid=nohidproc /proc
systemctl restart polkit

Can't start Varnish cache on port 80 Ubuntu 16.04

Help me please make friends with my Ubuntu 16.04 apache2 web-server!
After installing Varnish cache started normally. But after putting it on port 80 varnish can't start:
Creating /etc/systemd/system/varnish.service.d/customexec.conf:
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s default,256m
Then
systemctl daemon-reload
service varnish start
Varnish do not start:
varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/lib/systemd/system/varnish.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/varnish.service.d
└─customexec.conf
Active: failed (Result: exit-code) since Thu 2020-07-23 09:41:12 MSK; 21s ago
Process: 5886 ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s default,256m (code=exited,
Main PID: 20786 (code=exited, status=0/SUCCESS)
Jul 23 09:41:12 mj33 systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Jul 23 09:41:12 mj33 varnishd[5886]: Error: Cannot open -S file (/etc/varnish/secret): No such file or directory
Jul 23 09:41:12 mj33 varnishd[5886]: (-? gives usage)
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Control process exited, code=exited status=255
Jul 23 09:41:12 mj33 systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Unit entered failed state.
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Failed with result 'exit-code'.
Tried to create security file and edit /etc/systemd/system/varnish.service.d/customexec.conf:
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
Varnish started first time, but after stop/start it does not start again:
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/lib/systemd/system/varnish.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/varnish.service.d
└─customexec.conf
Active: failed (Result: exit-code) since Fri 2020-07-24 10:52:41 MSK; 8s ago
Process: 9974 ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m (code=exited, status=2
Main PID: 8395 (code=exited, status=0/SUCCESS)
Jul 24 10:52:40 mj33 systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Jul 24 10:52:41 mj33 varnishd[9974]: Debug: Version: varnish-6.0.6 revision 29a1a8243dbef3d973aec28dc90403188c1dc8e7
Jul 24 10:52:41 mj33 varnishd[9974]: Debug: Platform: Linux,4.4.0-135-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Jul 24 10:52:41 mj33 varnishd[9974]: Empty secret-file "/etc/varnish/secret"
Jul 24 10:52:41 mj33 varnishd[9976]: Version: varnish-6.0.6 revision 29a1a8243dbef3d973aec28dc90403188c1dc8e7
Jul 24 10:52:41 mj33 varnishd[9976]: Platform: Linux,4.4.0-135-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Control process exited, code=exited status=255
Jul 24 10:52:41 mj33 systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Unit entered failed state.
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Failed with result 'exit-code'.
The problem was:
Debug: Child (20551) Started
Error: Child (20551) Acceptor start failed:
Listen failed on socket ':80': Address already in use
Debug: Stopping Child
Info: Child (20551) ended

How to solve error restarting apache Ubuntu

Question originally posted in Spanish, on es.stackoverflow.com, by mnsperez97:
I have a problem with the connection to Apache, after restarting it
with the sudo service apache2 restart command, I get 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.
and then when entering localhost it does not let me in and it makes me
worse, when I run sudo journalctl -xe he told me the following but
still I do not find the error, if you could help me I would be very
grateful
EDIT: run the systemctl status apache2.service command and this
appears to me
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2019-10-17 12:20:34 -04; 29min ago
Process: 21198 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 7385 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Process: 23453 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 1059 (code=exited, status=0/SUCCESS)
oct 17 12:20:34 pcarrasco systemd[1]: Starting The Apache HTTP Server...
oct 17 12:20:34 pcarrasco apachectl[23453]: AH00526: Syntax error on line 47 of /etc/apache2/sites-enabled/cms.local.conf:
oct 17 12:20:34 pcarrasco apachectl[23453]: order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'
oct 17 12:20:34 pcarrasco apachectl[23453]: Action 'start' failed.
oct 17 12:20:34 pcarrasco apachectl[23453]: The Apache error log may have more information.
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Control process exited, code=exited status=1
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Failed with result 'exit-code'.
oct 17 12:20:34 pcarrasco systemd[1]: Failed to start The Apache HTTP Server.
This is common due to problems in your configuration
it may be the port configuration
lock at the log file (pass can be found as ErrorLog in /etc/httpd/conf/httpd.conf)
or try to undo what you changed in the configuration files till you find the problem

Restoring rabbitmq-server database to a different host

Im running rabbitmq-server-3.6.6-1.el7.noarch on a CentOS 7.4.1708 server.
The /var/lib/ directory, on an ext4 lvm partition, had insufficient storage issues which required us to extend the lvm online, in order to make more space.
This seemed to fix the problems at the time, but a rabbitmq-server service restart was needed, which, when attempted, hung.
The service never started up anymore.
In order to get rabbitmq working again, the old mnesia directory was backed up, and a new one was created.
In order to recover the messages in the broken service, I have moved the old mnesia to a new server, added NODENAME=rabbit#oldserver to /etc/rabbitmq/rabbitmq-env.conf on the new server and tried to start it, but it keeps failing to start.
Please how can I start the old rabbitmq database on the new host?
[root#newserver]# cat /etc/rabbitmq/rabbitmq-env.conf
NODENAME=rabbit#oldserver
When I try to start the service on the new server:
[root#newserver rabbitmq]# systemctl status rabbitmq-server.service -l
? rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-05-07 16:25:23 WAT; 1h 32min ago
Process: 6484 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
Process: 5997 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 5997 (code=exited, status=1/FAILURE)
Status: "Exited."
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: * epmd reports: node 'rabbit' not running at all
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: other nodes on oldserver: ['rabbitmq-cli-20']
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: * suggestion: start the node
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: current node details:
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: - node name: 'rabbitmq-cli-20#newserver'
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: - home dir: .
May 07 16:25:23 newserver.dom.local rabbitmqctl[6484]: - cookie hash: edMXQlaNlKXH72ZvAXFhbw==
May 07 16:25:23 newserver.dom.local systemd[1]: Failed to start RabbitMQ broker.
May 07 16:25:23 newserver.dom.local systemd[1]: Unit rabbitmq-server.service entered failed state.
May 07 16:25:23 newserver.dom.local systemd[1]: rabbitmq-server.service failed.
=ERROR REPORT==== 7-May-2018::16:16:43 ===
** Generic server <0.145.0> terminating
** Last message in was {'$gen_cast',
{submit_async,
#Fun<rabbit_queue_index.32.103862237>}}
** When Server state == undefined
** Reason for termination ==
** {function_clause,
[{rabbit_queue_index,parse_segment_entries,
[<<1,23,0,255,54,241,95,251,201,20,69,202,0,0,0,0,0,0,0,0,0,0,0,
240,0,0,1,176,131,104,6,100,0,13,98,97,115,105,99,95,109,101,
115,115,97,103,101,104,4,100,0,8,114,101,115,111,117,114,99,101,
109,0,0,0,8,47,98,105,108,108,105,110,103,100,0,8,101,120,99,
104,97,110,103,101,109,0,0,0,7,98,105,108,108,105,110,103,108,0,
0,0,1,109,0,0,0,13,98,105,108,108,105,110,103,95,113,117,101,
117,101,106,104,6,100,0,7,99,111,110,116,101,110,116,97,60,100,
0,4,110,111,110,101,109,0,0,0,7,48,0,0,0,0,0,2,100,0,25,114,97,
98,98,105,116,95,102,114,97,109,105,110,103,95,97,109,113,112,
95,48,95,57,95,49,108,0,0,0,1,109,0,0,0,240,123,34,115,104,111,
114,116,67,111,100,101,34,58,34,52,50,54,95,109,101,110,117,115,
34,44,34,116,105,109,101,115,116,97,109,112,34,58,34,50,48,49,
56,45,48,52,45,49,56,84,49,48,58,53,57,58,50,55,46,57,51,53,90,
34,44,34,109,115,105,115,100,110,34,58,34,50,51,52,57,48,57,51,
52,52,57,50,57,51,34,44,34,105,100,34,58,34,50,55,50,49,56,95,
50,51,52,57,48,57,51,52,52,57,50,57,51,95,49,53,50,52,48,52,57,
48,52>>,
------snip-------goes-on-forever----
100,0,4,116,114,117,101>>},
no_del,no_ack},
undefined,undefined,undefined,undefined,undefined,
undefined,undefined,undefined},
10,10,10,10},
100,100,100,100,100},
1000,1000,1000,1000,1000,1000,1000},
10000,10000,10000,10000,10000,10000,10000,10000,10000}},
8988}],
[{file,"src/rabbit_queue_index.erl"},{line,1067}]},
{rabbit_queue_index,'-recover_journal/1-fun-0-',1,
[{file,"src/rabbit_queue_index.erl"},{line,863}]},
{lists,map,2,[{file,"lists.erl"},{line,1224}]},
{rabbit_queue_index,segment_map,2,
[{file,"src/rabbit_queue_index.erl"},{line,989}]},
{rabbit_queue_index,recover_journal,1,
[{file,"src/rabbit_queue_index.erl"},{line,856}]},
{rabbit_queue_index,scan_segments,3,
[{file,"src/rabbit_queue_index.erl"},{line,676}]},
{rabbit_queue_index,queue_index_walker_reader,2,
[{file,"src/rabbit_queue_index.erl"},{line,664}]},
{rabbit_queue_index,'-queue_index_walker/1-fun-0-',2,
[{file,"src/rabbit_queue_index.erl"},{line,645}]}]}

Apache not restarting, getting segmentation fault. Tried solutions but not working

I started my laptop after almost a month. Accessing localhost is giving me below error:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: inactive (dead) since Mon 2017-08-21 20:13:20 GST; 1min 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 11127 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 11110 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
Aug 21 20:13:20 user-HP-ProBook-6470b systemd[1]: Stopped LSB: Apache2 web server.
Aug 21 20:13:20 user-HP-ProBook-6470b systemd[1]: Starting LSB: Apache2 web server...
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11110]: * Starting Apache httpd web server apache2
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11110]: Segmentation fault
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11110]: Action 'start' failed.
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11110]: The Apache error log may have more information.
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11127]: * Stopping Apache httpd web server apache2
Aug 21 20:13:20 user-HP-ProBook-6470b apache2[11127]: *
Aug 21 20:13:20 user-HP-ProBook-6470b systemd[1]: Started LSB: Apache2 web server.
I am using Ubuntu 16.04 with following Apache2 version:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-07-14T12:32:26
I tried changing httpd.conf as mentioned in other articles, but that didn't helped and I still continue to get this error. Any help would be appreciated.