locked
Connection timeout with tomcat RRS feed

  • Question

  • User1621144509 posted

     Hi,

    I'm using Windows server 2003 with IIS6 and with tomcat6 connected with isapi_redirect-1.2.27

    My java servlet uses batik to generate an image in png. The server has a static IP (of course) in the LAN, and it is connected to a router (with a public IP address).

    Using the browser within the server using the LAN IP address to call the servlet, there is no problem: I can see the image displayed in the browser.

    If I connect from outside the LAN (so using the public IP) I got the following connection time out error and so no image! From outside the LAN I am able to navigate through the other jsp pages and servlet.

    What could be the causes?

    Hosting the same files on another commercial hoster it works without errors.

    Please help....

     

    org.apache.batik.transcoder.TranscoderException: null
    Enclosed Exception:
    Connection timed out: connect
     at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:136)
     at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)

    Saturday, January 17, 2009 12:30 PM

Answers

  • User1621144509 posted

    Solved. It was an error in my servlet!

    Sorry!

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, January 29, 2009 1:41 PM

All replies

  • User-2064283741 posted

    It sound like it could be a network/firewall/routing issue from that location.

    Put a packet sniffer on it to see if IIS if there if teh file is being sent out of the network.

    Saturday, January 17, 2009 2:40 PM
  • User1621144509 posted

    thanks, but I never used a packet sniffer: could you give me some instructions?

    I found out that using the public IP address or localhost from a server browser it is not possible to reach neither the servlet nor the jsp and html pages. Could this give you any clue?

    summarizing:

    • from outside the LAN using public IP: pages can be browsed but I got connection timeout
    • from the server using static IP (192.168.x.y): it works perfectly
    • from the server using public IP: unable to find any page
    • from the server using localhost: unable to find any page

     

    Saturday, January 17, 2009 4:18 PM
  • User-1796730883 posted

    Hi,Maxqua

    Can you access your Tomcat6 directly without using "isapi_redirect-1.2.27"? if the problem produced the same, This problem may due to Network issue.

    Regards.

     

    Thursday, January 22, 2009 9:51 PM
  • User-2064283741 posted

    thanks, but I never used a packet sniffer: could you give me some instructions?

     

    Start here:

    http://support.microsoft.com/kb/148942

    Then google network monitor for more info.

    Thursday, January 22, 2009 9:56 PM
  • User1621144509 posted

    I used the sniffer and the result is (I filtered the http protocol only):

    384 6.355468 001D8BD516C2 LOCAL HTTP GET Request from Client 151.54.81.124 SERVER-WEB IP 
    877 27.314453 LOCAL 001D8BD516C2 HTTP Response to Client; HTTP/1.1; Status Code = 200 - OK SERVER-WEB 151.54.81.124 IP

    The result is the same, the picture I am going to get is not displayed.

    Sunday, January 25, 2009 11:31 AM
  • User1621144509 posted

    Moving the website so that tomcat can work bypassing the isapi_redirect, the problem is still there. Please help!!

    Sunday, January 25, 2009 11:47 AM
  • User1621144509 posted

    Solved. It was an error in my servlet!

    Sorry!

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, January 29, 2009 1:41 PM
  • User-1407668504 posted

    Hello maxqua:

    what you are describing is common and occurs when the AJP channel is overloaded. You will not get a response from IIS, i.e. the ISAPI connection (the connection between IIS/Tomcat) but you can go to tomcat directly and will see your page/servlets.

    The issue here is that the connections between IIS and tomcat are not properly being released. They use a different protocol (AJP1.3) to communicate.

    You can easily check on this by going to the Tomcat status page and see all the different type of connections. Most likely it will tell you that the AJP connections are maxed out. This could be based on your servlet or as well as the connector itself.

    You can do three things:

    a) Check that your servlet does not maintain connections by accident

    b) Increase the number of connections available to AJP protocol (change server.xml file, add maxThreads attribute to AJP protocol (normally port 8009)).

    c) Change the connector from ISAPI to BonCode. You can configure the BonCode connector to force a disconnect every time. Easier to installl as well: See

    http://tomcatiis.riaforge.org

     

    Good Luck,

    J.

     

    Tuesday, May 10, 2011 11:03 AM