Report this

What is the reason for this report?

Log: kafka.service: Main process exited, code=exited, status=127

Posted on August 20, 2019

Hi,
if I start the Kafka Service. Log: kafka.service: Main process exited, code=exited, status=127/n/a Aug 16 15:12:32 ubuntu-server systemd[1]: kafka.service: Failed with result ‘exit-code’. Ubuntu

Environment: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic
Any Idea for this problem?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0
Pinned Answer

Accepted Answer

Hi @detleffolke,

Can you please try to start the service, once it fails please run

journalctl -xe

it will provide you with the reason behind it failing to start.

Additionally, you can try

nano /etc/init.d/kafka

and provide me with the contents of the file here?

Kind regards, Kalin D.

Look in /etc/systemd/system/<kafka-unit-file>.service

You should switch to the User mentioned there and set PATH configured in that file. Then try running the command mentioned in ExecStart. You should find that the command can’t be found and this is why you are getting that error.

If that doesn’t track down the problem, I’ve actually written up a pretty extensive runbook on how to debug systemd issues. Take a look and leave me a comment if things still aren’t working for you.

Hi @detleffolke , I also encountered this problem today. I added the environment path under [service]and it can run normally!

Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin/java/:/usr/local/jdk/jre/bin"

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.