-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CI: Fails with "Errno::EACCES: Permission denied - bind(2)" on Windows #4674
Comments
Hmm, When I run the test on Windows, it creates a lot of sockets in TIME_WAIT state.
|
The port used in the test is determined by the unused_port method. At least, looks for me that it need to specify protocols properly in some cases. |
Still showing similar errors...
|
😢 |
When I added debug print, it just use UDP protocol in test_cat.rb diff --git a/lib/fluent/plugin_helper/server.rb b/lib/fluent/plugin_helper/server.rb
index eecee5ae..ad487858 100644
--- a/lib/fluent/plugin_helper/server.rb
+++ b/lib/fluent/plugin_helper/server.rb
@@ -122,6 +122,9 @@ module Fluent
def server_create(title, port, proto: nil, bind: '0.0.0.0', shared: true, socket: nil, backlog: nil, tls_options: nil, max_bytes: nil, flags: 0, **socket_options, &callback)
proto ||= (@transport_config && @transport_config.protocol == :tls) ? :tls : :tcp
+ puts "\n[debug] server_create: proto: #{proto}, port: #{port}"
+ pp caller.take(20)
+
raise ArgumentError, "BUG: title must be a symbol" unless title && title.is_a?(Symbol)
raise ArgumentError, "BUG: port must be an integer" unless port && port.is_a?(Integer)
raise ArgumentError, "BUG: invalid protocol name" unless PROTOCOLS.include?(proto)
Looks like I got a wrong for test_cat.rb at #4675 |
No. fluentd/lib/fluent/plugin/in_forward.rb Lines 172 to 190 in f493f25
|
@daipom Unfortunately, when I run the test, only UDP is used. So, it need to check that the free UDP port in here at the very least. |
Although I have not confirmed this yet,
it may be a good idea to take care of both! |
I can confirm both TCP and UDP are used. $ lsof -Pni | grep ruby
ruby 589081 daipom 7u IPv4 3418806 0t0 TCP 127.0.0.1:45691 (LISTEN)
ruby 589081 daipom 8u IPv4 3418807 0t0 UDP 127.0.0.1:45691 |
Please note that
|
Thanks |
Describe the bug
Sometimes, CI fails with "Errno::EACCES: Permission denied - bind(2)" on Windows platform, like
To Reproduce
Run Windows platform lane in CI.
Expected behavior
Succeeded without any failures
Your Environment
Your Configuration
Your Error Log
Additional context
No response
The text was updated successfully, but these errors were encountered: