Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.06k forks source link

Input does not start after ContentPack ReST creation #10640

Open gianluca-valentini opened 3 years ago

gianluca-valentini commented 3 years ago

Expected Behavior

When I create a contentPack using graylog ReST API and apply it in a new and empty environment, the input should start without error

Current Behavior

When I create a contentPack using graylog ReST API and apply it in a new and empty environment, the input start fails. The log tell me that the port is already in use (it is a new installation). Restarting the application the input become magically green

Possible Solution

Maybe something change in ReST input creation with content pack and UI one

Steps to Reproduce (for bugs)

  1. Create a stream and an input
  2. Export it using content pack
  3. Import content pack using rest client
  4. The input does not start and the log describe the error (port already in use

Context

Your Environment

ContentPack creation and installation work fine but I have this problem on the input view

image

Looking the Graylog log I see:

image

If I create another input using the UI it works fine image

I'm sure that the 12201 is not used. If I restart the application it become green

image

gianluca-valentini commented 3 years ago

I add other additional info currently I’m using graylog OVA 4.0.7. Now I have an empty environment where I delete all input

image

using the command ss-tulpn I see image

Then I create and install my content-pack (without parameters but with required inputs) Content pack is uploaded with success but looking the input I see image

running ss -tulpn

image

When I try to start the input I have and error: image

where the log say

2021-05-19T13:04:51.627Z WARN [AbstractTcpTransport] Failed to start channel for input BeatsInput{title=AX-Beat, type=org.graylog.plugins.beats.BeatsInput, nodeId=null}
io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
2021-05-19T13:04:51.627Z ERROR [InputLauncher] The [org.graylog.plugins.beats.BeatsInput] input with ID <60a50c20a010fd30e2204d1a> misfired. Reason: bind(…) failed: Address already in use.
org.graylog2.plugin.inputs.MisfireException: org.graylog2.plugin.inputs.MisfireException: io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
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:180) [graylog.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_292]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: org.graylog2.plugin.inputs.MisfireException: io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
at org.graylog2.plugin.inputs.transports.AbstractTcpTransport.launch(AbstractTcpTransport.java:199) ~[graylog.jar:?]
at org.graylog2.plugin.inputs.MessageInput.launch(MessageInput.java:155) ~[graylog.jar:?]
… 7 more
Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(…) failed: Address already in use
2021-05-19T13:04:51.631Z INFO [InputStateListener] Input [Beats (deprecated)/60a50c20a010fd30e2204d1a] is now FAILED

At the end the strange, very strange, situation is that is I restart Graylog, I don’t have input error anymore

Other point of this strange scenario is that if I delete all and run running ss -tulpn again

image

So the input ports seem to be used again

rantonmo commented 2 years ago

I'm facing the same problem using the docker images on a Kubernetes cluster (AKS). In my case, the content pack includes three inputs but only one is failing.

gianluca-valentini commented 2 years ago

Hi, any news about this issue?

gianluca-valentini commented 2 years ago

Any news about this?

gianluca-valentini commented 2 years ago

https://github.com/Graylog2/graylog2-server/issues/12829

gianluca-valentini commented 2 years ago

Hi any news about this?

gianluca-valentini commented 2 years ago

Hi all, is there any update about this issue? So, how did you create an input installation that have to be the same in different client environments? Did you use content pack or exist something different that can be used?