I am using Hawt.io to monitor my Apache Camel java app, but I have found that if I let it run I cannot use jvisualvm (and similar tools) to profile my app. It seems Hawt.io is using the connector that Camel exposes so jvisualvm cannot connect to the jvm.
What can I do to have Hawt.io and still be able to use jvisualvm?
Thank you!
Can JConsole connect to your JVM too?
Hawtio just connects to Jolokia on the server side; which just exposes JMX over HTTP/JSON; so the hawtio console doesn't itself change JMX in any way.
Incidentally are you using Local connector to connect from the hawtio web app into a separate JVM? Only that approach does add a jolokia agent dynamically to the JVM you are trying to connect to. If thats whats causing the issue - don't use it - and just configure your own Jolokia agent in your JVM?
Related
My goal is to confirm that one can use a Hawtio instance to monitor an instance running on a different machine.
I am using this example https://github.com/hawtio/hawtio-camel-wiki .
right now i have it running on my local machine in OSX and on a remote Ubuntu 18 machine. I try to connect them however i cant seem to monitor the instance on the other machine.
I then tried to just use the hawtIO jar to connect to that example running on the remote machine.
I first set my hawtio.proxyWhitelist or hawtio.proxyAllowList (i also tried using the hawtio JAR on my local machine) to whitelist the endpoints. (2.10 uses the former)
java -Dhawtio.proxyAllowlist=* -jar hawtio-app.jar
My issue is i am not sure what to put in the connection tabs. I have been trying port 61613 and the path as /api/jolokia but i cant seem to figure out where its running to connect to it.
hawtio-camel-wiki is an outdated project which was archived quite a while ago and is not relevant any longer. As to what info you need to put in the Connection tab, it depends on what remote JVMs you'd like to connect to. Generally speaking, they should provide a Jolokia endpoint with a specific port (e.g. 8080) and path (e.g. /jolokia) which you should input to the connection info.
For how to incorporate a Jolokia endpoint into your application, you can check https://jolokia.org/reference/html/agents.html. If you already have something to run, the JVM agent should be the easiest option.
You can also check some Spring Boot examples here:
https://github.com/hawtio/hawtio/tree/hawtio-2.10.1/examples
I would like to connect to the actual physical database from JUnit, while it runs from Jenkins during maven build/test. I am using JBoss for writing JUnit. I don't want to store the DB connection string within the JUnit code/git/svn. I will rather externalize it either via a datasource and connect using JNDI in runtime or any other mechanism. Is there a way, I can use the datasource setup in Jenkins to connect to DB or Is there a better approach to achieve this? Basically, I want to hide the connection id/pwd for the developers as well, so they don't know/see.
You can use environment variables or system properties to provide configuration from Jenkins to a JUnit test. Read them in your test and use it to establish a connection to the DB.
But those will be readable ad the developers have access to the Jenkins job configuration.
I've a hawtio 1.4.45 running in Jetty Server A where my camel application is also deployed. There is another camel application and jolokia web agent running on Jetty Server B. I'm able to get basic camel MBean details from both Server A and Server B. However I get to see the logs of only Server A and NOT Server B's. Is there any JMX settings to bring up the logs of Server B to hawtio Dashboard?
I have configured Activiti on Servicemix 5.1.1 and got it working with Camel. I need to configure Activiti to use SQL Server instead of the default inbuilt H2 which comes with servicemix for Activiti during feature installation. I am not finding any config files related to activiti to change the DB credentials either.
Any help on how to configure the Activiti DB with Servicemix is highly appreciated.
There's no easy way to configuring another database at the moment. The solution would be to create a Blueprint XML file like the one we're using internally (cfr. https://github.com/apache/servicemix/blob/master/activiti/activiti-config/src/main/resources/OSGI-INF/blueprint/activiti-config.xml - you may have to remove the custom resolver bits), modify it to point to your SQL server and drop it in ServiceMix' deploy directory.
FWIW, I created https://issues.apache.org/jira/browse/SM-2379 to provide a more convenient way to define a new database.
I have a an admin and a managed server. A JMS server is targeting the admin server. The JMS Module which contains the Queue and the Connection Factory is targetting both the admin and the managed server.
When my application is deployed on the admin server everything works. But when is deployed on the managed server i get the following excpetion
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'CONNECTION_F'. Resolved ''; remaining name 'CONNECTION_F'
I can see from the JNDI tree of the managed that CONNECTION_F is not present...
Am I missing something? Something wrong configured on the domain?
I am using Weblogic 11g.
Please configure your JMS server on the managed server too.