-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brokers don't start #240
Comments
The problem was that I was running {
"id": "/service/kafka",
"cmd": "./kafka-mesos.sh scheduler --master=zk://192.168.1.1:2181/mesos --zk=192.168.1.1:2181 --api=http://svc01:7000 --storage=zk:/kafka-mesos --debug=true",
"cpus": 0.5,
"mem": 256,
"disk": 0,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "kafka-mesos:1.0.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 7000,
"hostPort": 0,
"servicePort": 10079,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 7001,
"hostPort": 0,
"servicePort": 10080,
"protocol": "tcp",
"labels": {}
}
],
"privileged": false,
}
},
"env": {
"LIBPROCESS_PORT": "7001" // communication with mesos master
},
"labels": {
"HAPROXY_0_PORT": "7000", // public http API
},
} then we need to patch if [ -n "${HOST}" ]; then
export LIBPROCESS_ADVERTISE_IP=$(getent hosts ${HOST} | awk '{ print $1 }')
export LIBPROCESS_ADVERTISE_PORT=${PORT1}
fi which ensures that some random ports assigned by Marathon will be mapped to Docker:
This was |
Something related to this issue: d2iq-archive/marathon#4216 |
Hi @deric, I've tried that and kafka scheduler has registered with mesos, but when I started broker, my broker can't download jar from kafka scheduler due to api port wrong (it still 7000).
port mapping How can I advertise api port like libprocess port? |
@CBR09 We use marathon-lb (haproxy) for accessing apps running in Mesos cluster. But any service discovery (like mesos-dns) could be used. |
Thank @deric : so if I use any service discovery (mesos-dns or marathon-lb), does my broker will find kafka-scheduler?, can you please explain how it work ? |
@CBR09 Yeah, that should do it. Just make sure you'll pass flag |
@deric I still confused, when I use mesos-dns, I can use command line to resolving domain name to the IP of mesos slave on which kafka-scheduler is running, and the exposed port (31960 in this case), but I don't know how to use this in marathon json?. I don't know exposed port unless I define it in hostPort field. |
So, if I understand what you're asking, there is currently no way to do it. There's no support in the scheduler to advertise one port (for resource downloading for example) while listening on another. Support for NAT (or PAT in your case) would be nice to have, and I'd love to see a pull request adding it. :) |
Yes, that's what I want to ask, thank you for your confirmation. If I can, I will |
I've followed the examples, but
kafka-mesos
isn't launching any tasks on Mesos:Scheduler returns follwing:
badMessage: 400 for HttpChannelOverHttp@21e29795{r=0,a=IDLE,uri=-}WrappedArray()
The only strange message in logs:
I'm using
kafka-mesos-0.9.5.1.jar
.The text was updated successfully, but these errors were encountered: