Typo on -ip="..." UnknownHostException() .

Description

I'm just filing this to document that it's an existing way to cause an UnknownHostException. I may fix it, but wanted to make sure I wasn't misinterpreting.

I have a multitude of bridges on my home machine. My "local ip" is attached to a bridge br0, not eth0.

in this snapshot, vpn is also active (tun0) The lxcbr0 (10.0.3.1) is unused

If I specify -ip 192.168.0.34:54323 to h2o (a typo, I shouldn't have specified port with the ip)

then H2O.java has this existing code. Is this because the ip can be a name so it's resolving it? In any case, since it's so easy to typo it, maybe a better error message for the user would help direct him. I at first thought I must have messed up some other code I was playing with, but this was existing. I fatfingered the -ip arg.

if (OPT_ARGS.ip != null) {
try{
arg = InetAddress.getByName(OPT_ARGS.ip);
} catch( UnknownHostException e ) {
Log.err(e);
H2O.exit(-1);
}

which causes this, because the UnknownHostException isn't caught (on the bad address)

20:12:13.071 main INFO WATER: Possible IP Address: eth0 (eth0), fe80:0:0:0:d63d:7eff:fe18:db22%2
20:12:13.071 main INFO WATER: Possible IP Address: tun0 (tun0), 172.16.0.229
20:12:13.071 main INFO WATER: Possible IP Address: lxcbr0 (lxcbr0), fe80:0:0:0:e000:36ff:fe8b:17c1%4
20:12:13.071 main INFO WATER: Possible IP Address: lxcbr0 (lxcbr0), 10.0.3.1
20:12:13.071 main INFO WATER: Possible IP Address: br0 (br0), 1234:5678:9abc:def0:0:0:0:2%3
20:12:13.071 main INFO WATER: Possible IP Address: br0 (br0), fe80:0:0:0:d63d:7eff:fe18:db22%3
20:12:13.071 main INFO WATER: Possible IP Address: br0 (br0), 192.168.0.34
20:12:13.071 main INFO WATER: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%1
20:12:13.072 main INFO WATER: Possible IP Address: lo (lo), 127.0.0.1
20:12:13.072 main INFO WATER: Possible IP Address: Kevin-Ubuntu3 (Kevin-Ubuntu3), 127.0.1.1
20:12:14.390 main ERRR WATER:
+ java.net.UnknownHostException: 192.168.0.34:54323: Name or service not known
+ at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
+ at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
+ at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
+ at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
+ at java.net.InetAddress.getAllByName(InetAddress.java:1162)
+ at java.net.InetAddress.getAllByName(InetAddress.java:1098)
+ at java.net.InetAddress.getByName(InetAddress.java:1048)
+ at water.H2O.findInetAddressForSelf(H2O.java:354)
+ at water.H2O.main(H2O.java:913)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:606)
+ at water.Boot.run(Boot.java:307)
+ at water.Boot.boot2(Boot.java:283)
+ at water.Boot.boot(Boot.java:150)
+ at water.Boot.main(Boot.java:122)

Assignee

New H2O Bugs

Reporter

Kevin Normoyle

Labels

None

CustomerVisible

No

testcase 1

None

testcase 2

None

testcase 3

None

h2ostream link

None

Affected Spark version

None

AffectedContact

None

AffectedCustomers

None

AffectedPilots

None

AffectedOpenSource

None

Support Assessment

None

Customer Request Type

None

Support ticket URL

None

End date

None

Baseline start date

None

Baseline end date

None

Task progress

None

Task mode

None

Components

Priority

Major
Configure