I'm using mesos and marathon to deploy a container of Kibana 4. The JSON to deploy is:
{
"id": "/org/products/kibana/webapp",
"instances": 1,
"cpus": 1,
"mem": 768,
"uris": [],
"constraints": [
["hostname", "UNIQUE"]
],
"upgradeStrategy": {
"minimumHealthCapacity": 0.5
},
"healthChecks": [
{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"initialDelaySeconds": 600,
"gracePeriodSeconds": 10,
"intervalSeconds": 30,
"timeoutSeconds": 120,
"maxConsecutiveFailures": 10
}
],
"env": {
"ES_HOST":"172.23.10.23",
"ES_PORT":"9200"
},
"container": {
"type": "DOCKER",
"docker": {
"image": "myregistry.local.com:5000/org/kibana:4.0.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 5601,
"hostPort": 0,
"servicePort": 50061,
"protocol": "tcp"
}
]
},
"volumes": [
{
"containerPath": "/etc/localtime",
"hostPath": "/etc/localtime",
"mode": "RO"
}
]
}
}
But when I post it, the kibana app never wake up and the stderr log is:
I0227 12:22:44.666357 1149 exec.cpp:132] Version: 0.21.1
I0227 12:22:44.669059 1178 exec.cpp:206] Executor registered on slave 20150225-040104-1124079532-5050-952-S0
/kibana/src/index.js:58
throw error;
^
Error: listen EADDRNOTAVAIL
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1024:19)
at listen (net.js:1065:10)
at net.js:1147:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
After that I try to eliminate a port mapping, because I found some references indicating that it's an port or network configuration problem. Then my Kibana 4 web app wake up fine, but I need configure a port-mapping to access via HTTP. I have not idea at about why marathon has problem with network and portMappings config. Some help will be appreciated.