Dasfaust / GlobalMarket

Buy and sell items in a global market
Other
28 stars 58 forks source link

Redis Error? [GM 2] #80

Closed Time6628 closed 5 months ago

Time6628 commented 8 years ago

Getting this error when using redis:

[15:04:05] [Server thread/ERROR]: Error occurred while enabling GlobalMarket v2.0.0.21 (Is it up to date?)
java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457) ~[?:1.8.0_05]
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:585) ~[?:1.8.0_05]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848) ~[?:1.8.0_05]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:322) ~[?:1.8.0_05]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[?:1.8.0_05]
    at org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister(BaseGenericObjectPool.java:957) ~[?:?]
    at org.apache.commons.pool2.impl.BaseGenericObjectPool.<init>(BaseGenericObjectPool.java:133) ~[?:?]
    at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:107) ~[?:?]
    at lib.jedis.util.Pool.initPool(Pool.java:43) ~[?:?]
    at lib.jedis.util.Pool.<init>(Pool.java:31) ~[?:?]
    at lib.jedis.jedis.JedisPool.<init>(JedisPool.java:73) ~[?:?]
    at lib.jedis.jedis.JedisPool.<init>(JedisPool.java:54) ~[?:?]
    at me.dasfaust.gm.storage.RedisStorage.init(RedisStorage.java:67) ~[?:?]
    at me.dasfaust.gm.Core.onEnable(Core.java:71) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-1614.25]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368) [JavaPluginLoader.class:1.7.10-1614.25]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-1614.25]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:415) [CraftServer.class:1.7.10-1614.25]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:349) [CraftServer.class:1.7.10-1614.25]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:512) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:486) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:446) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:336) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:632) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_05]
Dasfaust commented 8 years ago

It's something to do with KCauldron/Thermos and the Forge security manager. A work-around is to create a file named java_security.policy in your server's directory with

grant {
    permission javax.management.MBeanTrustPermission "register";
};

and add -Djava.security.policy=/path_to_server_dir/java_security.policy to your server's startup command.