当启用JMXauthentication时,Datastax Opscenter是否需要重新启动?

我有一个在opsc运行的Cassandra 2.2集群和一个Opscenter 5.2实例(称为opsc )。

Cassandra集群启动后启用了JMX auth (在启动opsc之前),Opscenter代理的日志显示

  ERROR [async-dispatch-1] 2015-08-11 22:45:45,241 Uncaught exception on async-dispatch-1 java.lang.SecurityException: Authentication failed! Credentials required at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:211) at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate(JMXPluggableAuthenticator.java:163) at sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate(ConnectorBootstrap.java:219) at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:232) at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:199) 

这与预期的一样,因为JMX auth已启用,但代理没有configuration凭证(它将从opsc接收凭证)。

但是,在Opscenter UI中添加群集后,Opscenter仍然无法连接到群集。

以下是一个Cassandra节点的日志:

  INFO [qtp176892017-22] 2015-08-11 23:00:16,648 Starting up agent collection. INFO [qtp176892017-22] 2015-08-11 23:00:16,648 New JMX connection (127.0.0.1:7199) ERROR [qtp176892017-22] 2015-08-11 23:00:16,654 Unhandled route Exception: java.lang.SecurityException: Authentication failed! Credentials required JMXPluggableAuthenticator.java:211 com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure JMXPluggableAuthenticator.java:163 com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate ConnectorBootstrap.java:219 sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate RMIServerImpl.java:232 javax.management.remote.rmi.RMIServerImpl.doNewClient RMIServerImpl.java:199 javax.management.remote.rmi.RMIServerImpl.newClient (Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0 NativeMethodAccessorImpl.java:62 sun.reflect.NativeMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java:43 sun.reflect.DelegatingMethodAccessorImpl.invoke ... 

并从opscenterd.loglogging日志:

 ... 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Agent for ip 172.18.100.2 is version '5.2.0' 2015-08-11 23:00:16+0000 [Test_Cluster] ERROR: Agent for 172.18.100.2 was unable to complete operation (http://172.18.100.2:61621/load-stomp-conf?): java.lang.SecurityException: Authentication failed! Credentials required 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Agent for ip 172.18.100.4 is version '5.2.0' 2015-08-11 23:00:16+0000 [Test_Cluster] ERROR: Agent for 172.18.100.4 was unable to complete operation (http://172.18.100.4:61621/load-stomp-conf?): java.lang.SecurityException: Authentication failed! Credentials required 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Agent for ip 172.18.100.3 is version '5.2.0' 2015-08-11 23:00:16+0000 [Test_Cluster] ERROR: Agent for 172.18.100.3 was unable to complete operation (http://172.18.100.3:61621/load-stomp-conf?): java.lang.SecurityException: Authentication failed! Credentials required 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Automatic agent setup failed for ( Authentication failed! Credentials required (172.18.100.4)): Authentication failed! Credentials required (172.18.100.4) 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Automatic agent setup failed for ( Authentication failed! Credentials required (172.18.100.2)): Authentication failed! Credentials required (172.18.100.2) 2015-08-11 23:00:16+0000 [Test_Cluster] INFO: Automatic agent setup failed for ( Authentication failed! Credentials required (172.18.100.3)): Authentication failed! Credentials required (172.18.100.3) ... 

只有在重新启动opscenterd服务后,一切正常。

那么JMX auth有什么问题呢? 为什么需要重新启动? 谢谢

另外1

在每个Cassandra节点上重新启动Opscenter代理也解决了这个问题,所以我想这可能是因为Opscenter没有将JMX凭证信息传递给代理。

Opscenter doc说:“更改此文件中的属性后,请重新启动OpsCenter以使更改生效。” 假设添加一个集群基本上改变了cluster_name.conf ,这看起来像一个devise缺陷,因为用户可能没有权限重新启动Opscenter服务器(更不用说它有什么破坏性)。