Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

How to specify the port #2

Open
Vanlightly opened this issue Apr 22, 2019 · 5 comments
Open

How to specify the port #2

Vanlightly opened this issue Apr 22, 2019 · 5 comments

Comments

@Vanlightly
Copy link

The reporter always starts up listening on port 19092. I can't figure out how to set the port in configuration. Looking at the clojure code it seems like it might be possible but I do not understand clojure at all.

@Sugaroverdose
Copy link

It seems like that you need to specify port in kafka server config, option kafka_http_reporter.port

@Vanlightly
Copy link
Author

Yes that works. The issue is that when using Docker it is very convenient to use environment variables to set configuration values. This config has underscores in it which get converted to dots. So kafka_http_reporter.port it turned into http.reporter.port.

Could we change the config from kafka_http_reporter.port to kafka.http.reporter.port? Then with Docker we can use the environment variable KAFKA_KAFKA_HTTP_REPORTER_PORT.

@Sugaroverdose
Copy link

Sugaroverdose commented Apr 23, 2019

You can easily try it out by changing single line

port (Integer/parseInt (or (:kafka_http_reporter.port config) "19092"))]

But it's better just to remove underscores instead of changing them to dots

@Vanlightly
Copy link
Author

Yes that works. I changed it to kafkahttpreporter.port and set the environment variable to KAFKA_KAFKAHTTPREPORTER_PORT: 19093

In the logs I get [INFO] KafkaHttpReporter: Starting HTTP server listening on port 19093.

The CloudKarafka MGMT assumes that the port is the advtertised listener port with a 1 at the front (so adv listener port 9093 means HTTP reporter port of 19093). So just need to ensure that the port is configured to that. That restriction seems fine, I can't think of a reason why that might cause people problems.

@Vanlightly
Copy link
Author

I created a PR #3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants