Hi,
I’m using Graylog OVA 2.4.3 and when I try to create Input using ReST, Graylog shows the created Inputs marked as Failed: The message that I see is: Address already in use.
Here the JSon about the related input:
{
"title": "test_6f1c06e2-e27c-4c41-a577-bd17f37c3547",
"global": true,
"name": "Beats",
"content_pack": "5bbb21bd1838ed2ce0d6524e",
"created_at": "2018-10-08T09:22:04.207Z",
"type": "org.graylog.plugins.beats.BeatsInput",
"creator_user_id": "admin",
"attributes": {
"recv_buffer_size": 1048576,
"port": 12202,
"tls_key_file": "",
"tls_enable": false,
"tls_key_password": "",
"tcp_keepalive": false,
"tls_client_auth_cert_file": "",
"tls_client_auth": "disabled",
"override_source": "",
"bind_address": "0.0.0.0",
"tls_cert_file": ""
},
"static_fields": {
"ENABLE_ENRICH": "false",
"entity_name": "NONE",
"tags": "test_6f1c06e2-e27c-4c41-a577-bd17f37c3547"
},
"node": null,
"id": "5bbb21bc9fb73040f9349195"
},
The port number is 12202
Executing netstat -plnt I can see the result below
All seems correct, but Graylog give me the error message.
Looking the log file we can see the stack trace:
2018-10-08_09:22:51.44381 ERROR [InputLauncher] The [org.graylog.plugins.beats.BeatsInput] input with ID <5bbb21bc9fb73040f9349195> misfired. Reason: Address already in use.
2018-10-08_09:22:51.44430 org.graylog2.plugin.inputs.MisfireException: org.graylog2.plugin.inputs.MisfireException: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:12202
2018-10-08_09:22:51.44485 at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:158) ~[graylog.jar:?]
2018-10-08_09:22:51.44569 at org.graylog2.shared.inputs.InputLauncher$1.run(InputLauncher.java:84) [graylog.jar:?]
2018-10-08_09:22:51.44616 at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) [graylog.jar:?]
2018-10-08_09:22:51.44721 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_161]
2018-10-08_09:22:51.44763 at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_161]
2018-10-08_09:22:51.44805 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
2018-10-08_09:22:51.44877 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
2018-10-08_09:22:51.44965 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
2018-10-08_09:22:51.45498 Caused by: org.graylog2.plugin.inputs.MisfireException: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:12202
2018-10-08_09:22:51.45539 at org.graylog2.plugin.inputs.transports.NettyTransport.launch(NettyTransport.java:155) ~[graylog.jar:?]
2018-10-08_09:22:51.45600 at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:155) ~[graylog.jar:?]
2018-10-08_09:22:51.45675 … 7 more
2018-10-08_09:22:51.45721 Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:12202
2018-10-08_09:22:51.45793 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[graylog.jar:?]
2018-10-08_09:22:51.46060 at org.graylog2.plugin.inputs.transports.NettyTransport.launch(NettyTransport.java:141) ~[graylog.jar:?]
2018-10-08_09:22:51.46179 at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:155) ~[graylog.jar:?]
2018-10-08_09:22:51.46210 … 7 more
2018-10-08_09:22:51.46263 Caused by: java.net.BindException: Address already in use
2018-10-08_09:22:51.46438 at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_161]
2018-10-08_09:22:51.46507 at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_161]
2018-10-08_09:22:51.46688 at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_161]
2018-10-08_09:22:51.46744 at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_161]
2018-10-08_09:22:51.46870 at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_161]
2018-10-08_09:22:51.47187 at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[graylog.jar:?]
2018-10-08_09:22:51.47258 at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[graylog.jar:?]
2018-10-08_09:22:51.47336 at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[graylog.jar:?]
2018-10-08_09:22:51.47365 at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[graylog.jar:?]
2018-10-08_09:22:51.47417 at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[graylog.jar:?]
2018-10-08_09:22:51.47495 at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[graylog.jar:?]
2018-10-08_09:22:51.47566 … 3 more
2018-10-08_09:22:51.47672 INFO [InputStateListener] Input [Beats/5bbb21bc9fb73040f9349195] is now FAILED
If I restart Graylog the Input become valid, without changes!!
Is there something that I can do to fix this problem?
Why at the first time, Graylog say me that the input is not valid but after restarting the server, the input become good?
Gianluca