yahoo / CMAK

CMAK is a tool for managing Apache Kafka clusters
Apache License 2.0
11.8k stars 2.5k forks source link

can not override default port in the script #465

Open hzhu026 opened 6 years ago

hzhu026 commented 6 years ago

Hi

For Kafka-Manager UI, to change default UI port from 9000 to 9100 we were updating /etc/init.d/kafka-manager script with below entry. RUN_CMD="$exec -java-home /usr/lib/jvm/java-1.8.0-openjdk*/ -Dhttp.port=9100 >> /var/log/kafka-manager/kafka-manager.log 2>&1 &"

This works well in RHEL6, but in RHEL7 this option of updating in above script is not working, and start of kafka-manager is taking the default 9000 port(which conflicts with Cloudera) and kafka-manager UI start fails.

Can you please help here.

simPod commented 6 years ago

I just noticed the same issue. Running bin/kafka-manager -DHttp.port=9100 occupies 9000 anyway.

montana-ua commented 6 years ago

It works good for me on CentOS7

This is my systemd.service template

[Unit]
Description=Kafka Manager
Documentation=https://github.com/yahoo/kafka-manager
Requires=network.target
After=network.target

[Service]
Type=simple
User={{ kafka_manager_user }}
Group={{ kafka_manager_group }}
WorkingDirectory={{ kafka_manager_home }}
ExecStart={{ kafka_manager_home }}/bin/kafka-manager -java-home {{ kafka_manager_java_home }}
StandardOutput=null
Restart=on-failure

[Install]
WantedBy=multi-user.target

I added application.ini file to my conf folder for CentOS7 Here is my template

-Dconfig.file={{ kafka_manager_home }}/conf/application.conf
-Dhttp.port={{ kafka_manager_port }}
-Dapplication.home={{ kafka_manager_home }}
hzhu026 commented 6 years ago

Hi,

Thanks fo your info!

halilibrahimsimsek commented 5 years ago

in Kafka-manager docker docker exec -ti containerId bash if you checkout README.md file with cat README.md the file navigate you to run this command bin/kafka-manager -Dconfig.file=/opt/kafka-manager/conf/application.conf -Dhttp.port=9080 then you're good to go