2 Replies Latest reply on Feb 24, 2015 12:31 AM by abhi0123

    Can't connect using JMX remote - WIldfly 8.2.0.Final

    abhi0123 Newbie

      Followed what's mentioned in this document http://jaitechwriteups.blogspot.com/2014/12/remote-jmx-access-to-wildfly-or-jboss.html and this SO post http://stackoverflow.com/questions/22212693/wildfly-8-final-jconsole-cant-connect-remotely and others, all of which essentially said that if I followed the following steps, I'd be able to connect using the JMX console. Well, that's not the case.

       

      1. Create a management user by running add-user.sh. Check, created a user 'jmx-admin' not assigned to any groups.
      2. Check if able to log in to the admin console using the previously created user. Check, able to to log into http://127.0.0.1:9990/console just fine.
      3. Either mess with classpath or run bin/jconsole.sh. Check, ran the later.
      4. Connect using the connection string service:jmx:http-remoting-jmx://localhost:9990. Check. Also tried by relacing localhost with 127.0.0.1 and hostname.
      5. Connecion should be successful. Nop, connection failed.

       

      Few things that I'd like to mention here:

      1. As with most tech articles, none on this topic are up-to-date. What they fail to mention is if the management user needs to be associated with any group. Also on the version that I'm running, adding a user ends with a question "Is this new user going to be used for one AS process to connect to another AS process? e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls." that I answered negative to.
      2. $ hostname prints archlinux. If it matters (shouldn't but...) this is a virtual archlinux install.
      3. $ sudo cat /etc/hosts

       

      127.0.0.1 localhost

      127.0.1.1 archlinux

       

      127.0.0.1       localhost.localdomain   localhost

      ::1             localhost.localdomain   localhost

       

        4.  standalone.xml snippet (nothing changed, AS-IS):

       

      <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

              </interface>

              <interface name="public">

                  <inet-address value="${jboss.bind.address:127.0.0.1}"/>

              </interface>

              <!-- TODO - only show this if the jacorb subsystem is added  -->

              <interface name="unsecure">

                  <!--

                    ~  Used for IIOP sockets in the standard configuration.

                    ~                  To secure JacORB you need to setup SSL

                    -->

                  <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

              </interface>

      </interfaces>


        5.  $ ifconfig

      eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

              inet 192.168.19.133  netmask 255.255.255.0  broadcast 192.168.19.255

              ether 00:0c:29:07:87:22  txqueuelen 1000  (Ethernet)

              RX packets 38422  bytes 27402020 (26.1 MiB)

              RX errors 0  dropped 0  overruns 0  frame 0

              TX packets 21092  bytes 5291363 (5.0 MiB)

              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

       

       

      lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

              inet 127.0.0.1  netmask 255.0.0.0

              inet6 ::1  prefixlen 128  scopeid 0x10<host>

              loop  txqueuelen 0  (Local Loopback)

              RX packets 41582  bytes 28030196 (26.7 MiB)

              RX errors 0  dropped 0  overruns 0  frame 0

              TX packets 41582  bytes 28030196 (26.7 MiB)

              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0