You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by nino martinez wael <ni...@gmail.com> on 2017/08/29 08:06:01 UTC

Karaf & Jetty?

Hi

We are having problems with a stalling web bundle. And it looks like either
there are too many clients or the clients are behaving badly.

Normally when the problem happens I would go grab some information from the
webcontainer, I am unsure howto do so with the bundled jetty.. The only
page that shows some information in karaf are the http page, which only
shows information about what bundles are registered..

Am I just missing a bundle to install that will give me more information
about current http connections etc?

-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
solution where this:


<Get name="handler">
    <Call name="addHandler">
      <Arg>
    <New class="org.eclipse.jetty.server.handler.StatisticsHandler">
        </New>
      </Arg>
    </Call>
</Get>

Thanks to Achim Nierbeck

On Tue, Aug 29, 2017 at 2:48 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> I tried adding this, to jetty.xml
>
> <Get id="oldhandler" name="handler" />
> <Set name="handler">
>   <New id="StatsHandler" class="org.eclipse.jetty.server.handler.
> StatisticsHandler">
>     <Set name="handler"><Ref refid="oldhandler" /></Set>
>   </New>
> </Set>
>
> but that just breaks everything, webconsole or my applications does not
> startup.. I do get the nice view of stats in jmx..
>
> On Tue, Aug 29, 2017 at 1:17 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Okay I can now see I need to get both the pax web configured http and
>> https handler and add the statistics handler to them..
>>
>> On Tue, Aug 29, 2017 at 1:06 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> Hmm it does not seem to be a trivial task to add the statistics hander
>>> to either 8181 or https.. Since they seem to be configured from somewhere
>>> else..
>>>
>>> I will continue to digg.. But it's a little annoying that it's so hard
>>> getting connection statistics :(
>>>
>>>
>>> regards Nino
>>>
>>> On Tue, Aug 29, 2017 at 12:02 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>>> I cant really find something usefull.. Can it be that I need to add
>>>> this:
>>>>
>>>> http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/s
>>>> tatistics-handler.html ?
>>>>
>>>> and im guessing that requires a restart of jetty after I have
>>>> configured the jetty.xml?
>>>>
>>>> On Tue, Aug 29, 2017 at 11:00 AM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>>> Im trying :)
>>>>>
>>>>> Are there any changes needed to be done to be able to connect to a
>>>>> vanilla karaf, I've tried
>>>>>
>>>>> service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
>>>>>
>>>>>
>>>>> But, visual vm says :
>>>>>
>>>>> cannot connect to service
>>>>>
>>>>>
>>>>> Ahh figured it out.. Had to specify user and password.. Am connected
>>>>> now..
>>>>>
>>>>> Next step are to see if there are any usefull information.
>>>>>
>>>>> On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <
>>>>> jb@nanthrax.net> wrote:
>>>>>
>>>>>> Hi Nino,
>>>>>>
>>>>>> did you check using JMX (with jconsole for example) ?
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> We are having problems with a stalling web bundle. And it looks like
>>>>>>> either there are too many clients or the clients are behaving badly.
>>>>>>>
>>>>>>> Normally when the problem happens I would go grab some information
>>>>>>> from the webcontainer, I am unsure howto do so with the bundled jetty.. The
>>>>>>> only page that shows some information in karaf are the http page, which
>>>>>>> only shows information about what bundles are registered..
>>>>>>>
>>>>>>> Am I just missing a bundle to install that will give me more
>>>>>>> information about current http connections etc?
>>>>>>>
>>>>>>> --
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
I tried adding this, to jetty.xml

<Get id="oldhandler" name="handler" />
<Set name="handler">
  <New id="StatsHandler"
class="org.eclipse.jetty.server.handler.StatisticsHandler">
    <Set name="handler"><Ref refid="oldhandler" /></Set>
  </New>
</Set>

but that just breaks everything, webconsole or my applications does not
startup.. I do get the nice view of stats in jmx..

On Tue, Aug 29, 2017 at 1:17 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Okay I can now see I need to get both the pax web configured http and
> https handler and add the statistics handler to them..
>
> On Tue, Aug 29, 2017 at 1:06 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Hmm it does not seem to be a trivial task to add the statistics hander to
>> either 8181 or https.. Since they seem to be configured from somewhere
>> else..
>>
>> I will continue to digg.. But it's a little annoying that it's so hard
>> getting connection statistics :(
>>
>>
>> regards Nino
>>
>> On Tue, Aug 29, 2017 at 12:02 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> I cant really find something usefull.. Can it be that I need to add this:
>>>
>>> http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/s
>>> tatistics-handler.html ?
>>>
>>> and im guessing that requires a restart of jetty after I have configured
>>> the jetty.xml?
>>>
>>> On Tue, Aug 29, 2017 at 11:00 AM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>>> Im trying :)
>>>>
>>>> Are there any changes needed to be done to be able to connect to a
>>>> vanilla karaf, I've tried
>>>>
>>>> service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
>>>>
>>>>
>>>> But, visual vm says :
>>>>
>>>> cannot connect to service
>>>>
>>>>
>>>> Ahh figured it out.. Had to specify user and password.. Am connected
>>>> now..
>>>>
>>>> Next step are to see if there are any usefull information.
>>>>
>>>> On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>> > wrote:
>>>>
>>>>> Hi Nino,
>>>>>
>>>>> did you check using JMX (with jconsole for example) ?
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> We are having problems with a stalling web bundle. And it looks like
>>>>>> either there are too many clients or the clients are behaving badly.
>>>>>>
>>>>>> Normally when the problem happens I would go grab some information
>>>>>> from the webcontainer, I am unsure howto do so with the bundled jetty.. The
>>>>>> only page that shows some information in karaf are the http page, which
>>>>>> only shows information about what bundles are registered..
>>>>>>
>>>>>> Am I just missing a bundle to install that will give me more
>>>>>> information about current http connections etc?
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
Okay I can now see I need to get both the pax web configured http and https
handler and add the statistics handler to them..

On Tue, Aug 29, 2017 at 1:06 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Hmm it does not seem to be a trivial task to add the statistics hander to
> either 8181 or https.. Since they seem to be configured from somewhere
> else..
>
> I will continue to digg.. But it's a little annoying that it's so hard
> getting connection statistics :(
>
>
> regards Nino
>
> On Tue, Aug 29, 2017 at 12:02 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> I cant really find something usefull.. Can it be that I need to add this:
>>
>> http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/s
>> tatistics-handler.html ?
>>
>> and im guessing that requires a restart of jetty after I have configured
>> the jetty.xml?
>>
>> On Tue, Aug 29, 2017 at 11:00 AM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> Im trying :)
>>>
>>> Are there any changes needed to be done to be able to connect to a
>>> vanilla karaf, I've tried
>>>
>>> service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
>>>
>>>
>>> But, visual vm says :
>>>
>>> cannot connect to service
>>>
>>>
>>> Ahh figured it out.. Had to specify user and password.. Am connected
>>> now..
>>>
>>> Next step are to see if there are any usefull information.
>>>
>>> On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> wrote:
>>>
>>>> Hi Nino,
>>>>
>>>> did you check using JMX (with jconsole for example) ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> We are having problems with a stalling web bundle. And it looks like
>>>>> either there are too many clients or the clients are behaving badly.
>>>>>
>>>>> Normally when the problem happens I would go grab some information
>>>>> from the webcontainer, I am unsure howto do so with the bundled jetty.. The
>>>>> only page that shows some information in karaf are the http page, which
>>>>> only shows information about what bundles are registered..
>>>>>
>>>>> Am I just missing a bundle to install that will give me more
>>>>> information about current http connections etc?
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
Hmm it does not seem to be a trivial task to add the statistics hander to
either 8181 or https.. Since they seem to be configured from somewhere
else..

I will continue to digg.. But it's a little annoying that it's so hard
getting connection statistics :(


regards Nino

On Tue, Aug 29, 2017 at 12:02 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> I cant really find something usefull.. Can it be that I need to add this:
>
> http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/
> statistics-handler.html ?
>
> and im guessing that requires a restart of jetty after I have configured
> the jetty.xml?
>
> On Tue, Aug 29, 2017 at 11:00 AM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Im trying :)
>>
>> Are there any changes needed to be done to be able to connect to a
>> vanilla karaf, I've tried
>>
>> service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
>>
>>
>> But, visual vm says :
>>
>> cannot connect to service
>>
>>
>> Ahh figured it out.. Had to specify user and password.. Am connected now..
>>
>> Next step are to see if there are any usefull information.
>>
>> On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>> Hi Nino,
>>>
>>> did you check using JMX (with jconsole for example) ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>>>
>>>> Hi
>>>>
>>>> We are having problems with a stalling web bundle. And it looks like
>>>> either there are too many clients or the clients are behaving badly.
>>>>
>>>> Normally when the problem happens I would go grab some information from
>>>> the webcontainer, I am unsure howto do so with the bundled jetty.. The only
>>>> page that shows some information in karaf are the http page, which only
>>>> shows information about what bundles are registered..
>>>>
>>>> Am I just missing a bundle to install that will give me more
>>>> information about current http connections etc?
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
I cant really find something usefull.. Can it be that I need to add this:

http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/statistics-handler.html
?

and im guessing that requires a restart of jetty after I have configured
the jetty.xml?

On Tue, Aug 29, 2017 at 11:00 AM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Im trying :)
>
> Are there any changes needed to be done to be able to connect to a vanilla
> karaf, I've tried
>
> service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
>
>
> But, visual vm says :
>
> cannot connect to service
>
>
> Ahh figured it out.. Had to specify user and password.. Am connected now..
>
> Next step are to see if there are any usefull information.
>
> On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi Nino,
>>
>> did you check using JMX (with jconsole for example) ?
>>
>> Regards
>> JB
>>
>>
>> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>>
>>> Hi
>>>
>>> We are having problems with a stalling web bundle. And it looks like
>>> either there are too many clients or the clients are behaving badly.
>>>
>>> Normally when the problem happens I would go grab some information from
>>> the webcontainer, I am unsure howto do so with the bundled jetty.. The only
>>> page that shows some information in karaf are the http page, which only
>>> shows information about what bundles are registered..
>>>
>>> Am I just missing a bundle to install that will give me more information
>>> about current http connections etc?
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by nino martinez wael <ni...@gmail.com>.
Im trying :)

Are there any changes needed to be done to be able to connect to a vanilla
karaf, I've tried

service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root


But, visual vm says :

cannot connect to service


Ahh figured it out.. Had to specify user and password.. Am connected now..

Next step are to see if there are any usefull information.

On Tue, Aug 29, 2017 at 10:25 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Nino,
>
> did you check using JMX (with jconsole for example) ?
>
> Regards
> JB
>
>
> On 08/29/2017 10:06 AM, nino martinez wael wrote:
>
>> Hi
>>
>> We are having problems with a stalling web bundle. And it looks like
>> either there are too many clients or the clients are behaving badly.
>>
>> Normally when the problem happens I would go grab some information from
>> the webcontainer, I am unsure howto do so with the bundled jetty.. The only
>> page that shows some information in karaf are the http page, which only
>> shows information about what bundles are registered..
>>
>> Am I just missing a bundle to install that will give me more information
>> about current http connections etc?
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: Karaf & Jetty?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Nino,

did you check using JMX (with jconsole for example) ?

Regards
JB

On 08/29/2017 10:06 AM, nino martinez wael wrote:
> Hi
> 
> We are having problems with a stalling web bundle. And it looks like either 
> there are too many clients or the clients are behaving badly.
> 
> Normally when the problem happens I would go grab some information from the 
> webcontainer, I am unsure howto do so with the bundled jetty.. The only page 
> that shows some information in karaf are the http page, which only shows 
> information about what bundles are registered..
> 
> Am I just missing a bundle to install that will give me more information about 
> current http connections etc?
> 
> -- 
> Best regards / Med venlig hilsen
> Nino Martinez

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com