difficulty starting jstatd in a sparse zone...
843829Nov 29 2008 — edited Jan 13 2009I had great difficulty getting jstatd to start in my sparse zone. I am wondering if there is a bug in the suggested policy file...
Specifically, the fact that path in the codebase line, java.home will not find "lib" as written:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
JAVA_HOME is normally /usr/java and not /usr/java/bin, yet the sample policy would not find lib unless the "bin" is in the java.home variable path.
The problem is
/usr/java/bin/jstatd -J-Djava.security.policy=jstatd.all.policy
still seems to start in the global zone, but not in a sparse -- unless I reset JAVA_HOME to /usr/java.
The error I saw many times for the output while trying to run jstatd was:
#>: Could not create remote object
access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)
java.security.AccessControlException: access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:345)
at java.security.AccessController.checkPermission(AccessController.java:555)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.System.setProperty(System.java:763)
at sun.tools.jstatd.Jstatd.main(Jstatd.java:139)
And then it seemingly randomly started without error after many attempts. Very confusing.
Edited by: russp on Nov 29, 2008 11:35 PM