Jconsole unable to connect to local process - visualvm

Jconsole is unable to connect to a local process. I tried the same in VisualVM and I am getting the following message:
'Data not available because JMX connection to the JMX agent could not be established.'
Yesterday, Jconsole didn't connected initially but later on it was connecting.
Is this a know problem and is there any solution to this problem?

Related

JMX Connection to Mule 4 Project running Locally

How do you connect a JMX agent to a Mule 4 project running locally? When I launch JConsole I see two mule-related processes called org.mule.runtime.module.reboot.MuleContainerBootstrap but I cannot connect to either.
I've tried running my project with the following flags and connecting remotely:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.host=localhost
But no luck.
I had no problems connecting to (localhost:1096) using just these properties:
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
JConsole gave me a warning about the insecure connection (no SSL). I accepted to connect insecurely and that was enough.
However when adding -Dcom.sun.management.jmxremote.host=localhost is keeps failing to connect. This looks like a Java issue.
If you only want to ensure local connections you can replace it with -Dcom.sun.management.jmxremote.local.only=true which should give you the expected result.
Having said that, this is all a pure Java JMX topic. Mule 4 doesn't expose any MBeans over JMX like Mule 3 did so there is no specific reason to connect with JMX.
I'm not sure why you are using jconsole given that VisualVM is a much modern and powerful alternative, unless you are just testing the local JMX connectivity ;-)

ActiveMQ Browser V2.5.2.8 can't connect to ActiveMQ V5.12.1

I tried to connect to ActiveMQ V5.12.1 with ActiveMQ Browser V2.5.2.8, they are installed on the same computer. but failed.
ActiveMQ Browser always complaining
/*
Could not start QBrowserV2
Failed to connect to ActiveMQ JMX Server.
*/
I followed its instruction to use Jms=true on broker elment of activemq.xml,
also set connectorPort="10000", rmiServerPort="10001" on managementContext element.
I left other configuations default and restart activemq by double clicking the activemq.bat file which located under ACTIVEMQ_HOME\bin\win64
but still no luck.
Meanwhile, I noticed that i can use jconsole to connect ActiveMQ successfully.
Anyone had met same problems? What I want to use ActiveMQ Browser is to monitor the incoming messages, when it is not consumed by subscriber and is in dispatched queue, I want to extract the concrete message contents.
I checked the question, but it is Activemq 5.8.0.
Apache ActiveMQ browser can't connect to JMX console
I had this problem now with ActiveMQ 5.13.4 and my problem was that I didn't copy the correct activemq jar files to AvtiveMQBrowser folder.
https://sourceforge.net/p/activemqbrowser/discussion/962581/thread/464131a8/#0ce4
Copy activemq-all-<version>.jar from the <installation folder> of ActiveMQ broker to ActiveMQBrowser_<version> folder.
Copy activemq-web-<version>.jar from the <installation folder>/lib of ActiveMQ broker to ActiveMQBrowser_<version> folder.
Update run_activemq_browser.bat with paths to the correct activeMQ jar files including correct version number.
The above steps allowed me to connect.

Mule 3.7CE enabling jmx

i'm trying to get JMX monitoring to work on a Mule 3.7 CE server.
I've got a flow with
<management:jmx-server >
<management:connector-server url="service:jmx:rmi:///jndi/rmi://my-server:1099/server" rebind="false" />
</management:jmx-server>
when i deploy the app it get this error
Failed to deploy artifact 'jmx_ce37', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ org.mule.module.launcher.DeploymentInitException:
RegistrationException: More than one object of type class
org.mule.module.management.agent.AbstractJmxAgent registered but only
one expected. at
org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:197)
~[?:?]
I would assume that there's already some jmx process running; but i didn't enable it, and i don't know how to connect to it. There are no processes listening on the default jmx port (1096) on this machine.
Any suggestions on what to do to use jmx with Mule3.7CE ?
Mule server already provides indeed a JMX server with basic statistics around the server and the applications, please try and use a different port if the default out-of-the-box behaviuor does not work for you.

Ping Connection Pool failed for jmspool. Could not create connection. Please check the server.log for more details

I'm GlassFish 3.1.2, ActiveMQ 5.1.1 and ActiveMQ 5.8 resource adapter (activemq-rar-5.1.1) I have created a GlassFish cluster with 2 instances. I reference http://geertschuring.wordpress.com/2012/04/20/how-to-connect-glassfish-3-to-activemq-5/ to assist with the initial deployment/configuration of activemq resource adapter After configuring the Connector Connection Pool via GlassFish Admin Console and enable Ping. When Ping is executed an error occurs: Ping Connection Pool for jms/ActiveMQConnectionFactory is Failed. Ping failed Exception - This pool is not registered with the runtime environment : jms/ActiveMQConnectionFactory Please check the server.log for more details. Ping failed Exception - This pool is not registered with the runtime environment : jms/ActiveMQConnectionFactory Please check the server.log for more details.
appreciate for your replay
by any chance is your glassfish instance in a cluster?. In our case it was failing with the same error message, and we figured out that if the instance is in a cluster, it doesn´t work. Though it works if it is not in a cluster.
We verified this also by checking in the activemq admin console the the consumers were active and receiving message, even if the ping command was failing.

Glassfish 3.1 Remote client connecting to JMS queue in cluster

Glassfish 3.1.2
Ubuntu 12.04
I've created a cluster of two nodes and have a JMS queue.
I'm having issues trying to connect to this JMS queue using a remote standalone client.
The cluster JMS listener is on port 27676 and the queue is deployed to the cluster.
mq://Glassfish2:27676/,mq://Glassfish3:27676
When I connect using the code I'd use to connect to a stand alone instance the message is not received by the cluster.
I believe it is using the default 7676 port. When the IIOP port is changed to use port 23700 which is the one the cluster (DAS) is using I get a connection refused exception as it is trying to connect to localhost:27676. At least it's the right port.
WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
I've also updated the following values in node config file (domain.xml) to remove references to localhost. jms-host and node-host values.
I had this issue before with a stand alone instance and it was resolved by adding entries to the /etc/hosts file. However, this does not seem to resolve the issue.
I also have all server instance IPs in the hosts file.
Am I missing something very basic here?
Any help would be greatly appreciated.
Thanks
If you look log files under
${glassfish_home}/glassfish/nodes/cluster-name/instance-name/imq/instances/instance-name/log
folder, you will see that
master brockers does not match
Every your node has different master brockers, probably every node know its own brocker as master brocker..
I had the same error and after a few days find this..