我将在apache mesos上设置一个kafka集群。我遵循kafka-mesos on github的说明。我安装了一个mesos集群(使用不带马拉松的Mesosphere ),每个节点有3个节点,每个节点有2个CPU和4 4GB内存。我使用hello world示例成功地测试了集群。
我可以在它上面运行kafka-mesos调度器,并可以向它添加代理。但是当我想启动代理时,会出现一个内存限制。
broker-191-.... TASK_FAILED slave:#c3-S1 reason:REASON_MEMORY_LIMIT虽然集群有12 1GB的内存,但是代理只需要3 1GB的内存和1 1GB的堆。(我测试了从512M到3 3GB的各种配置,但没有正常工作)
有什么问题吗?解决方案是什么?
完整的故事在这里:
2015-10-17 17:39:24,748 [Jetty-17] INFO ly.stealth.mesos.kafka.HttpServer$ - handling - http://192.168.11.191:7000/api/broker/start
2015-10-17 17:39:28,202 [Thread-605] INFO ly.stealth.mesos.kafka.Scheduler$ - [resourceOffers]
mesos-2#O1160 cpus:2.00 mem:4098.00 disk:9869.00 ports:[31000..32000]
mesos-3#O1161 cpus:2.00 mem:4098.00 disk:9869.00 ports:[31000..32000]
mesos-1#O1162 cpus:2.00 mem:4098.00 disk:9869.00 ports:[31000..32000]
2015-10-17 17:39:28,204 [Thread-605] INFO ly.stealth.mesos.kafka.Scheduler$ - Starting broker 191: launching task broker-191-0abe9e57-b0fb-4d87-a1b4-529acb111940 by offer mesos-2#O1160
broker-191-0abe9e57-b0fb-4d87-a1b4-529acb111940 slave:#c6-S3 cpus:1.00 mem:3096.00 ports:[31000..31000] data:defaults=broker.id\=191\,log.dirs\=kafka-logs\,port\=31000\,zookeeper.connect\=192.168.11.191:2181\\\,192.168.11.192:2181\\\,192.168.11.193:2181\,host.name\=mesos-2\,log.retention.bytes\=10737418240,broker={"stickiness" : {"period" : "10m"\, "stopTime" : "2015-10-17 13:43:29.278"}\, "id" : "191"\, "mem" : 3096\, "cpus" : 1.0\, "heap" : 1024\, "failover" : {"delay" : "1m"\, "maxDelay" : "10m"}\, "active" : true}
2015-10-17 17:39:28,417 [Thread-606] INFO ly.stealth.mesos.kafka.Scheduler$ - [statusUpdate] broker-191-0abe9e57-b0fb-4d87-a1b4-529acb111940 TASK_FAILED slave:#c6-S3 reason:REASON_MEMORY_LIMIT
2015-10-17 17:39:28,418 [Thread-606] INFO ly.stealth.mesos.kafka.Scheduler$ - Broker 191 failed 1, waiting 1m, next start ~ 2015-10-17 17:40:28+03
2015-10-17 17:39:29,202 [Thread-607] INFO ly.stealth.mesos.kafka.Scheduler$ - [resourceOffers]我在Mesos主日志中发现了以下内容:
...validation.cpp:422] Executor broker-191-... for task broker-191-... uses less CPUs (None) than the minimum required (0.01). Please update your executor, as this will be mandatory in future releases.
...validation.cpp:434] Executor broker-191-... for task broker-191-... uses less memory (None) than the minimum required (32MB). Please update your executor, as this will be mandatory in future releases.但是我通过broker add (Update)为代理设置了CPU和MEM:
broker updated:
id: 191
active: false
state: stopped
resources: cpus:1.00, mem:2048, heap:1024, port:auto
failover: delay:1m, max-delay:10m
stickiness: period:10m, expires:2015-10-19 11:15:53+03发布于 2015-10-19 10:11:16
executor不会获取堆设置,只会获取broker。我为这个https://github.com/mesos/kafka/issues/137打开了一个问题。请增加内存,直到有补丁可用。
我怀疑这不是一个问题,因为内存被设置为一个更大的值(读取时您不希望命中磁盘的数据集的大小),因此有页面缓存来实现最大效率http://kafka.apache.org/documentation.html#maximizingefficiency
https://stackoverflow.com/questions/33187684
复制相似问题