Monitoring jboss using JMX remotely - jboss

We are trying to monitor jboss using jmx from a remote machine using jconsole:
jboss Version: jboss-eap-6.4
jdk version: 1.7.079
To achieve this, I have done below changes in jboss configuration:
Added below parameters in Domain.sh :
JAVA_OPTS="$JAVA_OPTS - Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=IP.of.machine"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=4847"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
Below is configured in domain.xml
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<expose-resolved-model/>
<expose-expression-model/>
<remoting-connector use-management-endpoint="false"/>
</subsystem>
Defined an ApplicationRealm user with the help of add-user.sh
After doing this much, I am able to monitor the jboss via jmx through local server (on which jboss is running) using below url:
service:jmx:remoting-jmx://ip.of.machine:4847
However, when I am trying to provide the same url from the remote machine, I am getting below exception.
`The connection to xxxxx did not succeed'.
I need a help on this, to know if I am doing something incorrect. so that I can monitor jboss using JMX console remotely.
update
There is no firewall in between source and destination.

Do you have JBOSS installed on the remote machine? JBOSS notes that "If you are running jconsole on a machine different than the server you need to have a local JBoss installation: the Java JRE's jconsole will not work out of the box (i.e., without additional jars in the classpath). In addition, if you are on a remote machine and the target machine is not in DNS, you'll have to add it to your hosts file."
Then make sure you have JAVA_HOME set on he machine and pointing to your JDK 1.7.
run the appropriate JBOSS jconsole script: JBOSS_HOME/bin/jconsole.sh (linux) or JBOSS_HOME/bin/jconsole.bat (windows) script. You will then be prompted with the normal connect dialog and can enter the appropriate info.
If you do not want to go this route then I could do some research to figure out the appropriate jars that would need to be include for the JDK jconsole.

Related

Confused about "Remote Debugging" Wildfly 20 from Eclipse 2020-06

I need to be able to "remotely debug" a Java/Jakarta EE servlet running under Wildfly 20 under Ubuntu 20 from Eclipse 2020-06 running on Windows 10 at a different IP.
My research has discovered what appears to be two different approaches: one is what I want and the other is a simpler "subset".
*** First the "simple" approach. This approach is supposed to let me debug from Eclipse an app that is already deployed and running on Wildfly. To do this I uncomment this line in standalone.conf:
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
Then I start Wildfly and ensure the app also starts.
In Eclipse I create in Debug Configuration a new Remote Java Application and ensure I use the same port 8787 as above. Then I just push "Debug".
I get this error:
Failed to connect to remote VM. Connection refused. Connection refused: connect
If I return to the Wildfly system and run the following I see that port 8787 is not being monitored so that sure looks like a problem:
ss -tp | grep 8787
(nothing is found)
*** The other approach appears to be what I want to do which is to have Eclipse deploy changed files to Wildfly and also allow me to debug remotely. That is how I worked with Eclipse Oxygen and Wildfly 10 when both were installed on the same Windows machine.
In this case I set up a new Remote Connection in Eclipse and then a new Server (and attach my Project to the Server) using that Connection. I then start the Server in Debug mode. In the Progress View I can see files being copied to a Path on the Wildfly server so that seems like progress but after 20 seconds I see the same error I got in the "simple" approach above.
Failed to connect to remote VM. Connection refused.
What's interesting is that if, in the Remote Systems View I open the Remote Connection I created, I am able to use the sftp item to see files on the remote Wildfly system. So it seems that I am able to connect to Wildfly.
I need help fixing both of these problems but especially the last one since I need to have Eclipse deploy changes to Wildfly as it did when Wildfly was local.
Thank you in advance.

jconsole cannot connect to local processes on my new Mac Air

I'm stumped. On my old Mac, Jconsole couldn't connect to local JVMs. I thought I had done something to mess up system configuration. Then I got a new Mac. The first thing I did was download a jdk, install it and check to see if jconsole could connect. It could.
Then I pulled over users and applications from my old mac using my Time Machine backup drive except my system files. Still worked.
But I found that odd things were happening with my development environment. In eclipse, I could start my Jboss server, but eclipse never recognised that the Jboss server had started. So, I could never add or delete war files to it through eclipse.
Also, the jboss instance could not connect to my localhost PostGres database even though the ds file clearly gave localhost as the host to connect to.
I fixed these problems by giving my new Mac the hostname the old Mac had had.
But now I am back to not being able to connect to my local JVMs through jconsole.
This affects not just jconsole, but jprof as well so I'd like to get it fixed.
jconsole can see the JVM processes. It just times out when I try to connect.
I also tried connecting to localhost: by writing a java class that slept for five minutes and running it with the following command line:
java -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false
but I cannot connect to localhost:9010 or :9010 either.
My guess would be this is some network configuration problem, but any help would be really really appreciated.
Thanks,
George
I had similar issues with timeouts. Looking at the packets being sent, it seems that jconsole was trying to connect via an external interface and being blocked by the firewall.
I added
JAVA_TOOL_OPTIONS=-Djava.rmi.server.hostname=localhost
to my environment to ensure all java processes used localhost instead of an external interface for RMI (which is what jconsole is using for connections)

weblogic 12c Please enable the DomainRuntimeMBean Server and the Edit MBean Server in this domain's configuration

On my windows 7 64bit machine, I completely install weblogic 12c but when I log into the admin console it gave me this error:
Please enable the DomainRuntimeMBean Server and the Edit MBean Server in this domain's configuration
I have tried uninstall and do a fresh install but to no avail. Any suggestion will be highly appreciated
Try deleting the pending folder within your domain root and restart the server. The default domain may be corrupted.
http://weblogicfordummies.blogspot.com/2008/10/wls10please-enable-domainruntimembean.html

How do I access an Eclipse Tomcat server externally?

I am trying to access an Apache Tomcat v6.0 server running inside Eclipse (OsX) on port 8090 on a machine that is on a different network. I have tried http://my_public_ip:8090/ and it is not working and googling hasn't turned up anything that worked.
Any ideas?
Is it a Windows machine? If so, is Windows Firewall turned on? If so, have you added an exception for port 8090 and/or java.exe (maybe javaw.exe)?
In what way is it not working?

why hyperic can't auto-discover my Jboss AppSvr?

I installed JBoss AS on xx.xx.12.48.
I launched ./bin/run.sh -b xx.xx.12.48.
The JMX web console indicates everything is OK.
On xx.xx.12.49, I installed Hyperic (latest).
I installed Hyperic agent on xx.xx.12.48
I can see both Hyperic agents, on both servers.
But ther's nothing about my JBoss AS server !!!
Why can't Hyperic Auto-Discover finds my JBoss server ?
Is there a simple way to configure ?
Thanks
To force Hyperic HQ Agent to detect JBoss, you have to edit conf/agent.properties
jboss.installpath=C:/jboss
Then, log into your Hyperic HQ Server and manually add the jboss server under inventory.
Give it few minutes, the local agent will pick up the instruction and look for the jboss server.
because you install the new server,but agent did not know,so the hqserver do not know neither.
You need to configure the agent.properties in the agent installed machine.Refer official document:
http://support.hyperic.com/display/EVO/Configure+Agent+-+Server+Communication+Interactively