I am working in Intellij Idea and I have issues working with Testcontainers. It heavily depends on Docker containers. To run them I use Colima. It's set up with a network address.
# Results from `colima status`
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.200.5
INFO[0000] socket: unix://$HOME/.colima/default/docker.sock
When I run ping 192.168.200.5 in iTerm, then it works. When I ping from the Terminal in IntelliJ, then I get No route to host
.
PING 192.168.200.5 (192.168.200.5): 56 data bytes
ping: sendto: No route to host
Request timeout for icmp_seq 0
ping: sendto: No route to host
Request timeout for icmp_seq 1
ping: sendto: No route to host
Request timeout for icmp_seq 2
^C
--- 192.168.200.5 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
I figured it out. MacOS prevented IntelliJ to access the local network.
Solution 1 in the support article below helped me.