Dear Ivy Team

Doing some performance analysis since our app is using a lot of CPU. I've activated

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9003 -Dcom.sun.management.jmxremote.login.config=jmx -Djava.security.auth.login.config=configuration/jaas.config -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.autodiscovery=true"

JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=<ip>"

When I connect with Java Mission Controller to Ivy 7 I get the following results :

  • Start JMX Console : works
  • Start Flight Recorder : Access denied! Invalid access level for requested MBeanServer operation.

java.lang.RuntimeException: Access denied! Invalid access level for requested MBeanServer operation. at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:110) at com.jrockit.mc.browser.views.JVMBrowserView$1.run(JVMBrowserView.java:100) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at Caused by: java.lang.SecurityException: Access property for this identity should be similar to: readwrite create com.sun.management.MissionControl at ....

According to https://community.oracle.com/thread/2588377 :

You need to ensure that the user you want to access the flight recorder has permission to create the relevant MBeans. You have probably defined the roles in the jmxremote.access file. Try adding:

<your-role-name-goes-here> readwrite \ create com.sun.management.,com.oracle.jrockit. \ unregister

=> where can I change this for Ivy ?

Thanks & Regards John

asked 24.01 at 07:20

John%20Moser's gravatar image

John Moser
61192833
accept rate: 0%

edited 24.01 at 07:21


link

answered 24.01 at 08:12

Alex%20Suter's gravatar image

Alex Suter ♦♦
3.1k102046
accept rate: 84%

visualvm 1.4.4 (latest) contains stacktraces re hot methods.

(31.01 at 12:46) John Moser John%20Moser's gravatar image

Maybe need to define -Dcom.sun.management.jmxremote.port=9003 -Dcom.sun.management.jmxremote.rmi.port=9003

(03.02 at 05:16) Alex Suter ♦♦ Alex%20Suter's gravatar image

with visualvm 1.4.4 it's ok

(03.02 at 06:32) John Moser John%20Moser's gravatar image

Hi John

You are right if you want to access JFR from Java Mission Control on a remote machine then you have to enable this in the jmxremote.access file as follows:

Change from:

monitorRole   readonly
controlRole   readwrite \
              create javax.management.monitor.*,javax.management.timer.* \
              unregister

to:

monitorRole   readonly
controlRole   readwrite \
              create javax.management.monitor.*,javax.management.timer.*,com.sun.management.*,com.oracle.jrockit.* \
              unregister

as described in the articel https://community.oracle.com/thread/2588377

The file can be found here:

Windows:

Axon.ivy Engine < 7.4: {engine installation dir}/jre/lib/management/jmxremote.access

Axon.ivy Engine >= 7.4: {engine installation dir}/jre/conf/management/jmxremote.access

Linux:

Axon.ivy Engine < 7.4: {java installation dir}/jre/lib/management/jmxremote.access

Axon.ivy Engine >= 7.4: {java installation dir}/conf/management/jmxremote.access

link

answered 24.03 at 11:20

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k192857
accept rate: 74%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×146

Asked: 24.01 at 07:20

Seen: 474 times

Last updated: 24.03 at 11:20