Error when starting kafka
The problem occurs in the logs file
ERROR Shutdown broker because all log dirs failed: It means that all log files cannot be used, which may be a permission problem
Then enter the logs to view
Currently our user is hadoop, and the log files belong to the root user, so it can be solved by modifying the permissions
sudo chown hadoop.hadoop logs -R
You can see that the file ownership has been changed to hadoop
try to start kafka
successfully started