Skip to content
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

Logtash to Logstash native communication output host issue #15605

Closed
dobl1 opened this issue Nov 21, 2023 · 2 comments · Fixed by logstash-plugins/logstash-mixin-validator_support#7
Labels

Comments

@dobl1
Copy link

dobl1 commented Nov 21, 2023

Logstash information:

Logstash 8.11.1 docker image (in docker compose)
docker.elastic.co/logstash/logstash:8.11.1

Description of the problem:

Trying the Logtash to Logstash native communication

With a simple output

output {
    stdout {}
    logstash {
        hosts => "logstash:9800"
        ssl_enabled => false
        username => "user"
        password => "secret"
    }
}

Logs:

2023-11-22 00:39:17 [2023-11-21T23:39:17,065][ERROR][logstash.outputs.logstash] Invalid setting for logstash output plugin:
2023-11-22 00:39:17 
2023-11-22 00:39:17   output {
2023-11-22 00:39:17     logstash {
2023-11-22 00:39:17       # This setting must be a required_host_optional_port
2023-11-22 00:39:17       # Expected a valid required-host optional-port pair, got `"logstash:9800"`
2023-11-22 00:39:17       hosts => "logstash:9800"
2023-11-22 00:39:17       ...
2023-11-22 00:39:17     }
2023-11-22 00:39:17   }
2023-11-22 00:39:17 [2023-11-21T23:39:17,074][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:120)", "org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:186)", "org.logstash.execution.AbstractPipelineExt$INVOKER$i$initialize.call(AbstractPipelineExt$INVOKER$i$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:847)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1318)", "org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:139)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:90)", "org.jruby.RubyClass.newInstance(RubyClass.java:931)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:90)", "org.jruby.ir.instructions.CallBase.interpret(CallBase.java:561)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:88)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)", "org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:228)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:291)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:328)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)", "org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.Block.call(Block.java:143)", "org.jruby.RubyProc.call(RubyProc.java:352)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:110)", "java.base/java.lang.Thread.run(Thread.java:840)"]}

I don't understand why this configuration is invalid, it's a simple host:port, like in the doc, can you help please ?

@mashhurs
Copy link
Contributor

Our current host validator expects host to be in logstash.host (two parts with . separated) style (like top-level domains). This case seems also valid like localhost and we may consider it in the future.

@jsvd
Copy link
Member

jsvd commented Nov 24, 2023

Running a bin/logstash-plugin update will update existing plugins and also grab the 1.1.1 version of the "logstash-mixin-validator_support" gem that fixes the issue of not supporting single word hostnames, like "localhost".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants