On the server
Starting RabbitMQ 3.8.2 on Erlang 22.2.7
Copyright (c) 2007-2019 Pivotal Software, Inc.
Licensed under the MPL 1.1. Website: https://rabbitmq.com
2022-07-31 10:18:12.381 [info] <0.311.0>
node : rabbit#mjcelery
home dir : /var/lib/rabbitmq
config file(s) : (none)
cookie hash : kbRAhyQ5I+uDT01QMYXIdg==
log(s) : /var/log/rabbitmq/rabbit#mjcelery.log
: /var/log/rabbitmq/rabbit#mjcelery_upgrade.log
database dir : /var/lib/rabbitmq/mnesia/rabbit#mjcelery
On the client:
sudo rabbitmqctl --longnames --node rabbit#mjcelery.dubclub.win authenticate_user dubclub "password"
Error: unable to perform an operation on node 'rabbit#mjcelery.dubclub.win'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
* Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
* CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
* Target node is not running
In addition to the diagnostics info below:
* See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
* Consult server logs on node rabbit#mjcelery.dubclub.win
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: ['rabbit#mjcelery.dubclub.win']
rabbit#mjcelery.dubclub.win:
* connected to epmd (port 4369) on mjcelery.dubclub.win
* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
* TCP connection succeeded but Erlang distribution failed
* Node name (or hostname) mismatch: node "rabbit#mjcelery" believes its node name is not "rabbit#mjcelery" but something else.
All nodes and CLI tools must refer to node "rabbit#mjcelery" using the same name the node itself uses (see its logs to find out what it is)
Current node details:
* node name: 'rabbitmqcli-459702-rabbit#mj.dubclub.win'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: kbRAhyQ5I+uDT01QMYXIdg==
I thought that maybe it was the cookie being different, so I copied the cookie from the mj machine to mjcelery (there used to be a rabbitmq on the mj machine but I'm moving rabbit to a completely different machine, 'mjcelery') and now they report the same cookie hash, but still can't get them to connect.
When I try to authenticate the user on the server, I end up with the same thing.
rabbitmqctl --longnames --node rabbit#mjcelery.dubclub.win authenticate_user dubclub "password"
Error: unable to perform an operation on node 'rabbit#mjcelery.dubclub.win'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
* Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
* CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
* Target node is not running
In addition to the diagnostics info below:
* See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
* Consult server logs on node rabbit#mjcelery.dubclub.win
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: ['rabbit#mjcelery.dubclub.win']
rabbit#mjcelery.dubclub.win:
* connected to epmd (port 4369) on mjcelery.dubclub.win
* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
* TCP connection succeeded but Erlang distribution failed
* Node name (or hostname) mismatch: node "rabbit#mjcelery" believes its node name is not "rabbit#mjcelery" but something else.
All nodes and CLI tools must refer to node "rabbit#mjcelery" using the same name the node itself uses (see its logs to find out what it is)
Current node details:
* node name: 'rabbitmqcli-6733-rabbit#mjcelery.dubclub.win'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: kbRAhyQ5I+uDT01QMYXIdg==
Turns out the problem was with --longnames. It talks about using it with the CLI but I can't find anyway to enable longnames on the server. https://www.rabbitmq.com/rabbitmq-server.8.html
When I added entries to /etc/hosts on the client and dropped the --longnames and FQDN node names it connects just fine.
etc/hosts on the client machine
W.X.Y.Z. mjcelery
Then this command succeeds:
# rabbitmqctl --node rabbit#mjcelery authenticate_user dubclub "password"
Authenticating user "dubclub" ...
Success
I use rabbitmq in openstack which runs on python 2.7.5.The erlang OTP 21.3 rpm comes from rabbitmq team.when i use ssl to connect rabbitmq,i got a error message
" TLS server: In state hello at tls_handshake.erl:200 generated SERVER ALERT: Fatal - Insufficient Security - no_suitable_ciphers "
in rabbitmq log file and a error message
"SSLError: [SSL: TLSV1_ALERT_INSUFFICIENT_SECURITY] tlsv1 alert insufficient security (_ssl.c:579)"
in openstack service log.
when i switch to erlang OTP 20.3,the error message disappear.so I guess the python 2.7.5 don't support new ciphers,but erlang OTP 21 discards old ciphers and just supports new cipherS.
because of some reasons,i have to use erlang OTP 21.Anyone can tell me how to config rabbitmq or oslo_message to avoid that.Thank you very much.
I have two servers, a production server and a monitoring server. On the monitoring server I have Graylog2 installed (version 2.3.2).
Before I passed the logs between the two servers in UDP. With this config:
Production server side
/etc/rsyslog.d/60-graylog.conf:
*.* #monitoring.logMonitoringdomainName:514;RSYSLOG_SyslogProtocol23Format
Monitoring server side:
ufw allow 514/udp
systemctl restart rsyslog
And Graylog was running well. But now I would like to pass the logs between the two servers using TLS. My certificates are generated with letsencrypt. With this config:
Production server side
apt-get -y install rsyslog-gnutls
/etc/rsyslog.d/60-graylog.conf:
$ModLoad imuxsock # local messages
$ModLoad imtcp # TCP listener
# make gtls driver the default
$DefaultNetstreamDriver gtls
# certificate files
$DefaultNetstreamDriverCAFile /etc/letsencrypt/live/domainName/fullchain.pem
$DefaultNetstreamDriverCertFile /etc/letsencrypt/live/domainName/cert.pem
$DefaultNetstreamDriverKeyFile /etc/letsencrypt/live/domainName/privkey.pem
$InputTCPServerStreamDriverAuthMode x509/name
$InputTCPServerStreamDriverPermittedPeer *.$logMonitoring
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
$InputTCPServerRun 10514 # start up listener at port 10514
*.* ##monitoring.logMonitoringdomainName:514;RSYSLOG_SyslogProtocol23Format
ufw allow 514/tcp
systemctl restart rsyslog
Monitoring server side:
ufw allow 514/tcp
systemctl restart rsyslog
Graylog TCP input :
allow_override_date:
true
bind_address:
0.0.0.0
expand_structured_data:
false
force_rdns:
false
max_message_size:
2097152
override_source:
<empty>
port:
514
recv_buffer_size:
1048576
store_full_message:
false
tcp_keepalive:
false
tls_cert_file:
/home/gspohu/TLS_LOG/cert.pem
tls_client_auth:
disabled
tls_client_auth_cert_file:
<empty>
tls_enable:
true
tls_key_file:
/home/gspohu/TLS_LOG/privkey.pem
tls_key_password:
********
use_null_delimiter:
false
But I don't understand how to set the graylog input, watever I try in input config, graylog can't read the logs, besides I'm not sure of my TLS configuration. Could you guide me through the configuration ?
Thank you to take time to read me,
I'm running Red Hat Enterprise Linux 7.2, I have installed RabbitMQ and systemctl status rabbitmq-server shows
● rabbitmq-server.service - LSB: Enable AMQP service provided by
RabbitMQ broker Loaded: loaded (/etc/rc.d/init.d/rabbitmq-server)
Active: active (running) since Wed 2016-08-17 11:25:56 JST; 1h 14min
ago
Docs: man:systemd-sysv-generator(8)
But when I want to configure it I cannot find the file: find / -iname "rabbitmq.config" shows nothing.
I have an application which connects to 127.0.0.1:3000, but the default port listened by RabbitMQ is 5672, so I want to add the port 3000 (hope it will fix the problem)
RabbitMQ by default does not create the config file.
you have to create it, usually the location is:
/etc/rabbitmq/rabbitmq.config
See: https://www.rabbitmq.com/configure.html
and
https://www.rabbitmq.com/relocate.html
in 2021, 2022 i had to get the rabbitmq config file from their github:
https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbit/docs/rabbitmq.conf.example
i recommend using github to switch to the tag of your rabbitmq installed binaries to ensure the config file is compatible
i would prefer the installer came with the example file but it does not to my knowledge
then once you have the example config file you have to rename it rabbitmq.conf and put it in the correct location (see rabbitmq configuration docs because the directory is different for each distro)
For testing purposes I need ActiveMQ and RabbitMQ running on the same Windows machine. I have both installed, but I can't run them together: I need to stop one service in order to have the other one running.
This is the error I get trying to start RabbitMQ having ActiveMQ running:
=INFO REPORT==== 17-Feb-2015::14:24:00 ===
Error description:
{could_not_start,rabbit,
{bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{rabbit,failure_during_boot,
{boot_step,networking,
{case_clause,
{error,
{{shutdown,
{failed_to_start_child,tcp_listener,
{cannot_listen,{0,0,0,0,0,0,0,0},5672,eacces}}},
{child,undefined,'rabbit_tcp_listener_sup_:::5672',
{tcp_listener_sup,start_link,
[{0,0,0,0,0,0,0,0},
5672,
[inet6,binary,
{packet,raw},
{reuseaddr,true},
{backlog,128},
{nodelay,true},
{linger,{true,0}},
{exit_on_close,false}],
{rabbit_networking,tcp_listener_started,[amqp]},
{rabbit_networking,tcp_listener_stopped,[amqp]},
{rabbit_networking,start_client,[]},
"TCP Listener"]},
transient,infinity,supervisor,
[tcp_listener_sup]}}}}}}}}}}
And this is the error I get trying to start ActiveMQ with RabbitMQ already running:
jvm 1 | INFO | Listening for connections at: tcp://BROKER:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600
jvm 1 | INFO | Connector openwire started
jvm 1 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:DEV-BROKER01-56290-1424197666199-0:1], java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 due to:
java.net.BindException: Address already in use: JVM_Bind)
jvm 1 | INFO | Apache ActiveMQ 5.11.0 (localhost, ID:DEV-BROKER01-56290-1424197666199-0:1) is shutting down
That "Address already in use" is the key I guess.
Any way to sort this out? Thanks
this is the problem:
java.net.BindException: Address already in use: JVM_Bind)
both the brokers use the 5672 port (amqp default port).
just change the port for one broker, for example in rabbitmq check this link:
https://www.rabbitmq.com/configure.html
The configuration file rabbitmq.config allows the RabbitMQ core
application, Erlang services and RabbitMQ plugins to be configured. It
is a standard Erlang configuration file, documented on the Erlang
Config Man Page.
An example configuration file follows:
[
{rabbit, [{tcp_listeners, [5673]}]}
].
This example will the port RabbitMQ listens on from 5672 to 5673.
This configuration file is not the same as rabbitmq-env.conf, which
can be used to set environment variables on non-windows systems.