我刚刚在 Linux 上使用“DataStax All-in-One Installer”安装了 OpsCenter 5.0。
我尝试通过以下设置来添加身份验证/etc/opscenter/opscenterd.conf
:
[authentication]
enabled = True
重新启动服务器后,service opscenterd restart
身份验证仍然不存在。
我尝试按照文档说明启用 SSL,但同样没有效果。服务器甚至不监听默认设置的 8443 端口。
分析日志文件后/var/log/opscenter/opscenterd.log
没有发现相关错误。
我想到的是,OpsCenter 可能没有读取配置文件?为了检查这一点,我决定将一些随机字符串放入配置文件中,以在 OpsCenter 守护程序启动期间引发错误。重新启动后,日志文件仍然没有相关错误。
我的另一个想法是,OpsCenter 可能只是忽略了无效字符串?我已删除了之前无效的字符串,并在部分中编辑了port
值。重新启动后,OpsCenter 仍在 8888 下监听,而没有绑定到 8887。8887
[webserver]
我最后一次尝试是重启整个服务器。但这也没什么用。
看起来 OpsCenter 根本就没有读取配置文件。是什么原因造成的?我该如何修复?
谢谢你的时间,亚当
PS:这是全部/var/log/opscenter/opscenterd.log
内容。我还提供了一个PasteBin 链接以提高可读性。
2014-10-20 19:40:12+0200 [] INFO: Log opened.
2014-10-20 19:40:12+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.7 2.7.6) starting up.
2014-10-20 19:40:12+0200 [] INFO: reactor class: twisted.internet.epollreactor.EPollReactor.
2014-10-20 19:40:12+0200 [] INFO: set uid/gid 0/0
2014-10-20 19:40:12+0200 [] INFO: Logging level set to 'info'
2014-10-20 19:40:12+0200 [] INFO: OpsCenter version: 5.0.1
2014-10-20 19:40:12+0200 [] INFO: Compatible agent version: 5.0.1
2014-10-20 19:40:12+0200 [] INFO: Loading per-cluster config file ./conf/clusters/local.conf
2014-10-20 19:40:12+0200 [] INFO: HTTP BASIC authentication disabled
2014-10-20 19:40:12+0200 [] INFO: Starting webserver with ssl disabled.
2014-10-20 19:40:12+0200 [] INFO: Stats Reporter is connected via HTTP
2014-10-20 19:40:12+0200 [] INFO: SSL disabled
2014-10-20 19:40:12+0200 [] ERROR: Unable to import SSL, further definition actions will fail.
2014-10-20 19:40:12+0200 [] INFO: Starting Definition Update Service
2014-10-20 19:40:12+0200 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 8888
2014-10-20 19:40:12+0200 [] INFO: Starting factory <opscenterd.WebServer.OpsCenterdWebServer instance at 0x7fe23a2ac128>
2014-10-20 19:40:12+0200 [] INFO: morbid.morbid.StompFactory starting on 61619
2014-10-20 19:40:12+0200 [] INFO: Starting factory <morbid.morbid.StompFactory instance at 0x7fe237a41368>
2014-10-20 19:40:12+0200 [] INFO: Configuring agent communication with ssl support disabled.
2014-10-20 19:40:12+0200 [] INFO: morbid.morbid.StompFactory starting on 61620
2014-10-20 19:40:12+0200 [] ERROR: No http agent exists, likely due to SSL import failure.
2014-10-20 19:40:12+0200 [local] INFO: Starting services for cluster local
2014-10-20 19:40:12+0200 [local] INFO: Loading event plugins
2014-10-20 19:40:12+0200 [local] INFO: Loading event plugin conf ./conf/event-plugins/posturl.conf
2014-10-20 19:40:12+0200 [local] INFO: Successfully loaded event plugin conf ./conf/event-plugins/posturl.conf
2014-10-20 19:40:12+0200 [local] INFO: Loading event plugin conf ./conf/event-plugins/email.conf
2014-10-20 19:40:12+0200 [local] INFO: Successfully loaded event plugin conf ./conf/event-plugins/email.conf
2014-10-20 19:40:12+0200 [local] INFO: Done loading event plugins
2014-10-20 19:40:12+0200 [] INFO: Metric caching enabled with 50 points and 1000 metrics cached
2014-10-20 19:40:12+0200 [] INFO: Starting PushService
2014-10-20 19:40:12+0200 [local] INFO: Starting CassandraCluster service
2014-10-20 19:40:12+0200 [local] INFO: agent_config items: {'cassandra_log_location': '/var/log/cassandra/system.log', 'thrift_port': 9160, 'jmx_pass': '*****', 'thrift_ssl_truststore': None, 'rollups86400_ttl': -1, 'api_port': '61621', 'use_ssl': 0, 'rollups7200_ttl': 31536000, 'kerberos_debug': False, 'storage_keyspace': 'OpsCenter', 'thrift_user': '', 'provisioning': 0, 'metrics_ignored_column_families': '', 'metrics_ignored_keyspaces': 'system, system_traces, system_auth, dse_auth, OpsCenter', 'jmx_user': '', 'cassandra_install_location': '', 'kerberos_use_keytab': True, 'rollups300_ttl': 2419200, 'thrift_pass': '*****', 'metrics_ignored_solr_cores': '', 'metrics_enabled': 1, 'kerberos_use_ticket_cache': True, 'thrift_ssl_truststore_type': 'JKS', 'rollups60_ttl': 604800, 'ec2_metadata_api_host': '169.254.169.254', 'kerberos_renew_tgt': True, 'thrift_ssl_truststore_password': '*****'}
2014-10-20 19:40:13+0200 [] INFO: OS Version: Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014
2014-10-20 19:40:13+0200 [] INFO: CPU Info: ['2666.774', '2666.774']
2014-10-20 19:40:13+0200 [] INFO: Mem Info: 2989MB
2014-10-20 19:40:13+0200 [local] INFO: Enterprise functionality: True
2014-10-20 19:40:13+0200 [local] INFO: Cluster Name: Test Cluster
2014-10-20 19:40:13+0200 [local] INFO: Snitch: com.datastax.bdp.snitch.DseDelegateSnitch
2014-10-20 19:40:13+0200 [] INFO: Package Manager: aptitude
2014-10-20 19:40:13+0200 [local] INFO: Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
2014-10-20 19:40:13+0200 [local] INFO: Recognizing new node 127.0.0.1 ('-8867774524416669848')
2014-10-20 19:40:13+0200 [local] INFO: Node 127.0.0.1 has multiple tokens (vnodes). Only one picked for display.
2014-10-20 19:40:13+0200 [local] INFO: Keyspaces: {'system_traces': CassandraKeyspace(name=system_traces, column_families=[], tables=[u'events', u'sessions'], attributes={'strategy_options': {'replication_factor': '2'}, 'replica_placement_strategy': 'org.apache.cassandra.locator.SimpleStrategy'}), 'OpsCenter': CassandraKeyspace(name=OpsCenter, column_families=['events_timeline', 'settings', 'rollups60', 'rollups86400', 'bestpractice_results', 'pdps', 'rollups7200', 'events', 'rollups300'], tables=[u'events_timeline', u'settings', u'rollups60', u'rollups86400', u'bestpractice_results', u'pdps', u'rollups7200', u'events', u'rollups300'], attributes={'strategy_options': {'replication_factor': '1'}, 'replica_placement_strategy': 'org.apache.cassandra.locator.SimpleStrategy'}), 'system': CassandraKeyspace(name=system, column_families=['IndexInfo', 'NodeIdInfo', 'schema_keyspaces', 'hints'], tables=[u'peers', u'range_xfers', u'schema_keyspaces', u'schema_columns', u'IndexInfo', u'schema_triggers', u'sstable_activity', u'peer_events', u'paxos', u'batchlog', u'NodeIdInfo', u'compaction_history', u'compactions_in_progress', u'schema_columnfamilies', u'local', u'hints'], attributes={'strategy_options': {}, 'replica_placement_strategy': 'org.apache.cassandra.locator.LocalStrategy'}), 'dse_system': CassandraKeyspace(name=dse_system, column_families=[], tables=[u'encrypted_keys', u'leases'], attributes={'strategy_options': {}, 'replica_placement_strategy': 'org.apache.cassandra.locator.EverywhereStrategy'})}
2014-10-20 19:40:13+0200 [local] INFO: Persisting agent configuration to Cassandra
2014-10-20 19:40:13+0200 [local] INFO: Initializing event storage.
2014-10-20 19:40:13+0200 [local] INFO: Attempting to load all persisted alert rules
2014-10-20 19:40:13+0200 [] INFO: Starting to update agents' configuration
2014-10-20 19:40:13+0200 [local] INFO: Done loading persisted scheduled job descriptions
2014-10-20 19:40:13+0200 [local] INFO: Done loading persisted alert rules
2014-10-20 19:40:13+0200 [local] INFO: Done initializing event storage.
2014-10-20 19:40:13+0200 [local] INFO: OpsCenter starting up.
2014-10-20 19:40:13+0200 [local] INFO: Version: {'search': None, 'jobtracker': None, 'tasktracker': None, 'spark': {u'master': None, u'version': None, u'worker': None}, 'dse': u'4.5.2', 'cassandra': u'2.0.10.71'}
2014-10-20 19:40:13+0200 [local] INFO: Node 127.0.0.1 changed its mode to normal
2014-10-20 19:40:15+0200 [local] INFO: Using 127.0.0.1 as the RPC address for node 127.0.0.1
2014-10-20 19:40:44+0200 [] INFO: Received SIGTERM, shutting down.
2014-10-20 19:40:44+0200 [local] INFO: OpsCenter shutting down.
2014-10-20 19:40:44+0200 [local] INFO: Stopping repair service
2014-10-20 19:40:44+0200 [] INFO: (TCP Port 61620 Closed)
2014-10-20 19:40:44+0200 [] INFO: (TCP Port 61619 Closed)
2014-10-20 19:40:44+0200 [] INFO: Stopping factory <morbid.morbid.StompFactory instance at 0x7fe237a41368>
2014-10-20 19:40:44+0200 [] INFO: (TCP Port 8888 Closed)
2014-10-20 19:40:44+0200 [] INFO: Stopping factory <opscenterd.WebServer.OpsCenterdWebServer instance at 0x7fe23a2ac128>
2014-10-20 19:40:44+0200 [local] INFO: Stopping CassandraCluster service
2014-10-20 19:40:44+0200 [local] ERROR: Error publishing event plugin "CassandraStore": Connection closed ([Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
])
2014-10-20 19:40:44+0200 [] INFO: Main loop terminated.
2014-10-20 19:40:44+0200 [] INFO: Server Shut Down.
2014-10-20 19:40:45+0200 [] INFO: Log opened.
2014-10-20 19:40:45+0200 [] INFO: twistd 10.2.0 (/usr/bin/python2.7 2.7.6) starting up.
2014-10-20 19:40:45+0200 [] INFO: reactor class: twisted.internet.epollreactor.EPollReactor.
2014-10-20 19:40:45+0200 [] INFO: set uid/gid 0/0
2014-10-20 19:40:45+0200 [] INFO: Logging level set to 'info'
2014-10-20 19:40:45+0200 [] INFO: OpsCenter version: 5.0.1
2014-10-20 19:40:45+0200 [] INFO: Compatible agent version: 5.0.1
2014-10-20 19:40:45+0200 [] INFO: Loading per-cluster config file ./conf/clusters/local.conf
2014-10-20 19:40:45+0200 [] INFO: HTTP BASIC authentication disabled
2014-10-20 19:40:45+0200 [] INFO: Starting webserver with ssl disabled.
2014-10-20 19:40:45+0200 [] INFO: Stats Reporter is connected via HTTP
2014-10-20 19:40:45+0200 [] INFO: SSL disabled
2014-10-20 19:40:45+0200 [] ERROR: Unable to import SSL, further definition actions will fail.
2014-10-20 19:40:45+0200 [] INFO: Starting Definition Update Service
2014-10-20 19:40:45+0200 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 8888
2014-10-20 19:40:45+0200 [] INFO: Starting factory <opscenterd.WebServer.OpsCenterdWebServer instance at 0x7f681b6bd128>
2014-10-20 19:40:45+0200 [] INFO: morbid.morbid.StompFactory starting on 61619
2014-10-20 19:40:45+0200 [] INFO: Starting factory <morbid.morbid.StompFactory instance at 0x7f6818e52368>
2014-10-20 19:40:45+0200 [] INFO: Configuring agent communication with ssl support disabled.
2014-10-20 19:40:45+0200 [] INFO: morbid.morbid.StompFactory starting on 61620
2014-10-20 19:40:45+0200 [] ERROR: No http agent exists, likely due to SSL import failure.
2014-10-20 19:40:45+0200 [local] INFO: Starting services for cluster local
2014-10-20 19:40:45+0200 [local] INFO: Loading event plugins
2014-10-20 19:40:45+0200 [local] INFO: Loading event plugin conf ./conf/event-plugins/posturl.conf
2014-10-20 19:40:45+0200 [local] INFO: Successfully loaded event plugin conf ./conf/event-plugins/posturl.conf
2014-10-20 19:40:45+0200 [local] INFO: Loading event plugin conf ./conf/event-plugins/email.conf
2014-10-20 19:40:45+0200 [local] INFO: Successfully loaded event plugin conf ./conf/event-plugins/email.conf
2014-10-20 19:40:45+0200 [local] INFO: Done loading event plugins
2014-10-20 19:40:45+0200 [] INFO: Metric caching enabled with 50 points and 1000 metrics cached
2014-10-20 19:40:45+0200 [] INFO: Starting PushService
2014-10-20 19:40:45+0200 [local] INFO: Starting CassandraCluster service
2014-10-20 19:40:45+0200 [local] INFO: agent_config items: {'cassandra_log_location': '/var/log/cassandra/system.log', 'thrift_port': 9160, 'jmx_pass': '*****', 'thrift_ssl_truststore': None, 'rollups86400_ttl': -1, 'api_port': '61621', 'use_ssl': 0, 'rollups7200_ttl': 31536000, 'kerberos_debug': False, 'storage_keyspace': 'OpsCenter', 'thrift_user': '', 'provisioning': 0, 'metrics_ignored_column_families': '', 'metrics_ignored_keyspaces': 'system, system_traces, system_auth, dse_auth, OpsCenter', 'jmx_user': '', 'cassandra_install_location': '', 'kerberos_use_keytab': True, 'rollups300_ttl': 2419200, 'thrift_pass': '*****', 'metrics_ignored_solr_cores': '', 'metrics_enabled': 1, 'kerberos_use_ticket_cache': True, 'thrift_ssl_truststore_type': 'JKS', 'rollups60_ttl': 604800, 'ec2_metadata_api_host': '169.254.169.254', 'kerberos_renew_tgt': True, 'thrift_ssl_truststore_password': '*****'}
2014-10-20 19:40:46+0200 [] INFO: OS Version: Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014
2014-10-20 19:40:46+0200 [] INFO: CPU Info: ['2666.774', '2666.774']
2014-10-20 19:40:46+0200 [] INFO: Mem Info: 2989MB
2014-10-20 19:40:46+0200 [local] INFO: Enterprise functionality: True
2014-10-20 19:40:46+0200 [local] INFO: Cluster Name: Test Cluster
2014-10-20 19:40:46+0200 [] INFO: Package Manager: aptitude
2014-10-20 19:40:46+0200 [local] INFO: Snitch: com.datastax.bdp.snitch.DseDelegateSnitch
2014-10-20 19:40:46+0200 [local] INFO: Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
2014-10-20 19:40:46+0200 [local] INFO: Recognizing new node 127.0.0.1 ('-8867774524416669848')
2014-10-20 19:40:46+0200 [local] INFO: Node 127.0.0.1 has multiple tokens (vnodes). Only one picked for display.
2014-10-20 19:40:46+0200 [local] INFO: Keyspaces: {'system_traces': CassandraKeyspace(name=system_traces, column_families=[], tables=[u'events', u'sessions'], attributes={'strategy_options': {'replication_factor': '2'}, 'replica_placement_strategy': 'org.apache.cassandra.locator.SimpleStrategy'}), 'OpsCenter': CassandraKeyspace(name=OpsCenter, column_families=['events_timeline', 'settings', 'rollups60', 'rollups86400', 'bestpractice_results', 'pdps', 'rollups7200', 'events', 'rollups300'], tables=[u'events_timeline', u'settings', u'rollups60', u'rollups86400', u'bestpractice_results', u'pdps', u'rollups7200', u'events', u'rollups300'], attributes={'strategy_options': {'replication_factor': '1'}, 'replica_placement_strategy': 'org.apache.cassandra.locator.SimpleStrategy'}), 'system': CassandraKeyspace(name=system, column_families=['IndexInfo', 'NodeIdInfo', 'schema_keyspaces', 'hints'], tables=[u'peers', u'range_xfers', u'schema_keyspaces', u'schema_columns', u'IndexInfo', u'schema_triggers', u'sstable_activity', u'peer_events', u'paxos', u'batchlog', u'NodeIdInfo', u'compaction_history', u'compactions_in_progress', u'schema_columnfamilies', u'local', u'hints'], attributes={'strategy_options': {}, 'replica_placement_strategy': 'org.apache.cassandra.locator.LocalStrategy'}), 'dse_system': CassandraKeyspace(name=dse_system, column_families=[], tables=[u'encrypted_keys', u'leases'], attributes={'strategy_options': {}, 'replica_placement_strategy': 'org.apache.cassandra.locator.EverywhereStrategy'})}
2014-10-20 19:40:46+0200 [local] INFO: Persisting agent configuration to Cassandra
2014-10-20 19:40:46+0200 [local] INFO: Initializing event storage.
2014-10-20 19:40:46+0200 [local] INFO: Attempting to load all persisted alert rules
2014-10-20 19:40:46+0200 [local] INFO: Done loading persisted alert rules
2014-10-20 19:40:46+0200 [local] INFO: Done initializing event storage.
2014-10-20 19:40:46+0200 [local] INFO: Done loading persisted scheduled job descriptions
2014-10-20 19:40:46+0200 [] INFO: Starting to update agents' configuration
2014-10-20 19:40:46+0200 [local] INFO: OpsCenter starting up.
2014-10-20 19:40:46+0200 [local] INFO: Version: {'search': None, 'jobtracker': None, 'tasktracker': None, 'spark': {u'master': None, u'version': None, u'worker': None}, 'dse': u'4.5.2', 'cassandra': u'2.0.10.71'}
2014-10-20 19:40:46+0200 [local] INFO: Node 127.0.0.1 changed its mode to normal
2014-10-20 19:40:48+0200 [local] INFO: Using 127.0.0.1 as the RPC address for node 127.0.0.1
2014-10-20 19:40:59+0200 [local] INFO: Agent for ip 127.0.0.1 is version u'5.0.1'
答案1
2014-10-20 19:40:12+0200 [] INFO: Loading per-cluster config file ./conf/clusters/local.conf
此行表明您正在使用 tarball 安装。在这种情况下,opscenter 使用位于安装目录中的配置文件,而不是 /etc/ 中的配置文件。