What is the correct user credential to connect local JBoss AS in JBoss ON since there is no add-user.sh?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Operation Networks (JON)
    • 3.3.x

Issue

  • It is always failed to authenticate user credential information in embedded JBoss AS in Inventory -> Servers -> Connections Settings.
  • What is the way to add additional users for embedded JBoss AS since there is no add-user.sh script available?
  • The agent.log shows below error:

    2019-01-06 00:43:58,619 WARN  [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.server.JBossAS7JMXComponent)- Could not establish connection to the JBoss AS instance [1] times for resource [RHQServerSubsystems]
    org.mc4j.ems.connection.EmsConnectException: Could not connect [service:jmx:remoting-jmx://127.0.0.1:6999] org.mc4j.ems.connection.EmsConnectException: IOException: Check service availability
        at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:106)
        at org.rhq.plugins.server.JBossAS7JMXComponent.loadConnection(JBossAS7JMXComponent.java:161)
        at org.rhq.plugins.server.JBossAS7JMXComponent.start(JBossAS7JMXComponent.java:100)
        at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:759)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.mc4j.ems.connection.EmsConnectException: IOException: Check service availability
        at org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider.doConnect(JMXRemotingConnectionProvider.java:162)
        at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:101)
        ... 10 more
    Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.xnio.nio.NioXnioWorker$1.handleEvent(NioXnioWorker.java:329)
        at org.xnio.nio.NioXnioWorker$1.handleEvent(NioXnioWorker.java:325)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
        at org.xnio.nio.NioHandle.run(NioHandle.java:90)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:198)
        at ...asynchronous invocation...(Unknown Source)
        at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
        at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
        at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
        at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
        at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:227)
        at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:148)
        at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:99)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
        at org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider.doConnect(JMXRemotingConnectionProvider.java:143)
        ... 11 more
    

Resolution

  1. Find a normal JBoss EAP Environment and use that to create a new user, then copy the entry from {$JBOSS_HOME}/standalone/configuration/mgmt-users.properties and mgmt-groups.properties to corresponding position of the current environment.
  2. Configure the user credential information in Inventory -> Servers – Top Level Imports -> EAP(127.0.0.1) RHQ Server -> Inventory -> Connection Settings
  3. Wait for a while and check the availability status become connected.

Root Cause

  • In the JBoss ON environment, the embedded JBoss AS does not include with the add-user.sh utility.
  • The users added in mgmt-users.properties should NOT be confused by the management user from JBoss ON console. JBoss ON and embedded JBoss AS do not share user credentials.

Diagnostic Steps

  • Enable debug mode in {$AGENT_HOME}/bin/rhq-agent-env.sh by uncomment RHQ_AGENT_DEBUG=true, then restart agent.
  • When the issue occurs, you can notice below debug information before the error:

    2019-01-06 00:55:29,583 DEBUG [Remoting "endpoint" read-1] (org.jboss.remoting.remote.client)- Client received authentication rejected for mechanism DIGEST-MD5
    2019-01-06 00:55:29,588 DEBUG [Remoting "endpoint" read-1] (org.jboss.remoting.remote.connection)- JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: the server presented no authentication mechanisms
    

Duplicates

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments