Reference questions checked:
- Tomcat server not working “externally”
- Spring Boot Service works locally but not remotely
- How to configure embedded Tomcat integrated with Spring to listen requests to IP address, besides localhost?
We have Spring Boot app deployed as standalone Java executable in embedded tomcat server on 192.168.22.125 Linux environment. In the same environment we also have Weblogic 12C application running on different port (9045) and we are able to access it the browser. Assuming we have a rest end point in Spring Boot app as 192.168.22.125:8888/jobs/uploads, we are able to access this endpoint from a Java app (also deployed in Weblogic) like below.
URL url = new URL(serverURL);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
...
...
But we are not able to access the same from either the browser or using wget
in windows powershell
. Referring question 1, we found that problem is with browser.Referring question 2, the solution might be adding the port to router configuration (This will be last option if nothing else works). And when i tried netstat
on puttyt connected to that envioment for the 8888 port, the output is
tcp46 0 0 :::.8888 :::.* LISTEN
But for the port 9045, where the Weblogic app is running, the output is
tcp46 0 0 192.168.22.125:9045 *.* LISTEN
So after referring question 3, I tried server.address=192.168.22.125
, with the hope that the Tomcat will bind the this and start listening to requests. Even though the netstat
output has changed, the result is same (Maybe I am missing some logical understanding here?).
So my questions are,
- What other solutions do I need to try?
- Why the app deployed in Weblogic is accessible but not the Spring Boot app from the browser? What additional settings/configurations need to be done?
- Why request from Java app (deployed in Weblogic) is getting successful but not from browser? Is it because the Java app is running in the same environment as Spring boot app or some checks are left out in case of requests like these?
Any additional resources for further understanding these network things would be very helpful. Thank you.