2016-03-23 93 views
3

我正試圖在Mesos上安裝Kafka。安裝似乎已經成功。Mesos DCOS不安裝Kafka

[email protected]:/dcos$ dcos package install kafka 
This will install Apache Kafka DCOS Service. 
Continue installing? [yes/no] yes 
Installing Marathon app for package [kafka] version [0.9.4.0] 
Installing CLI subcommand for package [kafka] version [0.9.4.0] 
New command available: dcos kafka 
The Apache Kafka DCOS Service is installed: 
    docs - https://github.com/mesos/kafka 
    issues - https://github.com/mesos/kafka/issues 

[email protected]:/dcos$ dcos package list 
NAME VERSION APP  COMMAND DESCRIPTION 
kafka 0.9.4.0 /kafka kafka Apache Kafka running on top of Apache Mesos 

但是kafka任務未啓動。

[email protected]:/dcos$ dcos kafka 
Error: Kafka is not running 
[email protected]:/dcos$ 

Marathon UI說服務是waiting。看起來它不接受分配給它的資源。更多日誌here

Mar 23 03:52:59 ip-10-0-4-194.ec2.internal java[1425]: [2016-03-23 03:52:59,335] INFO Offer ID: [54f71504-b37a-4954-b082-e1f2a04b7fa4-O77]. Considered resources with roles: [*]. Not all basic resources satisfied: cpu not in offer, disk SATISFIED (0.0 <= 0.0), mem not in offer (mesosphere.mesos.ResourceMatcher$:marathon-akka.actor.default-dispatcher-11) 
Mar 23 03:52:59 ip-10-0-4-194.ec2.internal java[1425]: [2016-03-23 03:52:59,370] INFO Offer [54f71504-b37a-4954-b082-e1f2a04b7fa4-O77]. Insufficient resources for [/kafka] (need cpus=0.5, mem=307.0, disk=0.0, ports=(1 dynamic), available in offer: [id { value: "54f71504-b37a-4954-b082-e1f2a04b7fa4-O77" } framework_id { value: "54f71504-b37a-4954-b082-e1f2a04b7fa4-0000" } slave_id { value: "54f71504-b37a-4954-b082-e1f2a04b7fa4-S1" } hostname: "10.0.4.190" resources { name: "ports" type: RANGES ranges { range { begin: 1 end: 21 } range { begin: 23 end: 5050 } range { begin: 5052 end: 32000 } } role: "slave_public" } resources { name: "cpus" type: SCALAR scalar { value: 4.0 } role: "slave_public" } resources { name: "mem" type: SCALAR scalar { value: 14019.0 } role: "slave_public" } resources { name: "disk" type: SCALAR scalar { value: 32541.0 } role: "slave_public" } attributes { name: "public_ip" type: TEXT text { value: "true" } } url { scheme: "http" address { hostname: "10.0.4.190" ip: "10.0.4.190" port: 5051 } path: "/slave(1)" }] (mesosphere.mesos.TaskBuilder:marathon-akka.actor.default-dispatcher-11) 

Mesos主日誌..

Mar 23 15:38:22 ip-10-0-4-194.ec2.internal mesos-master[1371]: I0323 15:38:22.339759 1376 master.cpp:5350] Sending 2 offers to framework 54f71504-b37a-4954-b082-e1f2a04b7fa4-0000 (marathon) at [email protected]:60450 
Mar 23 15:38:22 ip-10-0-4-194.ec2.internal mesos-master[1371]: I0323 15:38:22.341790 1381 master.cpp:3673] Processing DECLINE call for offers: [ 54f71504-b37a-4954-b082-e1f2a04b7fa4-O373 ] for framework 54f71504-b37a-4954-b082-e1f2a04b7fa4-0000 (marathon) at [email protected]:60450 
Mar 23 15:38:22 ip-10-0-4-194.ec2.internal mesos-master[1371]: I0323 15:38:22.342041 1381 master.cpp:3673] Processing DECLINE call for offers: [ 54f71504-b37a-4954-b082-e1f2a04b7fa4-O374 ] for framework 54f71504-b37a-4954-b082-e1f2a04b7fa4-0000 (marathon) at [email protected]:60450 

不知道爲什麼馬拉松不喜歡這樣的報價。我確信有足夠的資源。

+0

您使用的是什麼實例類型? –

+0

m3.xlarge適用於所有從站和主站。我認爲Gabriel的回答是正確的。 – Cheeko

回答

4

馬拉松正在等待有足夠資源的報價給卡夫卡調度員。它拒絕的報價似乎沒有任何cpu或內存。您看到的具有足夠資源的優惠已經爲角色「slave_public」靜態保留。

卡夫卡調度程序將與角色*一起運行。您的羣集在默認角色*中缺乏足夠的資源。這是與私人奴隸相關的角色。

您應該查看mesos/state並查看具有「*」角色的可用資源。

+0

你說得對。我確實關閉了所有私人實例。我希望卡夫卡經紀人擁有公共IP,以便我可以從我的開發機器訪問它。有沒有辦法告訴卡夫卡調度器使用「slave_public」角色? – Cheeko

+0

'DCOS包安裝卡夫卡--options = /路徑/要/ options.json' '$貓options.json { 「海邊的卡夫卡」:{ 「框架角色」: 「slave_public」 } }' 以上可能工作。如果這不起作用,那麼您將不得不從集羣內部或通過VPN訪問Kafka。 – Gabriel

+0

這沒有奏效。它仍然試圖尋找「*」角色的資源。 – Cheeko