d2iq-archive / universe

The Mesosphere Universe package repository.
http://mesosphere.github.io/universe
Apache License 2.0
306 stars 427 forks source link

kafka package -- master.mesos port 80? #665

Open luhkevin opened 8 years ago

luhkevin commented 8 years ago

I've been running a DCOS cluster and playing around with the kafka framework. Is it true that it must connect to the mesos master on port 80? I was running the default_server of my adminrouter on a non-default port (8081) through the nginx.conf and was getting an error that was preventing the broker from being created:

ERROR [2016-08-26 04:55:48,858] com.mesosphere.dcos.kafka.plan.KafkaUpdateBlock: Error getting offerRequirement: 
! java.net.ConnectException: Connection refused
! at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_91]
! at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_91]
! at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_91]
! at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_91]
! at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_91]
! at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_91]
! at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) ~[httpclient-4.5.2.jar:4.5.2]
! ... 19 common frames omitted
! Causing: org.apache.http.conn.HttpHostConnectException: Connect to master.mesos:80 [master.mesos/192.168.1.4] failed: Connection refused
! at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.2.jar:4.5.2]
! at org.apache.http.client.fluent.Request.internalExecute(Request.java:173) ~[fluent-hc-4.5.2.jar:4.5.2]
! at org.apache.http.client.fluent.Request.execute(Request.java:177) ~[fluent-hc-4.5.2.jar:4.5.2]
! at org.apache.mesos.dcos.DcosCluster.getDcosVersion(DcosCluster.java:37) ~[dcos-commons-0.4.29-SNAPSHOT.jar:na]
! at org.apache.mesos.dcos.Capabilities.supportsNamedVips(Capabilities.java:17) ~[dcos-commons-0.4.29-SNAPSHOT.jar:na]
! at com.mesosphere.dcos.kafka.offer.PersistentOfferRequirementProvider.getNewOfferRequirementInternal(PersistentOfferRequirementProvider.java:408) ~[kafka-scheduler.jar:na]
! at com.mesosphere.dcos.kafka.offer.PersistentOfferRequirementProvider.getNewOfferRequirement(PersistentOfferRequirementProvider.java:52) ~[kafka-scheduler.jar:na]
! at com.mesosphere.dcos.kafka.plan.KafkaUpdateBlock.getOfferRequirement(KafkaUpdateBlock.java:208) ~[kafka-scheduler.jar:na]
! at com.mesosphere.dcos.kafka.plan.KafkaUpdateBlock.start(KafkaUpdateBlock.java:85) ~[kafka-scheduler.jar:na]
! at org.apache.mesos.scheduler.plan.DefaultStageScheduler.resourceOffers(DefaultStageScheduler.java:59) [dcos-commons-0.4.29-SNAPSHOT.jar:na]
! at com.mesosphere.dcos.kafka.scheduler.KafkaScheduler.resourceOffers(KafkaScheduler.java:232) [kafka-scheduler.jar:na]

To note is the line Causing: org.apache.http.conn.HttpHostConnectException: Connect to master.mesos:80 [master.mesos/192.168.1.4] failed: Connection refused. Is this master.mesos:80 endpoint configurable? I've confirmed that the issue is the port because when I restarted the adminrouter and changed the port back to 80, my kafka broker was created just fine.

cruhland commented 8 years ago

@gabrielhartmann would you be able to help with this?

chjhaijiang commented 7 years ago

I met the same issue too, are you able to find a solution on it?