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

logstash-output-syslog-3.0.5 with protocol UDP and an IPv6 address fails in connect #60

Open
BenAveling opened this issue Jun 17, 2022 · 0 comments
Labels

Comments

@BenAveling
Copy link

When using logstash-output-syslog-3.0.5 with protocol UDP and an IPv6 address, it fails in connect, at line 209 of logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-syslog-3.0.5/lib/logstash/outputs/syslog.rb:

i.e.

208: socket = UDPSocket.new
209: socket.connect(@host, @port) <-- fails here, if @host is an IPv6 address.

If I change line 208 to explicitly use IPv6 it works for IPv6 addresses.

i.e.

208: socket = UDPSocket.new(Socket::AF_INET6)
209: socket.connect(@host, @port) <-- this now works when @host is an IPv6 address.

Obviously, that breaks IPv4, which isn't an issue for me, but a proper fix should handle both IPv4 and IPv6.

Absent my change, it works with IPv4, and it works with TCP, it's just the combination of UDP and IPv6 that fails.

This has been/is being discussed at https://discuss.elastic.co/t/logstash-output-syslog-3-0-5-not-sending-udp-over-ipv6/307279

@BenAveling BenAveling added the bug label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant