No route to host - IntelliJ IDEA

Answered

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                                                                                                                                                     4s
PING 192.168.0.63 (192.168.0.63): 56 data bytes
Request timeout for icmp_seq 0
Request 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                                                                   to
PING 192.168.0.63 (192.168.0.63): 56 data bytes
64 bytes from 192.168.0.63: icmp_seq=0 ttl=64 time=5.722 ms
64 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.

 

1
5 comments
I would check it further from below points:

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
0
I would check it further from below points:

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
0

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.

0
Have you tried different options from the IDE proxy settings? What is the current configuration?
Do you have any Firewall/Security application running with allow/deny list of other application/ports?
0

The solution is here: 
Navigate to macOS System Settings | Privacy & Security | Local Network

  • Toggle the setting ON for the Idea IDE in question “Allow local network”
0

Please sign in to leave a comment.