我使用 CCM 安装了一个 4 节点本地集群(127.0.0.1-127.0.0.4)。
ccm create -v 2.1.5 -n 4 gp
我正在尝试手动安装代理以使用 OpsCenter (5.2.3.2015121015)。我启动 OpsCenter 删除了 JMX 端口,所以配置是
[jmx]
username =
password =
[agents]
[cassandra]
username =
seed_hosts = 127.0.0.1,127.0.0.2,127.0.0.3,127.0.0.4
password =
cql_port = 9042
我已经配置了所有四个代理。例如agent3配置是
[Giampaolo]: ~/opscenter/> cat agent3/conf/address.yaml
stomp_interface: "127.0.0.1"
agent_rpc_interface: 127.0.0.3
jmx_host: 127.0.0.3
jmx_port: 7300
我在前台启动了 OpsCenter,但出现此错误。当我启动agent4时,我有这个错误:
2015-12-30 17:46:21+0100 [gp] ERROR: The state of the following nodes could not be determined, most likely due to agents on those nodes not being properly connected: [<Node 127.0.0.4='4611686018427387904'>, <Node 127.0.0.3='0'>, <Node 127.0.0.2='-4611686018427387904'>, <Node 127.0.0.1='-9223372036854775808'>]
2015-12-30 17:46:24+0100 [gp] INFO: Agent for ip 127.0.0.4 is version None
2015-12-30 17:46:24+0100 [gp] INFO: Agent for ip 127.0.0.4 is version u'5.2.3'
2015-12-30 17:46:37+0100 [gp] INFO: Nodes without agents: 127.0.0.3, 127.0.0.2, 127.0.0.1
2015-12-30 17:46:51+0100 [gp] ERROR: The state of the following nodes could not be determined, most likely due to agents on those nodes not being properly connected: [<Node 127.0.0.4='4611686018427387904'>, <Node 127.0.0.3='0'>, <Node 127.0.0.2='-4611686018427387904'>, <Node 127.0.0.1='-9223372036854775808'>]
我对第一个日志告诉我找到了 4 个代理这一事实感到有些困惑,而过了一会儿我在控制台上出现了错误。
代理 4 日志一开始就告诉我没有错误(只有 INFO 严重性):
[Giampaolo]: ~/opscenter/>agent4/bin/datastax-agent -f
INFO [main] 2015-12-30 17:46:20,399 Loading conf files: ./conf/address.yaml
INFO [main] 2015-12-30 17:46:20,461 Java vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.8.0_40
INFO [main] 2015-12-30 17:46:20,462 DataStax Agent version: 5.2.3
INFO [main] 2015-12-30 17:46:20,489 Default config values: {:cassandra_port 9042, :rollups300_ttl 2419200, :finished-request-cache-size 100, :settings_cf "settings", :agent_rpc_interface "127.0.0.4", :restore_req_update_period 60, :my_channel_prefix "/agent", :poll_period 60, :monitored_cassandra_pass "*REDACTED*", :thrift_conn_timeout 10000, :cassandra_pass "*REDACTED*", :rollups60_ttl 604800, :stomp_port 61620, :shorttime_interval 10, :longtime_interval 300, :max-seconds-to-sleep 25, :private-conf-props {:cassandra.yaml #{"broadcast_address" "rpc_address" "broadcast_rpc_address" "listen_address" "initial_token"}, :cassandra-rackdc.properties #{}}, :thrift_port 9160, :agent-conf-group "global-cluster-agent-group", :jmx_host "127.0.0.4", :ec2_metadata_api_host "169.254.169.254", :metrics_enabled 1, :async_queue_size 5000, :backup_staging_dir nil, :remote_verify_max 30000, :disk_usage_update_period 60, :throttle-bytes-per-second 500000, :rollups7200_ttl 31536000, :trace_delay 300, :remote_backup_retries 3, :cassandra_user "*REDACTED*", :ssl_keystore nil, :rollup_snapshot_period 300, :is_package false, :monitor_command "/usr/share/datastax-agent/bin/datastax_agent_monitor", :thrift_socket_timeout 5000, :remote_verify_initial_delay 1000, :cassandra_log_location "/var/log/cassandra/system.log", :restore_on_transfer_failure false, :ssl_keystore_password "*REDACTED*", :tmp_dir "/var/lib/datastax-agent/tmp/", :monitored_thrift_port 9160, :config_md5 nil, :jmx_port 7400, :jmx_metrics_threadpool_size 4, :use_ssl 0, :max_pending_repairs 5, :rollups86400_ttl 0, :monitored_cassandra_user "*REDACTED*", :nodedetails_threadpool_size 3, :api_port 61621, :monitored_ssl_keystore nil, :slow_query_fetch_size 2000, :kerberos_service nil, :backup_file_queue_max 10000, :jmx_thread_pool_size 5, :production 1, :monitored_cassandra_port 9042, :runs_sudo 1, :max_file_transfer_attempts 30, :config_encryption_active false, :running-request-cache-size 500, :monitored_ssl_keystore_password "*REDACTED*", :stomp_interface "127.0.0.1", :storage_keyspace "OpsCenter", :hosts ["127.0.0.1"], :rollup_snapshot_threshold 300, :jmx_retry_timeout 30, :unthrottled-default 10000000000, :multipart-chunk-size 5000000, :remote_backup_retry_delay 5000, :sstableloader_max_heap_size nil, :jmx_operations_pool_size 4, :slow_query_refresh 5, :remote_backup_timeout 1000, :slow_query_ignore ["OpsCenter" "dse_perf"], :max_reconnect_time 15000, :seconds-to-read-kill-channel 0.005, :slow_query_past 3600000, :realtime_interval 5, :pdps_ttl 259200}
INFO [main] 2015-12-30 17:46:20,492 Waiting for the config from OpsCenter
INFO [main] 2015-12-30 17:46:20,493 Attempting to determine Cassandra's broadcast address through JMX
INFO [main] 2015-12-30 17:46:20,494 Starting Stomp
INFO [main] 2015-12-30 17:46:20,495 Starting up agent communcation with OpsCenter.
INFO [main] 2015-12-30 17:46:24,595 Reconnecting to a backup OpsCenter instance
INFO [main] 2015-12-30 17:46:24,597 SSL communication is disabled
INFO [main] 2015-12-30 17:46:24,597 Creating stomp connection to 127.0.0.1:61620
INFO [StompConnection receiver] 2015-12-30 17:46:24,603 Reconnecting in 0s.
INFO [StompConnection receiver] 2015-12-30 17:46:24,608 Connected to 127.0.0.1:61620
INFO [main] 2015-12-30 17:46:24,609 Starting Jetty server: {:join? false, :ssl? false, :host "127.0.0.4", :port 61621}
INFO [Initialization] 2015-12-30 17:46:24,608 Sleeping for 2s before trying to determine IP over JMX again
INFO [StompConnection receiver] 2015-12-30 17:46:24,681 Got new config from OpsCenter [note values in address.yaml override those from OpsCenter]: {:cassandra_port 9042, :rollups300_ttl 2419200, :destinations [], :restore_req_update_period 1, :monitored_cassandra_pass "*REDACTED*", :cassandra_pass "*REDACTED*", :cassandra_rpc_interface "127.0.0.4", :rollups60_ttl 604800, :jmx_pass "*REDACTED*", :thrift_port 9160, :ec2_metadata_api_host "169.254.169.254", :metrics_enabled 1, :backup_staging_dir "", :rollups7200_ttl 31536000, :cassandra_user "*REDACTED*", :jmx_user "*REDACTED*", :metrics_ignored_column_families "", :cassandra_log_location "/var/log/cassandra/system.log", :monitored_thrift_port 9160, :config_md5 "e78e9aaea4de0b15ec94b11c6b2788d5", :provisioning 0, :use_ssl 0, :max_pending_repairs 5, :rollups86400_ttl -1, :monitored_cassandra_user "*REDACTED*", :api_port "61621", :monitored_cassandra_port 9042, :storage_keyspace "OpsCenter", :hosts ["127.0.0.4"], :metrics_ignored_solr_cores "", :metrics_ignored_keyspaces "system, system_traces, system_auth, dse_auth, OpsCenter", :rollup_subscriptions [], :jmx_operations_pool_size 4, :cassandra_install_location ""}
INFO [StompConnection receiver] 2015-12-30 17:46:24,693 Couldn't get broadcast address, will retry in five seconds.
INFO [Jetty] 2015-12-30 17:46:24,715 Jetty server started
INFO [Initialization] 2015-12-30 17:46:26,615 Sleeping for 4s before trying to determine IP over JMX again
INFO [StompConnection receiver] 2015-12-30 17:46:29,696 Couldn't get broadcast address, will retry in five seconds.
但是过了一会儿:
INFO [qtp153482676-24] 2015-12-30 17:49:07,057 HTTP: :get /cassandra/conf {:private_props "True"} - 500
ERROR [qtp153482676-24] 2015-12-30 17:49:09,084 Unhandled route Exception (:bad-permissions): Unable to locate the cassandra.yaml configuration file. If your configuration file is not located with the Cassandra install, please set the 'conf_location' option in the Cassandra section of the OpsCenter cluster configuration file and restart opscenterd. Checked the following locations: /etc/dse/cassandra/cassandra.yaml, /etc/cassandra/conf/cassandra.yaml, /etc/cassandra/cassandra.yaml
INFO [qtp153482676-24] 2015-12-30 17:49:09,085 HTTP: :get /cassandra/conf {:private_props "True"} - 500
INFO [StompConnection receiver] 2015-12-30 17:49:09,845 Couldn't get broadcast address, will retry in five seconds.
ERROR [qtp153482676-19] 2015-12-30 17:49:11,102 Unhandled route Exception (:bad-permissions): Unable to locate the cassandra.yaml configuration file. If your configuration file is not located with the Cassandra install, please set the 'conf_location' option in the Cassandra section of the OpsCenter cluster configuration file and restart opscenterd. Checked the following locations: /etc/dse/cassandra/cassandra.yaml, /etc/cassandra/conf/cassandra.yaml, /etc/cassandra/cassandra.yaml
在此之后我尝试添加其他代理,但我得到了奇怪的结果。像两个代理将进入同一个 C* 节点,所以在我认为这个错误会导致其他错误之前我已经停止尝试。
问题:
- OpsCenter 日志的错误是什么?
- 它是否与代理日志上的错误有关?
- 我在配置上遗漏了什么(需要更多细节吗?)
- 为什么 OpsCenter 抱怨缺少 cassandra.yaml 文件?即使没有本地 C* 安装,它也不应该部署在任何主机上吗?
提前致谢
编辑 我添加了一些附加信息:
[Giampaolo]: ~/> netstat -an | grep 7400
tcp4 0 0 127.0.0.1.7400 *.* LISTEN
应该是127.0.0.4
吗?
这是 node4 的(部分)配置:
[Giampaolo]: ~/.ccm/gp/node4/conf/> cat cassandra.yaml | grep 127
listen_address: 127.0.0.4
rpc_address: 127.0.0.4
- seeds: 127.0.0.1,127.0.0.2,127.0.0.3,127.0.0.4
这是address.yaml
针对node4的:
[Giampaolo]: ~/opscenter/agent4/conf/> cat address.yaml
stomp_interface: "127.0.0.1"
agent_rpc_interface: 127.0.0.4
jmx_host: 127.0.0.4
jmx_port: 7400
alias: "the4node"