Java Flight Recorder:它是否需要JMX读写访问权限或是否只能读取?

时间:2015-01-28 10:11:54

标签: java jmx jmc

JMX允许您为名为jmxremote.access的文件中的用户设置访问权限(您可以在<JAVA INSTALL>/jre/lib/management中找到该模板)。在那里,您可以为每个用户指定用户是否具有..

   "readonly" grants access to read attributes of MBeans.
               For monitoring, this means that a remote client in this
               role can read measurements but cannot perform any action
               that changes the environment of the running program.

或..

   "readwrite" grants access to read and write attributes of MBeans,
               to invoke operations on them, and optionally
               to create or remove them. This access should be granted
               only to trusted clients, since they can potentially
               interfere with the smooth operation of a running program.

..权限。

现在,我想为JXM用户激活此访问控制功能,我通过JMC使用该功能来访问飞行记录器数据 - 想要为此用户提供必要的权限,按照默认安全标准。

- &GT;是否足以授予用户readonly权限,或者Java Flight Recorder是否还需要在某处编写内容?

1 个答案:

答案 0 :(得分:3)

JFR需要一些特定的读写权限:

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

回答: https://community.oracle.com/thread/2588377