One possibility:
The runner process is listening only on 127.0.0.1
, the IPv4 loopback address, but Eclipse is trying to connect to localhost
– which can be either 127.0.0.1
or ::1
, the latter being IPv6 loopback. On most operating systems, IPv6 is enabled, it will be preferred, causing Eclipse to try IPv6 ::1
first.
Since JUnitRunner is not listening on any IPv6 address, the OS should reject attempted connections with a TCP RST (or mayyybe ICMP "Port Unreachable" if properly firewalled). However, you probably have a firewall configuration that is silently dropping such attempts, which means the client (Eclipse) will be waiting for a reply that is never sent.
First check your firewall configuration (ip6tables
) – there is no reason for it to block loopback connections in any way. Test with the firewall temporarily disabled. If nothing helps, check if Eclipse can be configured to use 127.0.0.1
, or if JUnit can be configured to listen on both IPv6 and IPv4.
:-/ The
netstat
line above says Eclipse isn't trying to use loopback at all. – Aaron Digulla – 2012-05-10T12:27:11.090@AaronDigulla: But
::1
is IPv6 loopback. – user1686 – 2012-05-10T12:31:47.440Ah! I completely missed the right side. Why isn't it showing "::1:51019 ::1:48469"? – Aaron Digulla – 2012-05-10T12:33:08.990
I checked with
ip6tables
: There are no rules and all three chains have the policy "ACCEPT" – Aaron Digulla – 2012-05-10T12:34:26.277Hmm, I don't know why it is showing a fe80: address. Does
ping6 ::1
reach loopback correctly? – user1686 – 2012-05-10T12:45:08.390Yes,
ping6 ::1
works. – Aaron Digulla – 2012-05-10T16:03:00.063