Searching For Tests ... NoRouteToHostException

I upgraded from 9.0.2 to 9.0.3 this morning running Ubuntu 10.04 and sun-jdk 1.6.0_20. Whenever I try to execute a TestNG unit test now, a background task "Searching For Tests ..." starts and I get the following Exception in the console:

java.net.NoRouteToHostException: No route to host
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:218)
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)

The background task keeps running forever. It works fine for a colleague of mine. When I go back to 9.0.1 (unfortunately I don't have 9.0.2 anymore) it works again for me. Ideas anyone?

5 comments
Comment actions Permalink

Some additional information. Looking at how the tests are invoked comparing 9.0.1 and 9.0.3, I notice this:

com.intellij.rt.execution.application.AppMain org.testng.RemoteTestNGStarter
-port 37049 (was 5000 before)
-socket46658 (totally new argument)

Everything else is more or less the same.

0
Comment actions Permalink

reikje,

There were changes which can cause such behaviour with remote desktop? Is that your case?
Thank you

0
Comment actions Permalink

Hi Anna,

no not at all. This is a local computer where I run my IntelliJ on. Is there any way to provide you with further debug output to pinpoint the problem? Like I said, it is working fine for a colleague, so I believe this is rather a network setting than a IntelliJ problem. I was also looking for this class org.testng.RemoteTestNGStarter in the TestNG sources (5.8 and 5.11) yesterday but I could not find it.

0
Comment actions Permalink

reikje,

RemoteTestNGStarter - is a class from IDEA's plugin to start TestNG remote session.

In order to move searching for tests in background sync between 2 JVMs were used: so when IDEA is ready to produce tests to run "tests" JVM starts TestNG process.

This sync is now implemented via sockets. Fails the part with new Socket(InetAddress.getLocalHost(), port). So seems that you have some firewall. Could you please try to InetAddress.getLocalHost() for further information.

Thank you

0
Comment actions Permalink

No I do not have a local Firewall on my computer, just the corporate Firewall but it does not matter.

Anyway, I found the problem. I ran InetAddress.getLocalHost() and it returned reiks-laptop/192.168.16.36. I ran ifconfig and saw that I had gotten a new ip address after rebooting (192.168.16.35). My /etc/hosts file however still contained this: 192.168.16.36   reiks-laptop .... when I set it to the correct ip-adress it started working. Thanks for your help Anna.

0

Please sign in to leave a comment.