The jvm is trying to open the dt_socket
at host Patricks-iMac.local
, port 50547
but needs first to resolve that host name to an IP address. DNS lookup will fail since it's a dummy hostname assigned to a private address and DNS servers usually don't know about them unless a sysadmin has configured them (companies use to do that). There are two solutions for this:
1) Add the hostname mapping on hosts file keeping other names configured for that IP
127.0.0.1 localhost Patricks-iMac.local
2) Configure the dt_socket by IP address without touching hosts file (recommended)
-Xrunjdwp:transport=dt_socket,address=127.0.0.1:50547
A word on networking troubleshooting:
* unknown host
means DNS problems, TCP connection did not start at all because an IP address was not available.
* host unreachable
means TCP connectivity problems, an IP is known but not reachable because of firewall, routing or other problems. ping
to that IP will fail.
* port unreachable
means TCP connectivity problems, the IP is reachable but the port is not because of firewalls, service is down, etc. ping
to the IP will work but connections to that port will still fail.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…