question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to restart Kafka Manager using Docker Compose

See original GitHub issue

Hello,

I am using Kafka Manager run with Docker Compose with the following .yml:

kafka-manager:
    image: qnib/plain-kafka-manager
    network_mode: host
    environment:
      ZOOKEEPER_HOSTS: "localhost:2181"
      APPLICATION_SECRET: blabla
    restart: always

It starts and is working fine at 1 run. When i stop and start ig again after few minutes, i got the following error:

>> JMX_ENABLE:true, PROMETHEUS_JMX_ENABLE:false
> execute entrypoint '/opt/qnib/entry/30-kafka-manager.sh'
> execute CMD '/opt/qnib/kafka/manager/bin/start.sh'
This application is already running (Or delete /opt/kafka-manager/RUNNING_PID file).
[II] qnib/init-plain script v0.4.28
> execute entrypoint '/opt/entry/00-logging.sh'
> execute entrypoint '/opt/entry/10-docker-secrets.env'
[II] No /run/secrets directory, skip step
> execute entrypoint '/opt/entry/99-remove-healthcheck-force.sh'
> execute entrypoint '/opt/qnib/entry/19-configure-jmx.sh'
+ sed -i -e s/JMX_PORT/1234/g /opt/prometheus/jmx/default.yml
> execute entrypoint '/opt/qnib/entry/20-jmx-prometheus.env

Upon docker ps i can see the following:

CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS                            PORTS                    NAMES
2d9d2c866066        qnib/plain-kafka-manager                "/usr/local/bin/en..."   32 minutes ago      Restarting (255) 14 seconds ago                            webtools_kafka-manager_1

In order to run it, I have to remove that container and create it again, which is inconvenient in long term. Any idea how to fix that? I checked ps -A but i do not see any Kafka Manager process running.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

9reactions
rmasgutovcommented, Feb 14, 2018

I am too using Kafka Manager with docker with following configuration:

kafka-manager: image: sheepkiller/kafka-manager environment: ZK_HOSTS: zoo:2181 depends_on: - kafka - zoo I have same error: This application is already running (Or delete /opt/kafka-manager/RUNNING_PID file).

This problem was fixed with configuration: command: -Dpidfile.path=/dev/null

1reaction
frankdejongecommented, Feb 26, 2019

For reference for other people running into this issue and wanting to know why this fixes it, it’s basic play-framework configuration: https://www.playframework.com/documentation/2.7.x/ProductionConfiguration#Changing-the-path-of-RUNNING_PID

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka topic configuration is lost after docker-compose restart
Using kafka manager I changed policy to compact . The problem: After stop/start docker-compose topics are present, but cleanup.policy is ...
Read more >
Why Can't I Connect to Kafka? | Troubleshoot Connectivity
You can run docker-compose up -d and it will restart any containers for which the configuration has changed (i.e., broker ). Note that...
Read more >
Kafka Manger installation using Docker Compose - YouTube
We will install Kafka Manager using docker compose. In this video we will learn to install three components using docker compose Kafka ...
Read more >
wurstmeister/kafka - Docker Image - Docker Hub
modify the KAFKA_ADVERTISED_HOST_NAME in docker-compose.yml to match your docker host IP (Note: Do not use localhost or 127.0.0.1 as the host ip if...
Read more >
Guide to Setting Up Apache Kafka Using Docker - Baeldung
2.1. docker-compose.yml Configuration ... To start an Apache Kafka server, we'd first need to start a Zookeeper server. We can configure this ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found