intel-cloud / cosbench

a benchmark tool for cloud object storage service
Other
573 stars 242 forks source link

Driver not alive #245

Closed nordewal closed 9 years ago

nordewal commented 9 years ago

I can reach remote driver endpoints with curl without problems. But on the controller, the remote drivers are not alive. This is due to a bug in the PingDriverRunner class. The local address should be bound to "0.0.0.0" instead of "127.0.0.1", otherwise on some hosts the following exception is thrown, if the PingDriverRunner is run without a catch:

Exception in thread "main" java.net.ConnectException: Invalid argument
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at PingDriverRunner.pingDrivers(PingDriverRunner.java:31)
        at PingDriverRunner.main(PingDriverRunner.java:36)

The bug fix would be:

InetSocketAddress locAddress = new InetSocketAddress("0.0.0.0", 0);

The workaround for me is to create a SSH tunnel, so that I can specify the remote drivers a local IP address.

Thanks for fixing the bug. Btw, someone else had the same problem with Java: http://www.dcm4che.org/jira/browse/DCM-24

Best regards Janosch

yllions commented 9 years ago

Thank you for pointing out this bug, I will fix it as soon as possible

yllions commented 9 years ago

resolved by a9ab0c24f80a9c505f71a616a66f6f5938bee0e6