A common cause of JBossAS Resources being unavailable is that their JNP invoker is secured (i.e. requires a username and password). The JNP invoker is what the Jopr Agent connects to in order to remotely access the AS instance's JMX server.
describes how to secure the JMX invoker. This should allow you to figure out whether yours are secured or not. For a description of configuring usernames and passwords, see:
Thank you, Ian, for your quick and detailed response.
I found, however, that none of mine are secured. The jmx-invoker-service.xml is identical on the platforms where JBoss is reported as available and those where it is reported as not available. The out-of-the-box default xml file has not been modified in either case, so the snippet that would require authentication remains commented out in all cases.
Any other possible causes?
Best thing to do is look in your agent log file and see what its telling you. You might find some error messages.
If still nothing, turn on debug in the agent and see what the logs tell you.
To turn on debug in the agent (if you are running a new build from trunk) use the agent's "debug" prompt command. Or, start the agent with the env var set: RHQ_AGENT_DEBUG=true (this is the only way to do it with the Jopr GA distro). The Jopr FAQ tells you more info on agent debug.
Thank you, Mazz.
Without turning on debug, I am getting an error message that JBossAS "refused" the connection, but I'm not sure what to do about it since it appears that JBoss is configured the same on the problem servers as on those that are reporting okay in JOPR:
2008-12-15 11:23:09,443 INFO [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.jbossas.JBossASServerComponent)- Loading JBoss connection [jnp://172.25.1.178:1199] with install path [D:\jboss-4.0.3SP1]...
2008-12-15 11:23:11,740 WARN [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.jbossas.JBossASServerComponent)- Could not establish connection to the JBoss AS instance  times for resource [D:\jboss-4.0.3SP1\server\ATG_DRP1]
org.mc4j.ems.connection.EmsConnectException: Could not connect [jnp://172.25.1.178:1199] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: cmatg6a; nested exception is:
java.net.ConnectException: Connection refused: connect]
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: cmatg6a; nested exception is:
java.net.ConnectException: Connection refused: connect]
... 11 more
Caused by: java.rmi.ConnectException: Connection refused to host: cmatg6a; nested exception is:
java.net.ConnectException: Connection refused: connect
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
... 15 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
... 20 more
Any suggestions as to how to get JBoss to stop refusing the connection?
It looks like you could have a DNS resolution problem. Try using twiddle to connect to these rogue JBAS instances e.g. jnp://172.25.1.178:1199 or jnp://cmatg6a:1199. If twiddle can connect then Jopr should be able to too.
This looks like a generic connection problem.
Caused by: java.rmi.ConnectException: Connection refused to host: cmatg6a
Is that hostname DNS-resolvable? Is it resolving to the correct IP?
org.mc4j.ems.connection.EmsConnectException: Could not connect [jnp://172.25.1.178:1199]
Weird that the JNP uses an IP but the connection error is showing a hostname.
But, I think if you track down what's up with "cmatg6a" and "172.25.1.178", that's the source of the connection issues.
Mazz, thank you!
I should have mentioned that all 16 servers in the clustered environment are dual-homed Windows boxes on VMWare. And that we have had some Windows networking hostname resolution issues on these virtual boxes.
I'm told now that some of the app servers in the cluster resolve their hostname lookups differently, and that it is a Windows OS issue. The three problem servers are among them, and a modification was made to these to force the 172.x.x.x IP address, but there may also be some other servers to which this modification was made but that work okay with JOPR.
When configuring the Agent, I assigned the Agent Name "cmatg6a" instead of the fully-qualified domain name which showed up as the default in the setup dialog. This may explain the "cmatg6a" hostname in the logs.
The dialog also defaulted to a 192.x.x.x address for these problem boxes, but I changed that to the 172.x.x.x address during configuration.
Since I always used the 172.x.x.x address when setting up and configuring JOPR server and JOPR agent, shouldn't it therefore use the 172.x.x.x for all purposes?
Well, there are two things here.
One is the agent connecting to the server and the server connecting to the agent. Those are the IP addresses you give at agent startup time.
This is different, obviously, from the IP addresses the Jopr plugin uses to talk to your managed JBossAS instances.
The Jopr plugin manages the JBossAS instances via the JNP port you configure for the JBossAS resources (you see these values in the Inventory tab's connection properties).
The agent's IP is different - that's the IP the server uses to talk to the agent. You also need to tell the agent what IP the server can be found at.
Unsure what errors are related to the server<->agent comm layer - but it looks like for your issue, the problem lies with the Jopr plugin talking to your managed JBossAS instances... because I see the Jopr plugin code in the stack trace:
Thank you, Mazz. I'm so new to JOPR that I didn't realize there was a separate plug-in being used for JBossAS.
Under the Type: JBossAS Server (Server) Inventory tab > Connection Info I have Naming Provider URL: jnp://172.25.1.178:1199, and under Operations I have Binding Address: 172.25.1.178
I tried changing the Naming Provider URL to a 192.x.x.x address instead, but saw no change in the results. Is there a different approach I should try?