Skip to content
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

Kafkamanager does not see JMX port #70

Closed
jazzl0ver opened this issue Aug 16, 2018 · 3 comments
Closed

Kafkamanager does not see JMX port #70

jazzl0ver opened this issue Aug 16, 2018 · 3 comments

Comments

@jazzl0ver
Copy link
Collaborator

It shows -1 instead:
image
To fix that, the environment variable JMX_PORT has to be set before starting Kafka.
Please, add it to the Kafka task definition.
Probably the line should be:

kafkacatalog.go:
func GenDefaultCreateServiceRequest(platform string, region string, azs []string,
....
        envkvs := []*common.EnvKeyValuePair{
                &common.EnvKeyValuePair{Name: ENV_JMX_PORT, Value: jmxPort},
        }
...
@JuniusLuo
Copy link
Contributor

JMX_PORT is included in the "service.conf". Kafka container entrypoint.sh will source the service.conf file. Kafka should already start with JMX_PORT.

KafkaManager collects the metrics via the JMX_PORT. If JMX_PORT is not set in Kafka, kafkamanager would not be able to collect the metrics. Possibly a bug in kafkamanager?

@jazzl0ver
Copy link
Collaborator Author

jazzl0ver commented Aug 17, 2018

Kafkamanager reads jmx_port from Zookeeper. Kafka sets this variable in ZK only when JMX_PORT environment variable was exported before starting Kafka.

@JuniusLuo
Copy link
Contributor

I see what you mean. Source the service.conf file is not enough. We have to explicitly export JMX_PORT, so kafka starting script will recognize it. We could make a fix to kafka image entrypoint.sh to export JMX_PORT, and rebuild the image. Will make a fix.

jazzl0ver added a commit to jazzl0ver/firecamp that referenced this issue Dec 26, 2018
Exporting JMX_PORT environment var (fix for cloudstax#70)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants