apache-camelhawtiojolokia

Hawtio camel debug panel says "Debugging is not allowed for this user"


My environment is:

servicemix 5.4.1 [system.properties has property "hawtio.authenticationEnabled=false"]
jolokia agent 1.6.2
standalone hawtio 2.10
apache camel 2.14.3

First I start servicemix

Then I use "java -jar jolokia-jvm-1.6.2-agent.jar list" to find karaf process ID
and "java -jar jolokia-jvm-1.6.2-agent.jar --port 7777 start 21284" to attach jolokia to karaf JVM

Then "java -jar hawtio-app-2.10.0.jar" to start standlone hawtio app

When I go to Debug panel of my camel route, there is a message "Debugging is not allowed for this user"

I'm using Blueprint DSL

My Camel endpoint is

<camelcxf:cxfEndpoint
        id="cxfOrderEndpointService"
        wsdlURL="wsdl/order.wsdl"
        xmlns:s="http://order.camelinaction"
        address="/orderservice"
        serviceClass="camelinaction.order.OrderInterface"
        endpointName="s:orderServicePort"
        serviceName="s:orderService"/>

my CamelContext is

<camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint" trace="true">
    <route>
        <from uri="cxf:bean:cxfOrderEndpointService"/>
        <log message="hello from OrderEndpointService"/>
        <to uri="bean:helloBean?method=Hello"/>
        <to uri="bean:helloBean?method=Bye"/>
        <process ref="helloProcessor"/>
    </route>
</camelContext>

Please help me, to solve this, I really couldn't find any info that could have helped me.


Solution

  • Found solution myself, which is :

    Use Hawtio as standalone agent with Jolokia OSGI agent

    1. Download Jolokia OSGI agent from - https://jolokia.org/download.html ( get latest Osgi-Agent (full bundle))
    2. Download Hawtio from - https://github.com/hawtio/hawtio/releases ( get latest)
    3. Run servicemix or karaf
    4. Install Jolokia OSGI agent to karaf/servicemix processm
    5. Create configuration file in %KARAF_HOME%/etc/org.jolokia.osgi.cfg
    6. Fill config with folowing data

      org.jolokia.user=karaf
      org.jolokia.password=karaf
      org.jolokia.agentContext=/jolokia
      org.jolokia.debug=true org.jolokia.realm=karaf
      org.jolokia.authMode=jaas

    7. Install Jolokia OSGI bundle, in karaf console run : osgi:install file:c:\Users\avazhenin\Downloads\jolokia-osgi-bundle-1.6.2.jar

    8. osgi:stop %jolokia-osgi-gent%
    9. osgi:start %jolokia-osgi-gent%
    10. access Jolokia under http://localhost:8181/jolokia
    11. Run Hawtio web - java -jar hawtio-app-2.10.0.jar
    12. open http://localhost:8080/hawtio/jvm/discover (Jolokia agent must be found)
    13. goto http://localhost:8080/hawtio/jvm/connect (there already must be found agent, press connect)
    14. Hawtio menu will be extended , you'll see Camel and etc... options (if camel features installed)

    The problem was, that Jolokia standalone agent cannot work properly outside karaf osgi container (at least I couldn't find a fix for that), because it needs configuration mentioned above, which you cannot give at agent runtime (for example it's not possible to set Jolokia realm=karaf with java -jar ....)