Open joshuar opened 6 years ago
This seems to be the way the underlying library we use (march_hare) works: if you specify a list of hosts then the port option is ignored. However in this plugin we always pass a list, even if it's a list of 1, so the port is always ignored...
We should likely just remove this port option. Currently the users can pass a list of "host" strings when the port is 5672, or "host:port" strings when the port is different than 5672.
Ah cool! Thanks @jsvd! I didn't realise a host:port
combo would work as well. That works for me. The doc examples are all just host strings. So possibly a doc update as well required?
There's a known issue with march_hare (https://github.com/ruby-amqp/march_hare/issues/133) that causes localhost:5672
to always show up in connection errors, even if that's not where its connecting.
If anyone else sees this, ignore the error message and use tcpdump to verify the traffic is going where you want.
@jsvd Thank you so much! "host:port" is working for me now.
I had the same problem with the RabbitMQ input plugin because I had forgotten to specify ssl => true
. It would fail to initiate a handshake, but the logs only stated it failed to connect to the default address (localhost:5672
, not mq.example.org:5671
as I specified).
I'm starting up a test RabbitMQ install with:
Note that I'm using a custom port, 35007. When I start Logstash with the above configuration, it still tries to connect on port 5672:
Am I missing something?