Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Debian x86, 4GiB RAM, Turion X2
-
Number of attachments :
Description
dmilith:(~/Projects/jruby)$ jirb
Loading... >> require 'socket'
=> true
>> TCPServer.new(nil, 9999)
Errno::EADDRINUSE: Address already in use - Address in use
from (irb):3:in `new'
from (irb):3
>> TCPServer.new("localhost", 9999)
Errno::EADDRINUSE: Address already in use - Address in use
from (irb):4:in `new'
from (irb):4
>> TCPServer.new("127.0.0.1", 9999)
Errno::EADDRINUSE: Address already in use - Address in use
from (irb):5:in `new'
from (irb):5
and..
dmilith:(~/Projects/jruby)$ nc -l -p 9999 ^C
(no errors)
and..
dmilith:(~/Projects/jruby)$ netstat -a Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:6881 *:* LISTEN tcp 0 0 *:6660 *:* LISTEN tcp 0 0 localhost.localdom:6600 *:* LISTEN tcp 0 0 localhost.localdoma:ipp *:* LISTEN tcp 0 0 localhost.lo:postgresql *:* LISTEN tcp 0 0 *:7741 *:* LISTEN tcp 0 0 localhost.localdo:51376 localhost.localdom:6600 ESTABLISHED tcp 0 0 apn-77-115-240-16:34585 abon165.neoplus.a:14892 ESTABLISHED tcp 0 0 apn-77-115-240-16:49372 drakor:ssh ESTABLISHED tcp 0 0 localhost.localdo:42205 localhost.localdom:6600 ESTABLISHED tcp 0 0 localhost.localdom:6600 localhost.localdo:51376 ESTABLISHED tcp 0 0 localhost.localdom:6600 localhost.localdo:42205 ESTABLISHED tcp6 0 0 [::]:6881 [::]:* LISTEN tcp6 0 0 [::]:9090 [::]:* LISTEN tcp6 0 0 [::]:9091 [::]:* LISTEN tcp6 0 0 ip6-localhost:41221 [::]:* LISTEN tcp6 0 0 [::]:xmpp-client [::]:* LISTEN tcp6 0 0 [::]:5223 [::]:* LISTEN tcp6 0 0 [::]:5229 [::]:* LISTEN tcp6 0 0 [::]:9999 [::]:* LISTEN tcp6 0 0 [::]:xmpp-server [::]:* LISTEN tcp6 0 0 [::]:ssh [::]:* LISTEN tcp6 0 0 [::]:57593 [::]:* LISTEN tcp6 0 0 [::]:54750 [::]:* LISTEN udp 0 0 *:6660 *:* udp 0 0 *:talk *:* udp 0 0 *:ntalk *:* udp 0 0 localhost.localdo:52662 localhost.localdo:52662 ESTABLISHED udp 0 0 *:7741 *:* udp 0 0 *:bootpc *:* udp 0 0 *:59076 *:* udp 0 0 localhost.localdo:57952 *:* udp 0 0 *:6881 *:* udp 0 0 *:mdns *:* udp 0 0 *:ipp *:* udp6 0 0 [::]:40339 [::]:* udp6 0 0 [::]:mdns [::]:* raw 121416 0 *:icmp *:* 7
so only on ipv6 something is listening on 9999
but i've tried with ipv4?
Issue Links
- duplicates
-
JRUBY-3541
JRuby 1.2.0 does not bind socket to 0.0.0.0 properly
-
Fixing summary...
Yes, this is unusual; it seems like the Java logic is trying to bind IP6. This fits some previous reports where we seem to wait on IP6 reverse lookups or where we are able to bind to the same port as MRI. Something about Java on an IP6-enabled system seems to start doing things a bit more smarty-pants than we want it to.