Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Tomcat connection refused

843833Sep 14 2001 — edited Sep 14 2001
Hi-

I'm really puzzled over this, and I could use some help.

I have a standalone instance of Tomcat up and running on NT4.0 SP6. I can run all of the servlet examples and JSP examples with no problem.

But, I have a third party "100% Pure Java" servlet that throws this exception:

java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at sun.net.NetworkClient.doConnect(NetworkClient.java:50)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:331)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:517)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:277)
at sun.net.www.http.HttpClient.New(HttpClient.java:289)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:408)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:455)
at com.mapinfo.mapxtreme.client.a8.c([DashoPro-V1.2-120198])
at com.mapinfo.mapxtreme.client.MapXtremeImageRenderer.render([DashoPro-V1.2-120198])
at com.mapinfo.mapj.MapJ.render([DashoPro-V1.2-120198])
at HTMLEmbeddedMapServlet.sendImageResponse(HTMLEmbeddedMapServlet.java:542)
at HTMLEmbeddedMapServlet.service(HTMLEmbeddedMapServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)

The server and the applications are configured for "localhost:8080," and that is the URL from which I've been attempting to access the servlet. I've also tried using the IP address in the browser's address bar, and the machine name-- it doesn't make any difference.

I suspect it may be something to do with socket permissions, but if so, I don't know how to address this. The vendor has given up, but I'm a little more stubborn.

Any ideas? I'd really appreciate some tips at this point.

Comments

843833
See http://forum.java.sun.com/thread.jsp?forum=33&thread=170505

Please do not cross post.
843833
As I understand, that "100% Pure Java" servlet is trying to connect to some server : and not able to get the connection. correct?
843833
looks like ur 100% servlet is trying to open another socket to elsewhere , check out the code or post the servlet code ....
843833
Sorry about the crossposting and if the message wasn't as clear as it should have been... it's been a hectic day.

Yes, the servlet is trying to open a socket. In fact, what is supposed to happen is the servlet is supposed to open a socket to another servlet which renders an image and sends it to an OutputStream through the original servlet's Response object.

I had considered that there might be some kind of Java or Tomcat security configuration that I'm overlooking-- but I don't really know where to start.

I guess my question is: Given that the other Tomcat servlets seem to be working, can you think of any reason (security or policy configuration files in Tomcat or Java, for instance) why a servlet cannot open a socket to another servlet on the same host?

Thanks for your patience...
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 12 2001
Added on Sep 14 2001
4 comments
191 views