简体   繁体   中英

Tomcat works over port 80, but not 8080. Firewall is turned off

The title pretty much says it all.

I have an applet frontend and servlet backend. They work perfectly when testing with Eclipse. An hour or two ago, they were working perfectly on the RedHat production server, too. The applet is delivered by Apache, the servlet by Tomcat 5.5.

At first, there were the usual problems with the firewall. I opened port 8080 with iptables, and all was fine. I installed JDBC and a couple other things I needed. The applet was getting information from the servlet. Yay.

A few minutes ago, I tweaked a config file for the servlet. I don't think I touched anything other than that file. Now, Tomcat will not connect over port 8080. Neither the applet nor a browser (I have a HelloWorld for standard GET requests for testing) can get anything, neither to that servlet nor even to ROOT. If I redirect through port 80, it works fine on a browser, but for some reason the applet seems to be having trouble with that and gives me a File Not Found error when creating the HTTPURLConnection.

This is the case even if I completely clear out the firewall with lokkit. I double-checked and restarted iptables, and there is no firewall anywhere. Netstat doesn't show anything on port 8080 when Tomcat is stopped. Just to check, I moved Tomcat to 8081, and all of the above is still true - works when rerouted from 80, not when accessed directly at :8081.

Anyone got any idea what is going on, and how can I put it back?

A little hard to tell exactly where the error is with the above info.

When you reroute, do you reroute to 127.0.0.1? Can it be that tomcat only listens on localhost (127.0.0.1) ? Check with netstat if it binds to * or 127.0.0.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM