No route to host - IntelliJ IDEA
Hi,
What configuration/setting could cause the below issue?
Unable to ping or connect to another machine on my local network from terminal within the IntelliJ IDE.
ping 192.168.0.63 4sPING 192.168.0.63 (192.168.0.63): 56 data bytesRequest timeout for icmp_seq 0Request timeout for icmp_seq 1
But this works fine from the Mac terminal (same machine as where the IDE is running)
~ ❯ ping 192.168.0.63 toPING 192.168.0.63 (192.168.0.63): 56 data bytes64 bytes from 192.168.0.63: icmp_seq=0 ttl=64 time=5.722 ms64 bytes from 192.168.0.63: icmp_seq=1 ttl=64 time=3.751 ms
Same behavior with telnet 192.168.0.63 as well.
Please sign in to leave a comment.
1. The configured shell path from "File | Settings | Tools | Terminal", see if it uses the same binary as the macOS terminal does.
2. If there are any temp environment variables configured in both terminal sessions.
3. Restart the VPN while both terminal sessions are active if there are any.
4. File | Settings | Appearance & Behavior | System Settings | HTTP Proxy from the IDE side
1. The configured shell path from "File | Settings | Tools | Terminal", see if it uses the same binary as the macOS terminal does.
2. If there are any temp environment variables configured in both terminal sessions.
3. Restart the VPN while both terminal sessions are active if there are any.
4. File | Settings | Appearance & Behavior | System Settings | HTTP Proxy from the IDE side
Checked all the above, everything is same for both Mac terminal and IntelliJ terminal.
This issue is not limited to ping/terminal, but same with the JDBC connections from IntelliJ. Same java code works outside IntelliJ, but doesn't connect JDBC when executed inside IntelliJ, shows no route to host error.
Do you have any Firewall/Security application running with allow/deny list of other application/ports?
The solution is here:
Navigate to macOS System Settings | Privacy & Security | Local Network