Weblogic Proxy Servlet

          I'm creating a servlet filter that filters the content of resources that are proxied
          by the Weblogic Proxy servlet (weblogic.servlet.proxy.HttpProxyServlet)
          The filtering of the content is working but getting the filtering of incoming
          and outgoing headers is a problem.
          I get ClasscastExceptions if I try to implement my own request wrapper in WL 7
          SP2 (incoming headers). And filtering headers in the response wrapper (outgoing
          headers) causes a IndexOutOfBoundsException. This is caused by a call to response.setHeader
          in the wrapper.
          Has someone managed to get header filtering to work?
          java.lang.IndexOutOfBoundsException
          at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
          at java.io.DataInputStream.read(DataInputStream.java:108)
          at weblogic.servlet.proxy.GenericProxyServlet.sendResponse(GenericProxyServlet.java:595)
          

This looks like a bug in the ProxyServlet. I would report this to support.
          Sam
          Sven Andersson wrote:
          > I'm creating a servlet filter that filters the content of resources that are proxied
          > by the Weblogic Proxy servlet (weblogic.servlet.proxy.HttpProxyServlet)
          >
          > The filtering of the content is working but getting the filtering of incoming
          > and outgoing headers is a problem.
          >
          > I get ClasscastExceptions if I try to implement my own request wrapper in WL 7
          > SP2 (incoming headers). And filtering headers in the response wrapper (outgoing
          > headers) causes a IndexOutOfBoundsException. This is caused by a call to response.setHeader
          > in the wrapper.
          >
          > Has someone managed to get header filtering to work?
          >
          > java.lang.IndexOutOfBoundsException
          > at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
          > at java.io.DataInputStream.read(DataInputStream.java:108)
          > at weblogic.servlet.proxy.GenericProxyServlet.sendResponse(GenericProxyServlet.java:595)
          

Similar Messages

  • How does a proxy servlet work and how to set up

    I'm a newbie to Weblogic, using 8.1SP3. I came across documentation about a Proxy Servlet that allow weblogic to proxy requests to another web server. This is the scenerio I'm trying to set up. I want to create a weblogic module that proxies to yahoo.com. The communications between weblogic and yahoo may not be SSL, but from weblogic back to my client is SSL. I created a yahoo directory under user-projects\domains\mydomain. I created a WEB-INF\web.xml with the following based on the documentation:
              <!DOCTYPE web-app PUBLIC
              "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
              <web-app>
              <servlet>
              <servlet-name>ProxyServlet</servlet-name>
              <servlet-class>weblogic.servlet.proxy.HttpProxyServlet
              </servlet-class>
              <init-param>
              <param-name>redirectURL</param-name>
              <param-value>http://www.yahoo.com:80</param-value>
              </init-param>
              </servlet>
              <servlet-mapping>
              <servlet-name>ProxyServlet</servlet-name>
              <url-pattern>/</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ProxyServlet</servlet-name>
              <url-pattern>*.jsp</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ProxyServlet</servlet-name>
              <url-pattern>*.htm</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ProxyServlet</servlet-name>
              <url-pattern>*.html</url-pattern>
              </servlet-mapping>
              </web-app>
              I deploy the yahoo directory from the admin console and when I go to https://localhost:7002/
              I would expect to see the www.yahoo.com page. Am I missing something. Is this not what the proxy servlet is for, is the above possible? Any help and suggestions appreciated.
              --Sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hey Anders, it's working....
              Believe it or not, all I did after adding the weblogic.xml was restart the bea server; even though I had redeployed the module.
              So, thank you very much for your patience and suggestions.
              --Sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can't get IIS to WebLogic Proxying to Work

    Hi all,
    It seems this post adds to many similar ones - the issue being that of successfully
    deploying iisproxy.dll, iisforward.dll and iisproxy.ini. I have IIS 4.0 running
    on NT 4.0 Server, and WebLogic 6.0 SP1 running on a seperate machine under Windows
    2000.
    I can proxy by file type no problem, it's proxying by path/proxying servlets that's
    biting me.
    I have followed the instructions at http://e-docs.bea.com/wls/docs60/adminguide/isapi.html#100367.
    Here are the instructions and what I've done in response to them:
    "1. Place the iisforward.dll file in the same directory as the iisproxy.dll file
    and add the iisforward.dll file as a filter service in IIS"
    I copied iisforward.dll and iisproxy.dll from my weblogic machine to C:\WINNT\system32\inetsrv
    on the IIS machine.
    I added iisforward.dll as a filter service in MS Management Console by choosing
    properties > ISAPI FIlters tab > Add. Here I browsed to iisforward.dll and named
    the filter WebLogic Filter Servlet (The name is not important, right?)
    "2. Register .wlforward as a special file type to be handled by iisproxy.dll."
    So, in MS Management Console I chose properties > home directory > Configuration
    Add and browsed to iisproxy.dll and registered it with the file type .wlforward."3. Define the property WlForwardPath in iisproxy.ini. WlForwardPath defines the
    path that is proxied to WebLogic Server."
    So I added the following line to iisproxy.ini on the WebLogic machine AND on the
    IIS machine:
    WLForwardPath=/CIM2WebApplication
    My web app is in exploded directory form at E:\bea\wlserver6.0sp1\config\terrance\applications\CIM2WebApplication
    (where CIM2WebApplication is the root directory of the app in which WEB_INF and
    my jsps and html files are located.)
    In addition, in web.xml, I have defined a servlet as follows:
    <servlet>
    <servlet-name>register</servlet-name>
    <servlet-class>net.companyname.cimsweb.RegisterUser</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>register</servlet-name>
    <url-pattern>/register</url-pattern>
    </servlet-mapping>
    (Excuse all this the verbosity, but hopefully no-one will wonder what exactly
    I did!)
    When I use the following URL http://iiserverip/CIMS2WebApplication/register I
    get a 404 from IIS (i.e. nothing at all is getting proxied to WL, not even a wrong
    url)
    OK, I've finished! If someone would like to catch their breath and help me out
    I'd be extremely grateful! Thanks so much.
    Terrance

    I think we honor both WLForwardPath and WlForwardPath in the latest 5.1 service
    pack and 61 release.
    thanks
    Jong
    "Nasir" <[email protected]> wrote:
    >
    I have had similar problems, there is an error in the documentation,
    WlForwardPath
    needs to be spelled with a lower case "l".
    Nasir
    WLForwardPath=/CIM2WebApplication
    "Anurag Wakhlu" <[email protected]> wrote:
    Hi,
    I have a similar problem. (WLS sp8, win2k, IIS)
    Proxy by path does not work. Proxy by extension works.
    AW
    "Jong Lee" <[email protected]> wrote in message
    news:[email protected]...
    Did you try to request the servlet without IIS proxy?
    Please feel free to contact customer support to help you with thissetup
    step-by-step.
    thanks
    Jong
    "Terrance Goldman" <[email protected]> wrote:
    Hi all,
    It seems this post adds to many similar ones - the issue being that
    of
    successfully
    deploying iisproxy.dll, iisforward.dll and iisproxy.ini. I have IIS4.0
    running
    on NT 4.0 Server, and WebLogic 6.0 SP1 running on a seperate machine
    under Windows
    2000.
    I can proxy by file type no problem, it's proxying by path/proxyingservlets
    that's
    biting me.
    I have followed the instructions at
    http://e-docs.bea.com/wls/docs60/adminguide/isapi.html#100367.
    Here are the instructions and what I've done in response to them:
    "1. Place the iisforward.dll file in the same directory as theiisproxy.dll
    file
    and add the iisforward.dll file as a filter service in IIS"
    I copied iisforward.dll and iisproxy.dll from my weblogic machineto
    C:\WINNT\system32\inetsrv
    on the IIS machine.
    I added iisforward.dll as a filter service in MS Management Consoleby
    choosing
    properties > ISAPI FIlters tab > Add. Here I browsed to iisforward.dll
    and named
    the filter WebLogic Filter Servlet (The name is not important, right?)
    "2. Register .wlforward as a special file type to be handled byiisproxy.dll."
    So, in MS Management Console I chose properties > home directoryConfiguration
    Add and browsed to iisproxy.dll and registered it with the filetype
    .wlforward.
    "3. Define the property WlForwardPath in iisproxy.ini. WlForwardPath
    defines the
    path that is proxied to WebLogic Server."
    So I added the following line to iisproxy.ini on the WebLogic machine
    AND on the
    IIS machine:
    WLForwardPath=/CIM2WebApplication
    My web app is in exploded directory form atE:\bea\wlserver6.0sp1\config\terrance\applications\CIM2WebApplication
    (where CIM2WebApplication is the root directory of the app in whichWEB_INF
    and
    my jsps and html files are located.)
    In addition, in web.xml, I have defined a servlet as follows:
    <servlet>
    <servlet-name>register</servlet-name>
    <servlet-class>net.companyname.cimsweb.RegisterUser</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>register</servlet-name>
    <url-pattern>/register</url-pattern>
    </servlet-mapping>
    (Excuse all this the verbosity, but hopefully no-one will wonder
    what
    exactly
    I did!)
    When I use the following URL
    http://iiserverip/CIMS2WebApplication/register
    I
    get a 404 from IIS (i.e. nothing at all is getting proxied to WL,not
    even a wrong
    url)
    OK, I've finished! If someone would like to catch their breath andhelp
    me out
    I'd be extremely grateful! Thanks so much.
    Terrance

  • About the proxy servlet!!!!!

    Hi there,
              I need to us the proxy servlet to redirect requests that cannot be served by
              my weblogic server to another server. I'm using the following configuration
              parameters in my weblogic.properties file:
              weblogic.httpd.defaultServlet=proxy
              weblogic.httpd.register.proxy=weblogic.t3.srvr.HttpProxyServlet
              weblogic.httpd.initArgs.proxy=redirectURL=http://www.abc.com
              The problem that I'm facing is that instead of redirecting requests that
              cannot be satisfied by my server to www.abc.com, the proxy servlet is
              redirecting all the requests to www.abc.com...
              Any help would be appreciated..
              Thanks
              Gaurav
              

    Gaurav:
              The proxy servlet documentation is wrong.
              If the HttpProxyServlet registration is made the default servlet then, all
              request for servlet aliases that WebLogic cannot resolve it will proxy. This
              does not include files.
              I have filed an issue to:
              1. fix the documentation
              2. provide an enhancement to provide for the feature you desire.
              The only workaround currently is to also register (or maybe instead) whatever
              URI or mime-types you know you want proxied to the HttpProxyServlet.
              Cheers
              Mark G.
              Gaurav wrote:
              > Hi there,
              >
              > I need to us the proxy servlet to redirect requests that cannot be served by
              > my weblogic server to another server. I'm using the following configuration
              > parameters in my weblogic.properties file:
              >
              > weblogic.httpd.defaultServlet=proxy
              > weblogic.httpd.register.proxy=weblogic.t3.srvr.HttpProxyServlet
              > weblogic.httpd.initArgs.proxy=redirectURL=http://www.abc.com
              >
              > The problem that I'm facing is that instead of redirecting requests that
              > cannot be satisfied by my server to www.abc.com, the proxy servlet is
              > redirecting all the requests to www.abc.com...
              >
              > Any help would be appreciated..
              >
              > Thanks
              > Gaurav
              =====================================================
              Reply to the newsgroup. Don't reply to this mail
              alias. This is used only for answering posts on
              WebLogic Newsgroups.
              =====================================================
              [att1.html]
              

  • WebLogic proxy settings

    Hi
    We are developing a portal on J2EE architecture where we are using WebLogic WebExpress
    5.1 as web server and WebLogic Server 5.1 as the application server. We intend
    to deploy JSPs and EJBs on application server. The web server would serve the
    static content.The HTML, images would reside on the web server. We have implemented
    the proxy servlet setting on the web server which is working fine for JSPs but
    it is also proxying the requests for HTML/GIFs to the application server.
    We have set the following properties in the weblogic.properties of web server....
    weblogic.httpd.defaultServlet=proxy
    weblogic.httpd.register.proxy=weblogic.t3.srvr.HttpProxyServlet
    weblogic.httpd.initArgs.proxy=redirectURL=http://appserver:7001
    Kindly reply if anyone has any idea about it.
    Thanks
    Jagdish

    I found the solution to this issue. The cause was the behavior in our installer, which creates a Windows Service to startup Weblogic, the “setDomainEnv.CMD” changes were not getting picked up.
    I launched a separate DOS command-line prompt and then started all the Managed Servers using startManagedWeblogic <ServerName> and the settings got picked up just OK.

  • Web Logic 8.1 proxy servlet

              Hi all,
              I am trying to get the proxy server to work on WebLogic 8.1. All I want to do
              is redirect certain requests received by WebLogic to another web server. I referred
              to the following instructions: http://e-docs.bea.com/wls/docs81/plugins/http_proxy.html.
              My attempt at setting up weblogic to proxy requests failed.
              Here is what I did.
              1. I made my web application (DefaultWebApp) the default web application of the
              server instance by adding the following line to weblogic.xml:
              <context-root>/</context-root>
              2. Then I added the following to web.xml:
              <servlet>
              <servlet-name>myTestProxyServlet</servlet-name>
              <servlet-class>weblogic.servlet.proxy.HttpProxyServlet</servlet-class>
              <init-param>
              <param-name>Debug</param-name>
              <param-value>ON</param-value>
              </init-param>
              <init-param>
              <param-name>redirectURL</param-name>
              <param-value>http://shark:6909</param-value>
              <init-param>
              <init-param>
              <param-value>PathTrim</param-name>
              <param-value>/proxies/mytest/</param-value>
              </init-param>
              </servlet>
              <servlet-mapping>
              <servlet-name>myTestProxyServlet</servlet-name>
              <url-pattern>/proxies/mytest/*.html</url-pattern>
              </servlet-mapping>
              To test I did the following - dolphin is my weblogic server:
              Using my browser I went to the following address:
              http://dolphin:7001/proxies/mytest/index.html
              I expected to be redirected to http://shark:6090, however instead I got the 404
              error code. What am I doing wrong? Any help you can give me will be greatly appreciated.
              Thanks
              Manish
              

              Hi Sam,
              Thanks for your response. I updated web.xml and removed the trailing / from
              PathTrim.
              Then I went to http://dolphin.db.com:7001/proxies/mytest/banner.html. That
              worked - weblogic proxied it to shark and banner.html appeared in my browser.
              I then tried going to http://dolphin.db.com:7001/proxies/mytest. That failed.
              The weblogic error I got was:
              <Fri Sep 05 17:18:05 EDT 2003>: Start connection timeout scheduler
              <Fri Sep 05 17:18:05 EDT 2003>: GenericProxyServelt: init()
              <Fri Sep 05 17:18:05 EDT 2003>: Create connection: ProxyConnection(isSecureProxy=false):
              shark.db.com:6909, keep-alive='30'secs
              <Fri Sep 05 17:18:05 EDT 2003>: ===New Request===GET HTTP/1.1
              <Fri Sep 05 17:18:05 EDT 2003>: In-bound headers:
              <Fri Sep 05 17:18:05 EDT 2003>: Accept: image/gif, image/x-xbitmap, image/jpeg,
              image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint,
              application/x-shockwave-flash, */*
              <Fri Sep 05 17:18:05 EDT 2003>: Accept-Language: en-us
              <Fri Sep 05 17:18:05 EDT 2003>: Accept-Encoding: gzip, deflate
              <Fri Sep 05 17:18:05 EDT 2003>: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5;
              Windows NT 4.0; H010818)
              <Fri Sep 05 17:18:05 EDT 2003>: Host: dolphin.db.com:7001
              <Fri Sep 05 17:18:05 EDT 2003>: Connection: Keep-Alive
              <Fri Sep 05 17:18:05 EDT 2003>: Cookie: ADMINCONSOLESESSION=1Y9l7erX6JaDYJRNOYfA6GaxLLFID1qDREoHZgLmgKB76b2e1gBD!1696045128;
              SignOnDefault=
              <Fri Sep 05 17:18:05 EDT 2003>: <HTML><HEAD><TITLE>Bad request</TITLE></HEAD>
              <Sep 5, 2003 5:18:05 PM EDT> <Error> <HTTP> <BEA-101020> <[ServletContext(id=23714420,name=defaultWebApp,context-path=)]
              Servlet failed with Exception
              java.lang.NumberFormatException: For input string: "request</TITLE></HEAD>"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
              at java.lang.Integer.parseInt(Integer.java:426)
              at java.lang.Integer.parseInt(Integer.java:476)
              at weblogic.servlet.proxy.GenericProxyServlet.readStatus(GenericProxyServlet.java:548)
              at weblogic.servlet.proxy.GenericProxyServlet.sendResponse(GenericProxyServlet.java:575)
              at weblogic.servlet.proxy.GenericProxyServlet.service(GenericProxyServlet.java:280)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              The access log on the weblogic server (dolphin) showed the following:
              10.124.172.196 - - [05/Sep/2003:17:18:05 -0400] "GET /proxies/mytest HTTP/1.1"
              500 2019
              The access log on the shark was:
              10.163.85.82 - - [05/Sep/2003:17:19:04 +0100] "GET " 400 147 "-" "-" "-"
              FYI - I was experimenting with the following web.xml configuration and went to
              http://dolphin.db.com:7001/. The proxy worked. The following web.xml worked
              (this configuration is not what we want though)
              <servlet>
              <servlet-name>myTestProxyServlet</servlet-name>
              <servlet-class>weblogic.servlet.proxy.HttpProxyServlet</servlet-class>
              <init-param>
              <param-name>Debug</param-name>
              <param-value>ON</param-value>
              </init-param>
              <init-param>
              <param-name>redirectURL</param-name>
              <param-value>http://shark.db.com:6909</param-value>
              </init-param>
              </servlet>
              <servlet-mapping>
              <servlet-name>myTestProxyServlet</servlet-name>
              <url-pattern>/*</url-pattern>
              </servlet-mapping>
              Thanks again for your help..
              Manish
              Sam Pullara <[email protected]> wrote:
              >Looks like we are getting somewhere. What happens if you try the original
              >
              >request that ended with a file? What does the access log of the server
              >on
              >shark.db.com say?
              >
              >I would also change the path trim so as not to include the trailing /,
              >you will
              >need a slash as the first part of the requested URL in general.
              >
              >
              > <init-param>
              > <param-value>PathTrim</param-name>
              > <param-value>/proxies/mytest</param-value>
              > </init-param>
              > </servlet>
              >
              >I'll test this locally as well. Can you send me the result of trying:
              >
              >http://dolphin:7001/proxies/mytest/index.html
              >
              >after you make the path trim change?
              >
              >Sam
              >
              >Manish Ghayalod wrote:
              >
              >> Hi Sam,
              >> Thank you for your response. I changed my web.xml file. Now it looks
              >as follows:
              >> <servlet>
              >> <servlet-name>myTestProxyServlet</servlet-name>
              >> <servlet-class>weblogic.servlet.proxy.HttpProxyServlet</servlet-class>
              >> <init-param>
              >> <param-name>Debug</param-name>
              >> <param-value>ON</param-value>
              >> </init-param>
              >> <init-param>
              >> <param-name>redirectURL</param-name>
              >> <param-value>http://shark.db.com:6909</param-value>
              >> <init-param>
              >> <init-param>
              >> <param-value>PathTrim</param-name>
              >> <param-value>/proxies/mytest/</param-value>
              >> </init-param>
              >> </servlet>
              >>
              >> <servlet-mapping>
              >> <servlet-name>myTestProxyServlet</servlet-name>
              >> <url-pattern>/proxies/mytest/*</url-pattern>
              >> </servlet-mapping>
              >>
              >> If I try going to shark.db.com:6909 directly from my browser it works.
              >However,
              >> if I trying going
              >> through the weblogic proxy (http://dolphin.db.com:7001/proxies/mytest),
              >it fails.
              >> This is the
              >> error message I get:
              >> <Fri Sep 05 11:39:21 EDT 2003>: Start connection timeout scheduler
              >> <Fri Sep 05 11:39:21 EDT 2003>: GenericProxyServelt: init()
              >> <Fri Sep 05 11:39:21 EDT 2003>: Create connection: ProxyConnection(isSecureProxy=false):
              >> shark.db.com:6909, keep-alive='30'secs
              >> <Fri Sep 05 11:39:21 EDT 2003>: ===New Request===GET /proxies/mytest
              >HTTP/1.1
              >>
              >>
              >> <Fri Sep 05 11:39:21 EDT 2003>: In-bound headers:
              >> <Fri Sep 05 11:39:21 EDT 2003>: Accept: image/gif, image/x-xbitmap,
              >image/jpeg,
              >> image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint,
              >> application/x-shockwave-flash, */*
              >> <Fri Sep 05 11:39:21 EDT 2003>: Accept-Language: en-us
              >> <Fri Sep 05 11:39:21 EDT 2003>: Accept-Encoding: gzip, deflate
              >> <Fri Sep 05 11:39:21 EDT 2003>: User-Agent: Mozilla/4.0 (compatible;
              >MSIE 5.5;
              >> Windows NT 4.0; H010818)
              >> <Fri Sep 05 11:39:21 EDT 2003>: Host: dolphin.db.com:7001
              >> <Fri Sep 05 11:39:21 EDT 2003>: Connection: Keep-Alive
              >> <Fri Sep 05 11:39:21 EDT 2003>: HTTP/1.1 404 Not Found
              >> <Fri Sep 05 11:39:21 EDT 2003>: Out-bound headers:
              >> <Fri Sep 05 11:39:21 EDT 2003>: Date: Fri, 05 Sep 2003 15:38:49 GMT
              >> <Fri Sep 05 11:39:21 EDT 2003>: Server: Apache/1.3.9 (Unix)
              >> <Fri Sep 05 11:39:21 EDT 2003>: Keep-Alive: timeout=360, max=100
              >> <Fri Sep 05 11:39:21 EDT 2003>: Connection: Keep-Alive
              >> <Fri Sep 05 11:39:21 EDT 2003>: Transfer-Encoding: chunked
              >> <Fri Sep 05 11:39:21 EDT 2003>: Content-Type: text/html
              >> <Fri Sep 05 11:39:21 EDT 2003>: Requeue connection: ProxyConnection(isSecureProxy=false):
              >> shark.db.com:6909, keep-alive='30'secs
              >> <Fri Sep 05 11:40:06 EDT 2003>: Trigger remove idle for '44' secs:
              >ProxyConnection(isSecureProxy=false):
              >> shark.db.com:6909, keep-alive='30'secs
              >>
              >> Thanks for your help...
              >>
              >> Manish
              >>
              >>
              >
              

  • WebLogic proxy plugin: getPooledConn: No more connections in the pool

    Hi,
    We have weblogic proxy plugin installed in Sun One web server. but frequently we are getting following errors in proxy log:
    <1670612410085901> attempt #0 out of a max of 5
    <1670612410085901> Trying a pooled connection for '<IP>/<port>/<port>'
    <1670612410085901> getPooledConn: No more connections in the pool for Host [<IP>] Port[<port>] SecurePort[<port>]
    Can anybody please tell how this proxy plugin manages connection pools? I don't find any minimum / maximum number of conection to mention anywhere or how exactly it works?

    Try increasing the "AcceptBackLog" settings on the weblogic server and then verify for any changed behavior.
    Raise the Accept Backlog value from the default by 25 percent. Continue increasing the value by 25 percent until the messages cease to appear.
    Link :[http://e-docs.bea.com/wls/docs81/perform/WLSTuning.html#1136287]

  • IP address lost in Weblogic proxy plugin

              Hi,
              We have 4 web servers that forward requests for jsps to 10 weblogic instances
              working in a cluster. The web servers have IPlanet with weblogic proxy plugin.
              One of the jsps has logic to retrieve the client's IP address and then return
              the name of the country to which the IP address belongs. But since the jsp always
              receives requests from one of the 4 web servers on the same LAN, it gets only
              the internal IP address of the web server and returns no country code. To retrieve
              the IP address of the caller in the jsp, I'm using
              ipAddress = request.getRemoteAddr();
              How can I make my jsp know the actual source IP address of the client (i.e the
              end user)?
              Any help would be appreciated.
              Dipak Jha
              

    Try increasing the "AcceptBackLog" settings on the weblogic server and then verify for any changed behavior.
    Raise the Accept Backlog value from the default by 25 percent. Continue increasing the value by 25 percent until the messages cease to appear.
    Link :[http://e-docs.bea.com/wls/docs81/perform/WLSTuning.html#1136287]

  • Hardware Load Balancers and Cluster WebLogic Proxy Plug-in setting

    Documentation states that we need to enable the Cluster WebLogic Proxy Plug-in setting when there is a proxy plugin or HttpClusterServlet configured.
    We used to have Weblogic Proxy plugin and the setting is still there, also the proxy was replaced by the hardware loadbalancer. Everything works normally and no one complained, but I would assume that WebLogic Proxy Plug-in setting should not be applicable any longer.
    Is it possibly harmful to have that setting there? Does it mean that the loadbalancer emulates WebLogic Proxy Plug-in and also need this set?
    Thank you

    The Weblogic Proxy Plug-in Enabled flag only affects the behavior of a WL proxy module (such as if you were using Apache to proxy to WL via the mod_wl.so module). The value controls what IP address is returned when you call request.getRemoteAddr() from your application. If not enabled, you will get the IP address of the web server that proxied the request. If enabled, you will get the remote client IP address (instead of the proxy IP address) facilitated by the WL-Proxy-Client-IP header. If you are no longer using a plug-in module, the setting will have no affect. Hope this helps...

  • Weblogic proxy plugin closes keep-alive connections to clients randomly

    In short we have following arhitecture:
    clients ---> wl proxy plugin 1 ----> weblogic 1
    clients ---> wl proxy plugin 2 ----> weblogic 2
    Beacuse of the application/installation specific requirements, we are not using failover, one wl proxy always forwards requests to one weblogic (simple configuration).
    Application is TR-069 protocol based (SOAP over HTTP) so it very much relays on persistence TCP connections (Connection: keep-alive). This TCP persistence has to work correctly in order that TR-069 messages are exchanged in required order, otherwise we have a error on application layer.
    Here and there we've noticed applications errors which suggest that we have some problems in TCP connection between the client and the weblogic server. After sniffing, we've noticed that weblogic proxy plugin (Apache) randomly, or because of some other reason we do not know, decides to close TCP connection to client, even app on weblogic did not request so ???
    As a result, client opens new connection to the server with new TR-069 session and it gets bounced beacuse it allready has one open on weblogic server.
    We've sniffed, traced everything we could, we were searching for patterns in time, etc... but we can not find the reason why proxy plugin decides to close the connection to the client (not to the weblogic server).
    Trace (replaced sensitive information):
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: StatusLine set to [200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> parsed all headers OK
    Thu Apr 29 15:05:50 2010 <958012725463463784> sendResponse() : r->status = '200'
    Thu Apr 29 15:05:50 2010 <958012725463463784> canRecycle: conn=1 status=200 isKA=1 clen=545 isCTE=0
    Thu Apr 29 15:05:50 2010 <958012725463463784> closeConn: pooling for '$IP$/$PORT$'
    Thu Apr 29 15:05:50 2010 <958012725463463784> request [$URL$] processed successfully..................
    !!!! Now it closes the TCP connection and inserts "Connection: close" HTTP header !!!
    WL proxy plugin conf params are:
    WebLogicCluster $IP$:$PORT$
    DynamicServerList OFF
    KeepAliveTimeout 90
    MaxKeepAliveRequests 0
    KeepAliveSecs 55
    Apache worker configuration is:
    <IfModule mpm_worker_module>
    PidFile var/run/httpd-worker.pid
    LockFile var/run/accept-worker.lock
    StartServers 2
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadLimit 200
    ThreadsPerChild 200
    MaxClients 2000
    MaxRequestsPerChild 0
    AcceptMutex pthread
    </IfModule>
    Why weblogic proxy plugin ignores Keep-alive directive and decides to close connection to the client by itself?
    Any help?

    If a WebLogic Server instance listed in either the WebLogicCluster parameter or a dynamic cluster list returned from WebLogic Server fails, the failed server is marked as "bad" and the plug-in attempts to connect to the next server in the list.
    MaxSkipTime sets the amount of time after which the plug-in will retry the server marked as "bad." The plug-in attempts to connect to a new server in the list each time a unique request is received (that is, a request without a cookie).
    Note: The MaxSkips parameter has been deprecated as the MaxSkipTime parameter.
    See also here: http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs81/plugins/plugin_params.html
    You said the problem arises under significant load. Maybe, it is wise to tune the number file descriptor's on your operating system. HTTP connections are nothing more than TCP sockets on the operating system. All modern operating systems treat sockets as a specialized form of file access and use data structures called file descriptors to track open sockets and files for an operating system process. To control resource usage for processes on the machine, the operating system restricts the number of open file descriptors per process. You should be aware that all TCP connections that have been gracefully closed by an application will go into what is known as the TIME_WAIT state before being discarded by the operating system.
    On most unix systems you can use netstat -a | grep TIME_WAIT | wc -l to detemine the number of socket in time_wait state. You have to check with your system adminstrator how to tune the tcp_time_wait_interval. On solaris you can use: /usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000

  • Error messages appearing in netscape weblogic proxy server

    I am getting the following messages in a netscape server/weblogic proxy
              setup. Any one know why?
              Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
              Session ok, from home page
              invalid sesion, resetting login
              

    After many hard working days.i finally found the error cause,i needed to make weblogic datasource also ADF doesnt work on internet explorer browser,it works on safary.hope it helps somebody

  • Getting TooManyHopsException with a simplest Proxy Servlet

    I am deploying a simple (dumb!!) stateless proxy to route INVITE message between 2 UAs. I am using WLSS 3.0 on WinXP.
    INVITE Message actually reaches the Servlet, because I have placed some console debug messages which I am able to see on WLS console. But I am getting multiple INVITEs (which I am not sure why)
    Within doInvite, I am simply invoking request.getProxy().proxyTo(request.getRequestURI) but getting followig error
    <Error> <ServletContext-/SIPProxy> <000000> <[WLSS
    .Engine:330052]Failed to dispatch Sip message to servlet SIPRouteProxyServlet
    javax.servlet.sip.TooManyHopsException
    I have double-checked sip.xml for mapping and everything's properly mapped...
    Wondering what could be the issue :(
    Have anyone experienced such scenario with such a simplest possible proxy servlet?
    Not sure if default Proxy Behavior of WLSS could cause this issue, but logs show that the servlet does get invoked (because I have debug messages strewn in my servlet and I am able to see them on console as well as logs)
    rgds
    muthu

    I have collected the ethereal logs as .pcap file. Not sure how to attach it though .. :(
    Are there any tools for pcap to text conversion?
    But in essence, the flow is
    UA1 --> Proxy - INVITE
    UA1 <-- Proxy - 100 Ringing
    UA1 <-- Proxy - 483 Too Many Hops
    UA1 --> Proxy - Ack
    Headers do not seem to have anything abnormal.
    UA2 is being run on the same system where Proxy is running (just for testing).
    Following is the code snippet used for doInvite()
    if (req.isInitial())
    req.createResponse(SipServletResponse.SC_TRYING).send();
    Proxy pxy = req.getProxy();
    pxy.setSupervised(true);     
    pxy.setRecordRoute(true);
    pxy.setStateful(true);
    pxy.proxyTo(req.getRequestURI());
    return;
    else{
    super.doInvite(req);
    return;
    I have tried various options of Proxy object "settings". But the situation was the same.
    I am using X-Ten Sip Phones as UAs and have configured the devices properly (tested with another ready-made proxy tool and phones happily establish call from within LAN
    rgds
    muthu

  • Error in proxy servlet implementation

    Hi all,
    I have implemented a simple proxy servlet. My requirement is whenever a call is made to the servlet , the servlet must make a http call to the particular site, make a request for the content and then display the same in the browser.
    At present i am able to fetch the html content, but i am facing problem in retrieving the sources such as .js,.css files and also the alignment of the site is totally wrong.
    The code that i use in the servlet is as follows:
    HttpResponse resp = makeCall(request, "www.google.co.in");
    InputStream inReader = resp.getEntity().getContent();
    InputStreamReader stmReader = new InputStreamReader(inReader);
    BufferedReader reader = new BufferedReader(stmReader);
    StringBuilder szResultBuilder = new StringBuilder(1000);
    if (reader != null) {
    String line = reader.readLine();
    while (line != null) {
    szResultBuilder.append(line);
    line = reader.readLine();
    ServletOutputStream out = response.getOutputStream();
    out.write(szResultBuilder.toString().getBytes());
    out.flush();
    out.close();
    public static HttpResponse makeCall(HttpServletRequest request, String szURL) throws Exception {
    HttpResponse response = null;
    if(request.getMethod().equals("POST"))     {
    HttpPost post = new HttpPost(szURL);
    response = httpClient.execute(post);
    } else if(request.getMethod().equals("GET")){
    HttpGet get = new HttpGet(szURL);
    response = httpClient.execute(get);
    return response;
    Kindly help me in retrieving the entire content of the site and in displaying it. How can i retrieve the entire content for all the sites the user requests.
    Regards,
    A.Rajesh

    rajesh.a wrote:
    Hi all,
    I have implemented a simple proxy servlet. My requirement is whenever a call is made to the servlet , the servlet must make a http call to the particular site, make a request for the content and then display the same in the browser.
    At present i am able to fetch the html content, but i am facing problem in retrieving the sources such as .js,.css files and also the alignment of the site is totally wrong. You will have to understand how html works. On first request, the entire html as text is sent to the browser. When the browser begins interpreting the html and comes across a js or css tag, it makes a new request to the browser for these resources (unless it is already cached on the browser).
    The request for this js resource would point back to the server which served the html unless of course the resource url is absolute.
    Knowing that, you see the problem now? Your js (and css and images) would all point back to the server that runs your proxy servlet. However the resources reside on the remote server from where you plucked the html. You have 3 options IMO
    1. Rewrite the original urls in the proxy servlet to point to the proxy servlet which would then proxy these resources back from the remote server back to the browser.
    2. Have absolute urls for all resource urls and expose the remote server to the web.
    3. Take a look at Clipper technology (google for Web Clipper).
    Best,
    ram.

  • Http proxy servlet

    Hi,
    i want to use an open source of http proxy servlet or write one that i can pass all the http request throw this servlet and to get the http response throw it.
    if somebody have alink for an open source or write on that can give me direction?

    Throw?
    Anyway I think you're looking for java.net.URLConnection.

  • Proxy servlet with reports

    Has any one used a proxy servlet with reports to hide all the URL parms???
    We are about to try this, so just wanted to see if any one has an comments or suggestions.

    Just in case you do not know the following
    You can also use cgicmd.dat file for mapping key-value pairs and then use the key in url
    The file is in $OH\reports\conf\cgicmd.dat
    you can define key like
    mykey1: report=test.rdf .....<other comd line args>
    and
    use key in url
    http://machine/servlet/rwservlet?mykey1
    More examples in that file itself
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

Maybe you are looking for

  • Crash on shutdown ML

    Hi I have just finished reinstalling my system after a hard drive failure.   It's just the way I want now but all of a sudden it is crashing on shutdown.  I've attached the log below.   Can anyone help me interpret it? Cheers Interval Since Last Pani

  • Connecting a desktop computer to the Internet via the Mobile Hotspot?

    Hello, I've looked at the other postings about this but I'm still not having any luck....and I'm not really sure who to call for tech support. I can connect my laptop to the Hotspot just fine. The desktop computer is another story. I bought a Mediali

  • Can I deauthorize a computer I know longer have from someone elses computer?  They have an itunes account on their computer.

    I no longer have a computer, but do have an iphone.  I need to deauthorize the computer I no long have. Can I deauthorize the computer from my iphone? Can I deauthorize the computer I know longer have from a friends computer who has an itunes account

  • Open KM Search iView Results in New Window...??

    Hi Guys, I'm having an issue whereby I want the Search Results of a KM Search iView to open in a new window. At the moment its being displayed in the existing portal content area. Under the iView Properties for KM Search I have the "Launch in New Win

  • DeskJet 6940 mysteriously starts a new sheet

    I have a - DJ6940 My OS is XP pro My word processor is MS word 2002 SP3 Occasionally, the first few lines of a page will print on one sheet of paper and then the printer prints the rest of the page on  a new sheet.  It actually ends the first page in