The input line is too long. The syntax of the command is incorrect
Table of Contents
While starting Apache Kafka you may get an error like The input line is too long. The syntax of the command is incorrect due to Apache Kafka folder path is too long. Apache Kafka setting the CLASSPATH of dependencies of Kafka libraries. We have two ways to start the Apache Kafka server without this error. The error you get in the windows system but may not get in the Linux.
Here We will discuss how to fix the error in the windows system.
- Apache Kafka Path length needs to be decreased
- By changing the kafka-run-class.bat for dependencies.
Apache Kafka Path length needs to be decreased
To decrease the Apache Kafka path, you have to install apache Kafka in the C:/ Drive or D:/ Drive. like as follows.
C:\Kafka\
or
D:\Kafka\
By changing the kafka-run-class.bat for dependencies.
Go to kafka-run-class.bat file and the path is <Kafk-Home>/bin/windows/kafka-run-class.bat
Replace
for %%i in ("%BASE_DIR%\libs\*") do ( call :concat "%%i" )
by
call :concat "%BASE_DIR%\libs\*;"
References
https://stackoverflow.com/questions/48834927/the-input-line-is-too-long-when-starting-kafka
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.