Are the two apps using the same protocol? If one uses TCP and the other uses UDP then it could be that one of the protocols are not fully supported. Since it is not a real host network, how it works depends on how well the proxies/any forwarding rules are implented.
Yes, both apps are http based. Simple apps that expose a REST api to clients. I double-checked the Java app by using -p <host_port>:<container_port> insted of using --network host, and it worked as expected.
And what are the port numbers? Have you tried to change the port number of the service which is not available? It would mean changing the port in which the application listens.
Port number is 3000. I’ve run other 2 Java Spring Boot apps that bind to different ports and they don’t work. Finally, I’ve changed the embedded web server from Tomcat to Jetty or Undertow but didn’t work.
Then I don’t know. You can share this experience on GitHub. Hopefully the developers either know what causes the issue or they can improve the host netwokr feature.