jconsole memory tab - java

I am connecting to remote jboss server with jconsole. For some reason all tabs except MBean are disabled, how can I setup jboss run configuration to allow remote memory monitoring?
I am connecting to jboss with the following link (I have taken it from jboss startup log):
service:jmx:rmi://hostAddr/jndi/rmi://hostAddr:1190/jmxconnector
What am I doing wrong?
UPD
Java version on the server (there is application running which I want to monitor):
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
Java version on client (I start jconsole here):
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Had the same problems.
Solution is
Set JBoss Java Options for example:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=9999
Environment variables
"TEMP" and
"TMP"
need to be set manually to an empty directory (i.e. C:\Temp). If this is not done, the tabs Memory, Threads ... are disabled.
JConsole needs to be started with the same user as the JVM. This could be "system".
This can be done with psexec
PsExec.exe -s -i "%java_home%\bin\jconsole.exe"
Then connect to "localhost:9999"

Related

"bash: jstack: command not found" error on Amazon Linux AMI

On ec2 instance(Amazon Linux AMI) jstack is giving following error
bash: jstack: command not found
Java is installed on the machine
java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Is there any reason to get error for jstack when java is already installed?
JDK is required for jstack. The instance only has JRE.

Which JVM architecture am I using?

I followed https://www.guru99.com/how-to-install-java-on-ubuntu.html to install Java on my 64-bit, x86, Ubuntu 18.04 system.
When I run "java -version", I get the output :
ariba#monster:~$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Server VM (build 25.231-b11, mixed mode)
What does "Java HotSpot(TM) Server VM (build 25.231-b11, mixed mode)" mean? Is my JVM architecture 64-bit or 32-bit ? And what architecture of eclipse-installer should I use, then?
The Java HotSpot Virtual Machine is a core component of the Java SE platform. It implements the Java Virtual Machine Specification, and is delivered as a shared library in the Java Runtime Environment. So, HotSpot is an "ergonomic" JVM. Read more detail here, link.
JVM architecture which you post in the question is 32-bit. You can get 64-Bit info in the output if you JDK is 64-bit architecture.
λ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Just getting the latest 64-bit version eclipse. The architecture of eclipse-installer depends on your system architecture.

How to get profile tab in VisualVM cross-platform?

Target to profile is an ARM 32-bit:
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) Server VM (build 25.111-b14, mixed mode)
My development machine is a crapbook running a totally different arch, bits, JVM etc, but VisualVM is running as:
Java: 1.8.0_112; Java HotSpot(TM) 64-Bit Server VM (25.112-b16, mixed mode)
My problem is that I don't have the profile tab that I want, although I do have the sampler tab (which I don't want to use).
I have all following debug and JMX -D arguments on my target machine:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4000
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=3333
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Djava.rmi.server.hostname=10.223.64.109
Can anyone suggest why I'm not getting the profile tab?
Many thanks
So I think I've answered my own question now, after finding this nugget on: https://visualvm.java.net/applications_remote.html
From other research, it looks like VisualVM and a local JVM communicate using files that are dropped in the java.io.tmp directory. Files with local process IDs are dropped. Maybe profile data is too vast to be transported over a network, or that the profiling procedure needs the timeliness of something being written to file by the JVM and observed immediately by VisualVM.

JNLP application fails with error about missing jniwrap64.dll

I have a JNLP application which fails with the following error:
Cannot find JNIWrapper native library (jniwrap64.dll) in java.library.path: ....
I have Java 8 64bit installed and using IE11.
Any help on how to fix it will be appreciated.
Just to clarify: I did not write the application and only trying to run it.
You need 32bit java version to launch the JNLP application and not 64bit java
please run below command to check what version of java you are running
C:\RIM\SINGTEL\950_0\inproc>java -d64 -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

'java -version' command in CMD

When I run the 'java -version' command in Command Prompt, then it gives me the following information:
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)
Can I run a web page that hosts a Java Applet properly?
P.S.: I'm using Windows 7 32 bit.
You don't need Java installed on the server to host a Java applet. Applets are executed on the client side. Apache server (do not confuse with Apache Tomcat) or similar is enough.

Categories

Resources