2015-12-30 50 views
1

我使用CCM安裝了4個節點本地羣集(127.0.0.1-127.0.0.4)。使用CCM與Opscenter和手動代理安裝

ccm create -v 2.1.5 -n 4 gp 

我試圖手動安裝代理以使用OpsCenter(5.2.3.2015121015)。我開始刪除JMX端口的OpsCenter,所以配置是

[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和我有這樣的錯誤。當我開始劑4我有這樣的錯誤:

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 *節點,所以我在停止嘗試之前就認爲這個錯誤會導致其他錯誤。

問題:

  1. 什麼是錯誤的OpsCenter是日誌?
  2. 它是否與代理日誌上的錯誤有關?
  3. 我是否缺少配置(需要更多詳細信息?)
  4. 爲什麼OpsCenter抱怨缺少cassandra.yaml文件?不應該在任何主機上部署,即使它沒有本地C *安裝?

在此先感謝

編輯 我增加了一些額外的信息:

[Giampaolo]: ~/> netstat -an | grep 7400 
tcp4  0  0 127.0.0.1.7400   *.*     LISTEN 

應該127.0.0.4

這對於節點4(的部分)的配置:

[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對於節點4:

[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" 
+0

OpsCenter中建議使用卡桑德拉密鑰空間來存儲所有的變量,所以它需要一個C *安裝。 – LHWizard

+0

實際上,它會在使用CCM創建的集羣的第一個節點上創建一個新的密鑰空間。它需要另外安裝嗎? – giampaolo

+0

代理從jmx收集cassandra.yaml的位置。它也使用它來獲取要連接的廣播地址。我認爲如果jmx失敗,你會期望所有這些錯誤。您可以驗證node4的jmx連接是否正在使用netstat -anp |進行監聽grep 7400'''?它應該顯示一個127.0.0.4。也只是爲了仔細檢查,你可以發佈node4的address.yaml? –

回答

0

的配置是確定的,除了一個小細節。對於每一個代理,在address.yaml文件,localhost必須使用的,而不是在127.0.0.1參數jmx_host作爲cassandra user mailing list