I have setup my local rabbitmq on ubuntu 20.04 running on port 5672. I have created an “amq.topic” exhange and its type is : “topic”. Additionally I’ve created a queue called “q1” and bind it to “amq.topic” exchange with routing key of “#.png”.
When I tried creating an input of type “GELF AMQP” with the following configuration, it fails to start.
I need to add that graylog is running on docker but rabbitmq is running on host. After I check graylog’s docker log following was found:
d. Reason: Unknown host ‘amqp.ext.example.org’.
org.graylog2.plugin.inputs.MisfireException: org.graylog2.plugin.inputs.MisfireException: Could not launch AMQP consumer.
at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:158) ~[graylog.jar:?]
at org.graylog2.shared.inputs.InputLauncher$1.run(InputLauncher.java:84) [graylog.jar:?]
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:181) [graylog.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: org.graylog2.plugin.inputs.MisfireException: Could not launch AMQP consumer.
at org.graylog2.inputs.transports.AmqpTransport.doLaunch(AmqpTransport.java:179) ~[graylog.jar:?]
at org.graylog2.plugin.inputs.transports.ThrottleableTransport.launch(ThrottleableTransport.java:76) ~[graylog.jar:?]
at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:155) ~[graylog.jar:?]
… 7 more
Caused by: java.net.UnknownHostException: amqp.ext.example.org
at java.net.InetAddress.getAllByName0(InetAddress.java:1281) ~[?:1.8.0_232]
at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[?:1.8.0_232]
at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[?:1.8.0_232]
at com.rabbitmq.client.DnsRecordIpAddressResolver.resolveIpAddresses(DnsRecordIpAddressResolver.java:83) ~[graylog.jar:?]
at com.rabbitmq.client.DnsRecordIpAddressResolver.getAddresses(DnsRecordIpAddressResolver.java:73) ~[graylog.jar:?]
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:58) ~[graylog.jar:?]
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156) ~[graylog.jar:?]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1095) ~[graylog.jar:?]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054) ~[graylog.jar:?]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1012) ~[graylog.jar:?]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1170) ~[graylog.jar:?]
at org.graylog2.inputs.transports.AmqpConsumer.connect(AmqpConsumer.java:170) ~[graylog.jar:?]
at org.graylog2.inputs.transports.AmqpConsumer.run(AmqpConsumer.java:100) ~[graylog.jar:?]
at org.graylog2.inputs.transports.AmqpTransport.doLaunch(AmqpTransport.java:176) ~[graylog.jar:?]
at org.graylog2.plugin.inputs.transports.ThrottleableTransport.launch(ThrottleableTransport.java:76) ~[graylog.jar:?]
at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:155) ~[graylog.jar:?]
… 7 more
2021-01-05 11:58:20,327 INFO : org.graylog2.inputs.InputStateListener - Input [GELF AMQP/5ff438b3cff47e000e37b645] is now FAILED
How could I connect my graylog from docker to outside rabbitmq?