Question

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

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?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
August 20, 2019
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.

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"

KFSys
Site Moderator
Site Moderator badge
June 15, 2021

Hi @leccher and @ANelson82,

Thank you for sharting the solution to this issue!

Please do use the community in such cases in the future as well!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel