Jetty
  1. Jetty
  2. JETTY-37

Port ProxyServlet from jetty5

    Details

    • Type: Task Task
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Servlet
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Port the org.mortbay.servlet.ProxyServlet from jetty5 to jetty6.

      1. JETTY-37.patch
        11 kB
        nik gonzalez
      2. jety6.csv
        3 kB
        nik gonzalez

        Activity

        Hide
        nik gonzalez added a comment -

        ProxyServlet ported to jetty6 with connection timeout problems. When proxying, connection times out most of the time

        Show
        nik gonzalez added a comment - ProxyServlet ported to jetty6 with connection timeout problems. When proxying, connection times out most of the time
        Hide
        nik gonzalez added a comment -

        ProxyServlet works with Jetty5 but does not seem to work with Jetty6. Connection times out with the following stack trace:

        /:WARN: proxy
        java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at org.mortbay.servlet.ProxyServlet.service(ProxyServlet.java:188)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:350)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:174)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:220)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:539)
        at org.mortbay.jetty.Server.handle(Server.java:341)
        at org.mortbay.jetty.Server.handle(Server.java:311)
        at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:353)
        at org.mortbay.jetty.HttpConnection.access$18(HttpConnection.java:337)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:597)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:196)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:291)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:153)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412)
        /:WARN: proxy
        java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at org.mortbay.servlet.ProxyServlet.service(ProxyServlet.java:188)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:350)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:174)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:220)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:539)
        at org.mortbay.jetty.Server.handle(Server.java:341)
        at org.mortbay.jetty.Server.handle(Server.java:311)
        at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:353)
        at org.mortbay.jetty.HttpConnection.access$18(HttpConnection.java:337)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:597)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:196)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:291)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:153)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412)

        Show
        nik gonzalez added a comment - ProxyServlet works with Jetty5 but does not seem to work with Jetty6. Connection times out with the following stack trace: /:WARN: proxy java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at org.mortbay.servlet.ProxyServlet.service(ProxyServlet.java:188) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:350) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:174) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:220) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:539) at org.mortbay.jetty.Server.handle(Server.java:341) at org.mortbay.jetty.Server.handle(Server.java:311) at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:353) at org.mortbay.jetty.HttpConnection.access$18(HttpConnection.java:337) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:597) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:196) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:291) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:153) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412) /:WARN: proxy java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at org.mortbay.servlet.ProxyServlet.service(ProxyServlet.java:188) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:350) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:174) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:220) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:539) at org.mortbay.jetty.Server.handle(Server.java:341) at org.mortbay.jetty.Server.handle(Server.java:311) at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:353) at org.mortbay.jetty.HttpConnection.access$18(HttpConnection.java:337) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:597) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:196) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:291) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:153) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412)
        Hide
        Jan Bartel added a comment -

        Nik, can you capture the dialog between the browser and jetty? Use something like "ethereal" , select "capture" and select "pseudo device on any interface", and "port 8080" (or whatever port you are running jetty on).

        Show
        Jan Bartel added a comment - Nik, can you capture the dialog between the browser and jetty? Use something like "ethereal" , select "capture" and select "pseudo device on any interface", and "port 8080" (or whatever port you are running jetty on).
        Hide
        nik gonzalez added a comment -

        Here's the csv file i exported from ethereal

        Show
        nik gonzalez added a comment - Here's the csv file i exported from ethereal
        Hide
        nik gonzalez added a comment -

        I ran the proxy servlet both on jetty 5 and 6 and found that the request url is on different ports. I configured both jetty 5 and 6 to listen on port 8080. I configured the browser for the proxy server and pointed to yahoo. The logs for jetty 6 show ":INFO: URL=http://www.yahoo.com:8080/" whereas the logs for jetty 5 show "INFO: URL=http://www.yahoo.com:80/". Why is this?

        Show
        nik gonzalez added a comment - I ran the proxy servlet both on jetty 5 and 6 and found that the request url is on different ports. I configured both jetty 5 and 6 to listen on port 8080. I configured the browser for the proxy server and pointed to yahoo. The logs for jetty 6 show ":INFO: URL= http://www.yahoo.com:8080/ " whereas the logs for jetty 5 show "INFO: URL= http://www.yahoo.com:80/ ". Why is this?

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Jan Bartel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: