Skip to Main Content

Hardware

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getCurrentIP() in common.java always returns 127.0.0.2 under openjdk

b0e84a11-ef7f-4fc9-91c7-4b6259ddb3d5May 25 2017 — edited May 26 2017

Platform: x86_64, SUSE Linux Enterprise Server 12.

JDK: openjdk version "1.8.0_40"

Vdbench: vdbench50406.zip

Problem:

23:14:21.360 Starting slave: /opt/vdbench/vdbench SlaveJvm -m 127.0.0.2 -n 10.x.x.x-10-170525-23.14.21.165 -l hd0-0 -p 5570

23:14:21.367 Successfully connected to the Vdbench rsh daemon on host 10.x.x.x

23:14:21.367 RSH Connection to 10.x.x.x using port 5560 successful

23:14:21.376 Starting slave: /opt/vdbench/vdbench SlaveJvm -m 127.0.0.2 -n 10.y.y.y-11-170525-23.14.21.165 -l hd1-0 -p 5570

23:14:21.377 Successfully connected to the Vdbench rsh daemon on host 10.y.y.y

23:14:21.377 RSH Connection to 10.y.y.y using port 5560 successful

23:14:22.548

23:14:22.549 Slave hd0-0 prematurely terminated.

23:14:22.549 Look at file hd0-0.stdout.html for more information.

Then I found the getCurrentIP() in common.java always returns 127.0.0.2.

Because it calls InetAddress.getLocalHost().getHostAddress() to get current host IP address.

And with openjdk it always return 127.0.0.2.

I also found "override_ip.txt" can override the IP used by vdbench, but even wrote the master IP into "override_ip.txt",

Another error will occur:

23:13:47.732 Estimated totals for all 4 anchors: dirs: 1,360; files: 4,096; bytes: 512.000m

23:13:47.829 Using file 'override_ip.txt': 10.x.x.x

23:13:47.829 Starting slave: /opt/vdbench/vdbench SlaveJvm -m 10.x.x.x -n 10.y.y.y-10-170525-23.13.47.624 -l hd0-0 -p 5570

23:13:47.837 Successfully connected to the Vdbench rsh daemon on host 10.y.y.y

23:13:47.837 RSH Connection to 10.y.y.y using port 5560 successful

23:13:47.844 Using file 'override_ip.txt': 10.x.x.x

23:13:47.844 Starting slave: /opt/vdbench/vdbench SlaveJvm -m 10.x.x.x -n 10.x.x.x-11-170525-23.13.47.624 -l hd1-0 -p 5570

23:13:47.845 Successfully connected to the Vdbench rsh daemon on host 10.x.x.x

23:13:47.845 RSH Connection to 10.x.x.x using port 5560 successful

23:13:48.113 Killing slave: invalid master IP address: 10.x.x.x; expecting: 127.0.0.2

23:13:48.114 Killed slave

The error comes from signonSlave() in SlaveOnMaster.java:

if (!master_ip.equals("localhost"))

{

  if (!master_ip.equals(common.getCurrentIP()))

  {

    common.ptod("Killing slave: invalid master IP address: " + master_ip + "; expecting: " + common.getCurrentIP());

    killSlaveSignonError();

    return null;

  }

}

It does not handle the case that the IP overridden in "override_ip.txt".

I think it's a vdbench bug. Any suggestion? Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2017
Added on May 25 2017
0 comments
533 views