java.net.UnknownHostException: 192.168.0.34:54323: Name or service not known

JIRA | Kevin Normoyle | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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)

    JIRA | 3 years ago | Kevin Normoyle
    java.net.UnknownHostException: 192.168.0.34:54323: Name or service not known
  2. 0

    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)

    JIRA | 3 years ago | Kevin Normoyle
    java.net.UnknownHostException: 192.168.0.34:54323: Name or service not known
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    InetAddress.getByName intermittently fails with System error

    Stack Overflow | 3 years ago | Louise Miller
    java.net.UnknownHostException: google.com: System error
  5. 0

    Unknown host excpetion issue with proxy settings

    Stack Overflow | 2 years ago | shiva prasad
    java.net.UnknownHostException: google.com: No address associated with hostnamewebsite not found

  1. rp 1 times, last 4 weeks ago
  2. poroszd 1 times, last 4 weeks ago
  3. Dunmer 5 times, last 1 month ago
  4. iferca 1 times, last 2 months ago
  5. Andreas Häber 756 times, last 7 months ago
3 more registered users
10 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.UnknownHostException

    192.168.0.34:54323: Name or service not known

    at java.net.Inet6AddressImpl.lookupAllHostAddr()
  2. Java RT
    InetAddress.getByName
    1. java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    2. java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
    3. java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
    4. java.net.InetAddress.getAllByName0(InetAddress.java:1246)
    5. java.net.InetAddress.getAllByName(InetAddress.java:1162)
    6. java.net.InetAddress.getAllByName(InetAddress.java:1098)
    7. java.net.InetAddress.getByName(InetAddress.java:1048)
    7 frames
  3. water
    H2O.main
    1. water.H2O.findInetAddressForSelf(H2O.java:354)
    2. water.H2O.main(H2O.java:913)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  5. water
    Boot.main
    1. water.Boot.run(Boot.java:307)
    2. water.Boot.boot2(Boot.java:283)
    3. water.Boot.boot(Boot.java:150)
    4. water.Boot.main(Boot.java:122)
    4 frames