New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only start syslog application if it is required #1728
Conversation
dda132a
to
0186a91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work as advertised w.r.t. UDP listeners.
However, I get extra standard output (error?) log messages from error logger with this PR. On master:
(rabbit@warp10)1>
## ##
## ## RabbitMQ x.y.z.g1be4734. Copyright (C) 2007-2018 Pivotal Software, Inc.
########## Licensed under the MPL. See http://www.rabbitmq.com/
###### ##
########## Logs: /var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit.log
/var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit_upgrade.log
Starting broker...
completed with 0 plugins.
On rabbitmq-server-1718-syslog-localhost
:
(rabbit@warp10)1>
## ##
## ## RabbitMQ x.y.z.gc44722a. Copyright (C) 2007-2018 Pivotal Software, Inc.
########## Licensed under the MPL. See http://www.rabbitmq.com/
###### ##
########## Logs: /var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit.log
/var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit_upgrade.log
Starting broker...
=INFO REPORT==== 12-Oct-2018::06:29:49.425017 ===
Limiting to approx 7068 file handles (6359 sockets)
=INFO REPORT==== 12-Oct-2018::06:29:49.545610 ===
started TCP listener on [::]:5672
Note that the above happens without any configuration file (e.g. gmake run-broker RABBITMQ_CONFIG_FILE=/tmp/non-existent
), so nothing instructs RabbitMQ to log to console.
From rabbitmq environment
:
{log,
[{file,
[{file,
"/var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit.log"}]},
{categories,
[{upgrade,
[{file,
"/var/folders/gp/53t98z011678vk9rkcb_s6ph0000gn/T/rabbitmq-test-instances/rabbit/log/rabbit_upgrade.log"}]}]}]}
@lukebakken I merged master into this branch so cherry-picking the merge commit to |
@michaelklishin that output is probably due to |
c44722a
to
0186a91
Compare
@michaelklishin FYI I undid the merge commit you mention in this comment |
Fix up syslog protocol options to set ip to localhost if unset Ensure default handler for OTP 21.1+ logger is removed
64c7c7a
to
2d9b8ce
Compare
@michaelklishin ready for round #2. This issue pointed me in the right direction: erlang-lager/lager#481 |
…calhost Only start syslog application if it is required (cherry picked from commit d481842)
Fixes #1718
Test using the following
rabbitmq.config
file:You can experiment by using different values in
protocol
, or by leaving that term out completely. If you leave outip
,127.0.0.1
will be used. Usenetstat
to confirm:You will see a line beginning with
udp
and it should be bound to the local address you expect.If you leave out all
syslog
configuration, you will not seebeam.smp
listening on anyudp
ports.