Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Cannot open file /opt/kafka_2.11-1.1.0/bin/../logs/kafkaServer-gc.log due to Permission denied

avatar
Contributor

when I am trying to start kafka with the following command :

`bin/kafka-server-start.sh config/server.properties`

I am getting this error every time

Cannot open file /opt/kafka_2.11-1.1.0/bin/../logs/kafkaServer-gc.log due to Permission denied. how to fix this ...

76588-kafka-error.png

1 ACCEPTED SOLUTION

avatar

Hey @Rahul Kumar could you try to run as kafka user? Or root

View solution in original post

4 REPLIES 4

avatar

Hey @Rahul Kumar could you try to run as kafka user? Or root

avatar
Contributor

Yes, it is working as a root user Thanks @Vinicius Higa Murakami

avatar

@Rahul Kumar

I think @Vinicius Higa Murakami is correct, if you take a closer look you are running as user rahul and probably the log file under logs directory belongs to different user, or you dont have write permissions on it. If you are starting from command line always double check which user you are running with and switch to the appropiate service account.

HTH

avatar
Contributor

Yes, it is working as a root user Thanks @Felix Albani