我正在用docker在本地机器上安装mesos。我读了这个教程,做了一些改动,因为我使用的是docker for mac。我的想法是把Zookeeper,主人,马拉松和奴隶放在一个网络中进行交流。
我所拥有的是主节点已经识别出从节点(我在下面的图中说明),但我的问题是一个简单的应用程序无法部署 "hello" >> /tmp/1543Feb19.txt
而马拉松已经说了0/1的例子与黄灯。
我已经检查了网络,检查这些容器是否可以通信,但看起来它们可以。
"Containers": {
"3d5497bfd7bcde3cbad3113c906628099c7c487fc860a40e301c963630569375": {
"Name": "marathon",
"EndpointID": "05c4d28d9663df2f2af333d472096082079eef4c8d435dc1db915b795fabd1a7",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/16",
"IPv6Address": ""
},
"3e72bd6beadd954ec78d3f6ce838f8748408fe6f09b7846e3bcdeb4e938cd138": {
"Name": "master",
"EndpointID": "93b32998a2eb3b4d3ab6f39abd13f65c98515eaf2a38f25d12e4c3926032fe16",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"46cefc46c6d82d21d60a5d0959140307931d226490dfb739223195b99f82fe2f": {
"Name": "zookeeper",
"EndpointID": "f91eccae086f3461dbd4620bd93b636b6c63fc5f9118f753e28735c746445869",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
},
"d626436646874e0b81871b567f951751a5b34c2f45a09869ee614adcc9731159": {
"Name": "slave_1",
"EndpointID": "8b86d7878a44273a7bd94b31d12c10c8ebfe767b79e9a4c8c0ede2f7a8af49ea",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/16",
"IPv6Address": ""
}
},
我就是这样跑马拉松的( 172.18.0.2
是Zookeeper的ip)
docker run -d -p 8080:8080 --net="my-tiny-cluster" \
--name="marathon" "garland/mesosphere-docker-marathon" \
--master zk://172.18.0.2:2181/mesos --zk zk://172.18.0.2:2181/marathon
我的问题是我错过了什么东西来正常运行?谢谢。
更新:日志
主节点:
I0226 06:34:35.071885 9 master.cpp:3068] Registering slave at slave(1)@172.18.0.5:5051 (d62643664687) with id 20170226-053009-50336428-5050-1-S0
I0226 06:34:35.073649 15 registrar.cpp:445] Applied 1 operations in 185687ns; attempting to update the 'registry'
I0226 06:34:35.074841 15 registrar.cpp:490] Successfully updated the 'registry' in 1.059072ms
I0226 06:34:35.077747 15 master.cpp:3122] Registered slave 20170226-053009-50336428-5050-1-S0 at slave(1)@172.18.0.5:5051 (d62643664687) with cpus(*):2; mem(*):999; disk(*):55325; ports(*):[31000-32000]
I0226 06:34:35.078001 16 hierarchical_allocator_process.hpp:442] Added slave 20170226-053009-50336428-5050-1-S0 (d62643664687) with cpus(*):2; mem(*):999; disk(*):55325; ports(*):[31000-32000] (and cpus(*):2; mem(*):999; disk(*):55325; ports(*):[31000-32000] available)
马拉松赛跑:
I0227 19:29:52.714860 38 group.cpp:349] Group process (group(1)@172.18.0.5:33909) connected to ZooKeeper
I0227 19:29:52.715006 38 group.cpp:837] Syncing group operations: queue size (joins, cancels, datas) = (0, 0, 0)
I0227 19:29:52.715059 38 group.cpp:427] Trying to create path '/mesos' in ZooKeeper
I0227 19:29:52.716549 38 detector.cpp:152] Detected a new leader: (id='5')
I0227 19:29:52.716820 40 group.cpp:706] Trying to get '/mesos/info_0000000005' in ZooKeeper
W0227 19:29:52.717524 36 zookeeper.cpp:221] Leading master master@172.18.0.3:5050 is using a Protobuf binary format when registering with ZooKeeper (info): this will be deprecated as of Mesos 0.24 (see MESOS-2340)
I0227 19:29:52.717629 36 zookeeper.cpp:259] A new leading master (UPID=master@172.18.0.3:5050) is detected
I0227 19:29:52.717713 36 sched.cpp:330] New master detected at master@172.18.0.3:5050
[2017-02-20 21:07:22,930] INFO Requesting task reconciliation with the Mesos master (mesosphere.marathon.MarathonScheduler:299)
[2017-02-20 21:07:22,933] INFO Need to scale test01 from 0 up to 1 instances (mesosphere.marathon.MarathonScheduler:338)
[2017-02-20 21:07:22,933] INFO Already queued 1 tasks for test01. Not scaling. (mesosphere.marathon.MarathonScheduler:349)
[2017-02-20 21:07:52,924] INFO Syncing tasks for all apps (mesosphere.marathon.MarathonScheduler:282)
[2017-02-20 21:07:52,925] INFO Requesting task reconciliation with the Mesos master (mesosphere.marathon.MarathonScheduler:299)
第二的
I0221 01:11:23.349058 12 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723675115374884days
I0221 01:12:23.350314 12 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723674663006701days
I0221 01:13:23.352875 12 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723674663006701days
I0221 01:14:23.355108 11 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723674210638518days
I0221 01:15:23.356853 11 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723674210638518days
I0221 01:16:23.358719 11 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723674210638518days
I0221 01:17:23.360033 11 slave.cpp:3321] Current usage 22.52%. Max allowed age: 4.723673758270336days
Zookeeper
2017-02-26 05:30:22,611 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@928] - Client attempting to establish new session at /172.18.0.4:46344
2017-02-26 05:30:22,626 [myid:] - INFO [SyncThread:0:ZooKeeperServer@673] - Established session 0x15a78e5b7110003 with negotiated timeout 10000 for client /172.18.0.4:46344
2017-02-26 05:30:23,384 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /172.18.0.4:46346
2017-02-26 05:30:23,390 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@882] - Connection request from old client /172.18.0.4:46346; will be dropped if server is in r-o mode
2017-02-26 05:30:23,390 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@928] - Client attempting to establish new session at /172.18.0.4:46346
2017-02-26 05:30:23,407 [myid:] - INFO [SyncThread:0:ZooKeeperServer@673] - Established session 0x15a78e5b7110004 with negotiated timeout 10000 for client /172.18.0.4:46346
2017-02-26 06:34:34,432 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /172.18.0.5:58000
2017-02-26 06:34:34,440 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@882] - Connection request from old client /172.18.0.5:58000; will be dropped if server is in r-o mode
2017-02-26 06:34:34,440 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@928] - Client attempting to establish new session at /172.18.0.5:58000
2017-02-26 06:34:34,468 [myid:] - INFO [SyncThread:0:ZooKeeperServer@673] - Established session 0x15a78e5b7110005 with negotiated timeout 10000 for client /172.18.0.5:58000
2017-02-26 06:36:17,295 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@649] - Got user-level KeeperException when processing sessionid:0x15a78e5b7110003 type:create cxid:0x58b26927 zxid:0xcd txntype:-1 reqpath:n/a Error Path:/marathon Error:KeeperErrorCode = NodeExists for /marathon
2017-02-26 06:36:17,307 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@649] - Got user-level KeeperException when processing sessionid:0x15a78e5b7110003 type:create cxid:0x58b26928 zxid:0xce txntype:-1 reqpath:n/a Error Path:/marathon/state Error:KeeperErrorCode = NodeExists for /marathon/state
更新:如何运行马拉松容器
docker run --net="my-tiny-cluster" --ip="172.18.0.4" \
-p 8080:8080 \
-e "LIBPROCESS_IP=172.18.0.4" \
-d \
--name="marathon" "garland/mesosphere-docker-marathon" \
--master "zk://172.18.0.2:2181/mesos" --zk "zk://172.18.0.2:2181/marathon"
暂无答案!
目前还没有任何答案,快来回答吧!