spotify / docker-kafka

Kafka (and Zookeeper) in Docker
Apache License 2.0
1.4k stars 642 forks source link

Failed to start kafka 'exit status 127' #77

Open f1sherox opened 7 years ago

f1sherox commented 7 years ago

Kafka failed to start with this error message:

2017-08-16 18:21:57,172 CRIT Supervisor running as root (no user in config file)
2017-08-16 18:21:57,173 WARN Included extra file "/etc/supervisor/conf.d/zookeeper.conf" during parsing
2017-08-16 18:21:57,173 WARN Included extra file "/etc/supervisor/conf.d/kafka.conf" during parsing
2017-08-16 18:21:57,181 INFO RPC interface 'supervisor' initialized
2017-08-16 18:21:57,181 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-08-16 18:21:57,181 INFO supervisord started with pid 1
2017-08-16 18:21:58,185 INFO spawned: 'zookeeper' with pid 7
2017-08-16 18:21:58,187 INFO spawned: 'kafka' with pid 8
2017-08-16 18:21:58,201 INFO exited: kafka (exit status 127; not expected)
2017-08-16 18:21:59,208 INFO success: zookeeper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-08-16 18:21:59,210 INFO spawned: 'kafka' with pid 28
2017-08-16 18:21:59,214 INFO exited: kafka (exit status 127; not expected)
2017-08-16 18:22:01,218 INFO spawned: 'kafka' with pid 29
2017-08-16 18:22:01,225 INFO exited: kafka (exit status 127; not expected)
2017-08-16 18:22:04,231 INFO spawned: 'kafka' with pid 30
2017-08-16 18:22:04,238 INFO exited: kafka (exit status 127; not expected)
2017-08-16 18:22:05,239 INFO gave up: kafka entered FATAL state, too many start retries too quickly

Does anyone encountered that, how can I solve this problem?

cicely-zhang commented 7 years ago

Hi, I am also having the same issue, have you found a solution yet?

jskulski commented 6 years ago

~Experiencing this as well~

Actually, I posted too soon. I was experiencing this but put the project on hold for a week. I just tried and now kafka is staying up. I'm not sure what happened, but maybe restarting the docker engine would help.

anilverma commented 6 years ago

start-kafka.sh --messing up with server.properties appended new line char in echo "\n advertised.host.name=$ADVERTISED_HOST" >> $KAFKA_HOME/config/server.properties

victor-gallet commented 6 years ago

I faced the same problem and it was actually the file encoding. As I worked on windows with a boot2docker, the file sr/bin/start-kafka.sh was copied with DOS encoding. To ensure that you're façing the same problem, you can connect to your container and run:

root@fe755f8bcc0f:/# file /usr/bin/start-kafka.sh
/usr/bin/start-kafka.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
hiteshrup commented 4 years ago

For me, it was because of openjdk not installed. After installed openjdk-8, issue got resolved.

flaviodiminuto commented 4 years ago

For me, it was because of openjdk not installed. After installed openjdk-8, issue got resolved.

Now my case is working good! Thanksl