How to enable JMXRemote authentication and connect with JConsole
Tech-Today

How to enable JMXRemote authentication and connect with JConsole


This tutorial will summarize how to setup a jmxremote access, so that a remote jconsole can be authenticated and connect.

We will be interested in 2 files, located in:
JAVA_HOME\jre\lib\management
  1. jmxremote.access
  2. jmxremote.password.template, rename to jmxremote.password
What needs to be done with these files:
  1. Add an admin role in jmxremote.access, so at the end you should see:
  2. monitorRole   readonly
    admin readonly
    controlRole readwrite \
    create javax.management.monitor.*,javax.management.timer.* \
    unregister
  3. Then we need to add the role and password in jmxremote.password
  4. monitorRole     secret
    controlRole secret
    admin secret
Then we need to restrict the owner's right to read-only, right clicking on the file and clicking read-only won't do. Need to execute the lines below:

cacls jmxremote.password /P :R
cacls jmxremote.access /P :R

Then for example I'm interested to monitor JBoss with JConsole. And I have added JBoss in eclipse's server view. I need to add the following in Program Arguments:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9001
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false

Assumming I want to use port 9001.

Refer to the image below:

Finally run jconsole in command prompt, select org.jboss.xxx and enter our admin and password which is admin / secret.





- How To Create A Wildfly Cluster
The following steps will help us configure a Wildfly cluster. *Note that I'm using Wildfly 11 *It took me some time to figure it out so I'm writing it here for reference. I'm using the standard-full-ha.xml profileIn the program arguments add  -b...

- How To Run A Wildfly Server Inside Docker
Before we begin you must configure docker, I am using Ubuntu so I followed the guide here: https://docs.docker.com/engine/installation/linux/ubuntulinux/. Choose the appropriate OS that applies to you. Let's do this in sequence: Checkout and...

- Javaee Development
JavaEE6How to create a javaee6 web app using jboss maven war archetypeCreate a simple javaee6 web app with maven, glassfish and postgresqlHow to validate a JavaEE6 Bean in a jobHow to add JavaEE 6 archetypes in eclipse keplerHow to create a custom bean...

- How To Configure Wildfly 8 Clustering And Deploying Picketlink Enabled War Application To Test The Session.
In this tutorial we will try to configure wildfly cluster and test it by deploying a picketlink enabled war application where a user can login and the session shared between the virtual server. Before we start, make sure that you read these links: https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto...

- How To Configure Mail Resource In Jboss 7.2 With A Sample Java Client
This tutorial assumes that you have the following installed on your local system: JBoss 7.2eclipse to run a projecta mail server, can be gmailIn this page we will summarize how to configure a mail dataSource in Jboss and create a JavaEE6 client to send...



Tech-Today








.