Hi all,
I got some updates on the issue.
By looking on the Internet, it seems that the problem might be caused by some other client listening on the default port for WSS connection,
hence the error message "Errno::EADDRNOTAVAIL: Cannot assign requested address".
By checking with netstat it looks like there are no connections on ports 80 and 443.
So, I tried the following things:
- start logstash with root privileges
- replace wss protocol with ws in the URL of the websocket endpoint:
input {
websocket {
url => "ws://<URL>?key=<KEY>/"
mode => "client"
}
}
filter {
}
output {
stdout {
codec => "rubydebug"
}
}
In both cases, I get the same error message as in my last post:
warning: thread "Api Webserver" terminated with exception (report_on_exception is true):
Errno::EADDRNOTAVAIL: Cannot assign requested address - bind - Cannot assign requested address
initialize at org/jruby/ext/socket/RubyTCPServer.java:127
new at org/jruby/RubyIO.java:876
add_tcp_listener at /app/logstash-7.7.1/vendor/bundle/jruby/2.5.0/gems/puma-4.3.5-java/lib/puma/binder.rb:229
add_tcp_listener at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/forwardable.rb:229
start_webserver at /app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:104
run at /app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:60
each at org/jruby/RubyRange.java:526
each_with_index at org/jruby/RubyEnumerable.java:1258
run at /app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:55
start_webserver at /app/logstash-7.7.1/logstash-core/lib/logstash/agent.rb:393
[...][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<Errno::EADDRNOTAVAIL: Cannot assign requested address - bind - Cannot assign requested address>, :backtrace=>["org/jruby/ext/socket/RubyTCPServer.java:127:in `initialize'", "org/jruby/RubyIO.java:876:in `new'", "/app/logstash-7.7.1/vendor/bundle/jruby/2.5.0/gems/puma-4.3.5-java/lib/puma/binder.rb:229:in `add_tcp_listener'", "/app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:104:in `start_webserver'", "/app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:60:in `block in run'", "org/jruby/RubyRange.java:526:in `each'", "org/jruby/RubyEnumerable.java:1258:in `each_with_index'", "/app/logstash-7.7.1/logstash-core/lib/logstash/webserver.rb:55:in `run'", "/app/logstash-7.7.1/logstash-core/lib/logstash/agent.rb:393:in `block in start_webserver'"]}
[...][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
I also tried starting Logstash with simple stdin input configuration to see if the problem is related to some general setting:
bin/logstash -e "input{stdin{}} output{stdout{codec=>rubydebug}}"
and Logstash is starting without any problems.
Maybe the logstash settings file logstash.yml could be helpful information. Here it is:
node.name: logstash-${HOSTNAME}
log.level: info
http.host: "${HOSTNAME}"
http.port: 9600
config.reload.automatic: true
config.reload.interval: 3s
Any idea on what could be the cause of the error?