7 Replies Latest reply on May 25, 2012 11:01 AM by watermelonjam_arnoldd

    configuring jetty maxIdleTime and adding connector

    jjakub

      I have problem with long running requests - they timeout.

      They are serviced by default connector,

      how can I change it's timeout?

       

      I tried adding connector to etc/jetty.xml

       

                

       

       

      It was added to the default connector, but later my requests are serviced by the default connector with timeout 200.000 instead of by my connector.

       

      How can I prevent default connector from being created or configure it's timeout?

      (it seems to me that changing it's timeout is impossible, I also can't prevent it from being created and added)

       

       

      Thanks.

       

      Edited by: camel on Feb 6, 2012 5:14 PM

       

      Edited by: camel on Feb 6, 2012 5:15 PM

       

      Edited by: camel on Feb 6, 2012 5:16 PM

        • 1. Re: configuring jetty maxIdleTime and adding connector
          ffang

          Hi,

           

          Please tell us exact FUSE ESB version you're using, that would be very helpful.

           

          And you actually can specify port number for the connector, something like

           

           

          This can set maxIdleTime for jetty listening port 8181.

           

          This jetty.xml configuration is applicable for http-osgi service and cxf http-osgi transport which is based on http-osgi service.

           

          Freeman

          • 2. Re: configuring jetty maxIdleTime and adding connector
            jjakub

            I use apache-servicemix-4.4.1-fuse-01-13

             

            karaf@root> list | grep http

            Apache ServiceMix :: Bundles :: commons-httpclient (3.1.0.5)

            karaf@root> list | grep cxf

            camel-cxf (2.8.0.fuse-01-13)

            camel-cxf-transport (2.8.0.fuse-01-13)

            karaf@root> list | grep osgi

            spring-osgi-core (1.2.1)

            spring-osgi-io (1.2.1)

            spring-osgi-annotation (1.2.1)

            spring-osgi-extender (1.2.1)

            karaf@root>

            • 3. Re: configuring jetty maxIdleTime and adding connector
              ffang

              Hi,

               

              What kind of transport you're using? Is it http-osgi transport?

              Could you elaborate your project?

               

              Freeman

              • 4. Re: configuring jetty maxIdleTime and adding connector
                jjakub

                probably it is http transport, fragments of configuration are here: http://fusesource.com/forums/thread.jspa?threadID=3685&tstart=0

                 

                Thanks.

                • 5. Re: configuring jetty maxIdleTime and adding connector
                  watermelonjam_arnoldd

                  Hi Freeman.

                   

                  I'm encountering the same problem with a <jaxws:endpoint> using a similar version of FUSE ESB (4.4.1-fuse-03-06) with the http-osgi transport (address attr is "/Service", not a full URL).  I've tried configuring the maxIdleTimeout in etc/jetty.xml and specifying the proper port (8181), but on startup, the message is:

                   

                  org.ops4j.pax.web.pax-web-jetty - 1.0.3 | Connection on port 8181 cannot be open. Reason: Address already in use

                   

                  I suspect this config is conflicting with pax-web-jetty startup.  I did some digging, and found  this outdated documentation on how to use a fragment bundle to configure pax-web-jetty.  Is this the correct approach for http-osgi transport on FUSE ESB 4.4.1 and, if so, is there any place I can find the defaults that are already in use for that bundle (e.g. port 8181)?  I've looked in the pax-web-jetty bundle, but there's no config properties file in there.

                   

                  Thanks.

                  • 6. Re: configuring jetty maxIdleTime and adding connector
                    ffang

                    Hi,

                     

                    It should be maxIdleTime but not maxIdleTimeOut.

                     

                    So what you should have is

                                

                     

                    Also the message

                    Connection on port 8181 cannot be open. Reason: Address already in use

                    is harmless, your maxIdleTime configuration for default SelectChannelConnector already get picked up on port 8181.

                     

                    And the fragment bundle thing  you found is for old pax-web before 0.7.x IIRC, it's not applicable now.

                     

                    Freeman

                    • 7. Re: configuring jetty maxIdleTime and adding connector
                      watermelonjam_arnoldd

                      Thanks Freeman, that works well.

                       

                      Regards,

                       

                      D.