I try to install kafka on my windows(8), and it's not work.
I download kafka and extract it on c:\kafka after it i change the server.properties and zookeeper.properties.
I set in those file the logs path.
I even try to download an tun zookeper outside the kafka install but the zookeeper runing and the kafka not.
the Error that i get when i try to run this command is:
bin\windows\zookeeper-server-start.bat .config\zookeeper.properties
and this is the result:
Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll'
The solutions is to Download the binary jar file.
go to config\server.properties and config\zookeeper.properties and change the folder. the new folder need to be write with / and not .
and after it you need to got the main folder and run the command:
bin\windows\zookeeper-server-start.bat config\zookeeper.properties
without the . before "config\zookeeper.properties"
I have provided the answer for the similar error here, check this out.
https://i-am-jabi.medium.com/fixing-classpath-is-empty-69288c1509a2
Here are the steps to resolve the issue:
Open kafka-run-class.bat file. You will find this in bin\windows folder of your confluent Kafka.
Search for “rem Classpath addition for core” in kafka-run-class.bat file. When you find it, it looks like below.
Now lets add the below snippet above the “rem Classpath addition for core” line in kafka-run-class.bat file.
rem classpath addition for LSB style path
if exist %BASE_DIR%\share\java\kafka\* (
call:concat %BASE_DIR%\share\java\kafka\*
)
After adding the above snippet, your file will look like this.
Now, when you run the bat files under windows folder, they will run fine without any issues. Here is the zookeeper start log after fixing the classpath error.
Related
I am trying to build hadoop from source as explained in this article. When building Apache common, everything fails with this error message: command line too long.
So, Here's what I have tried(I will update this when I try more):
As said in this
Stackoverflow answer, the way to overcome this error is to shorten the path as much as possible. So, I cut repository files from C:\user_name\.m2\repository\ to another directory and made an empty drive and have that point to this new directory which i have moved files to, like this
subst M: D:\maven-2.0.8\repository and changed <localRepository>M:</localRepository> tag in "settings.xml" from C:\apache-maven-2.0.8\conf to point to M:. And after doing all this, I restart my system and try to build hadoop again. But, as I can see from the error, maven still downloads packages to C:\Users\user_name\.m2\repository\, not M: and the error of command line too long error persists.
To shorten the path as much as possible, i made a directory in C:\mrepo and have this directory symbolically link to the C:\user_name\.m2\repository\ like this: mklink /J C:\mrepo C:\Users\.m2\repository. And after doing all this, I restart my system and try to build hadoop again. But, as I can see from the error, maven still downloads packages to C:\Users\user_name\.m2\repository\, not M: and the error of command line too long error persists.
EDIT 1:
I have also set an environment variable named M2_HOME with value M:\. And made changes in my \conf\settings.xml: <localRepository>${M2_HOME}</localRepository>. The issue still persisits.
How do I fix this and build hadoop successfully?
Are you using IntelliJ?
Because in IntelliJ you have some options to shorten your command line.
Go to Run/Debug Configurations.
Shorten command line, you can try the classpath file option.
You can find more information about it in this blog post.
If you want to set the .m2 directory to something explicit, you do can so by overriding the default.
All Users:
Edit the \conf\settings.xml global configuration file. Change the value of the localRepository key to the absolute path of the local repository cache.
Your user: I think you should be able to set the M2_HOME environment variable in your user settings.
I'm learning about Microservice Architecture these days and I need to run Kafka to follow some tutorials. However, zookeeper-server-start on cmd which is the first step for running up Kafka doesn't work for me.
It says 'the syntax of the command is incorrect'
I followed process below
download kafka and extarct
(https://kafka.apache.org/downloads - kafka_2.11-2.1.0.tgz (binary download))
open cmd and write command
These are what I've tried so far (at kafka directory)
bin\windows\zookeeper-server-start.bat zookeeper.properties
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
\bin\windows\zookeeper-server-start.bat \config\zookeeper.properties
zookeeper-server-start.bat ../../config/zookeeper.properties
and so on... plus, kafka directory is not too long to cause the error.(C:\kafka)
Change the directory of Kafka to keep simple
Like:
From kafka_2.13-3.0.0 to kafka
It's worked for me.
I have moved Kafka folder directly to a different directory and renamed long Kafka-version as well. After that, it works fine.
Best thing to do is run Docker, and Kafka under that. You can find docker images here, and an example Docker Compose here
Let's consider you have unzip kafka_xxx.tgz in folder (C:\kafka) then you can use as below command:
C:\kafka\bin\windows>zookeeper-server-start.bat C:\kafka\config\zookeeper.properties
You may get message as "The syntax of the command is incorrect", But you can ignore it.
It will not cause any problem.
If you would like to verify zookeeper is running or not then you can open other command prompt and use below command:
C:\User> jps
Output:
12896 Jps
13264 QuorumPeerMain
Kafka in window
zookeeper-3.4.10\conf\zoo-sample.cfg
rename: zoo-sample.cfg to zoo.cfg and change into zoo.cfg
dataDir=C:\\Users\\Sumit\\zookeeper-3.4.10\\zookeeper
Now start{zookeeper bin folder}: zkserver
open kafka directory and type following code in cmd-promot
.\bin\windows\kafka-server-start.bat .\config\server.properties
check for correct Path , use from English characters to Path and
Use a shorter address. example :
d:\kafka\
I put the kafka folder under c: drive like C:\kafka_2 and also moved the properties files to the windows folder (because it was saying invalid input).
Executed the command like : C:\kafka_2\bin\windows>zookeeper-server-start.bat zookeeper.properties,
and it worked like magic
I faced the same issue as you and the way I solved it, I keep the directory to shortest as possible:
On my side: E:/kafka and the rest of the directories like (bin, config, etc..) will be inside kafka
I hope it works for you.
I faced a similar issue [on windows].
tried changing the dataDir variable to C://path-to-tmp/folder.
It did not work.
Then changed the drive letter to small i.e.
c:/path-to-tmp/folder
and lo and behold it works like a charm.
True Story.
I have written Ignite hello world program in Eclipse and want to connect it to localhost(127.0.0.1). But it is giving me error for example "ignite.xml file path is invalid"
I am starting ignition as follows,
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {}
But I got error like:
Spring XML configuration path is invalid: examples/config/example-ignite.xml.
How do I fix it?
You have the following options:
Provide the absolute file path.
Set IGNITE_HOME system property or environment variable, put the file in this folder and provide the path relative to the home.
Add the configuration file on classpath under META-INF and provide the path relative to it.
The last option is usually the most convenient for the applications with an embedded Ignite node.
I am new to Salt, just want to install it on my MacBook for work.
I follow the instructions in https://salt.readthedocs.org/en/v0.16.4/topics/installation/osx.html
When I move the the step Salt-Master Customizations, I find I cannot find the configuration file.
I go to directory /etc/salt via Finder and only find one directory pki.
From http://docs.saltstack.com/en/latest/ref/configuration/examples.html#configuration-examples-master, it provides a sample configuration file. Then I am not sure what to do next? Do I need to create a configuration file under the directory of /etc/salt? If so, how to name the configuration file? Name it as master.conf?
Thanks very much!
Create a new file as:
/etc/salt/master
and add the sample configuration file you have found. More details can be found on the configuration page here: Configuring Salt
Have you tried adding -c /path/to/config/dir/ when starting the master?
Download Jmeter and execute the batch file (Jmeter\apache-jmeter-2.6\bin\jmeter.bat).
We get the error message in the console:
Unable to access jarfile ApacheJMeter.jar errorlevel=1
Kindly help me to resolve the problem.
Try downloading apache-jmeter-2.6.zip from http://www.apache.org/dist/jmeter/binaries/
This contains the proper ApacheJMeter.jar that is needed to initiate.
Go to bin folder in the command prompt and try java -jar ApacheJMeter.jar if the download is correct this should open the GUI.
Edit on 23/08/2018:
The correct answer as of current modern JMeter versions is https://stackoverflow.com/a/51973791/460802
I got this error today because the "Source" is missing the ApacheJmeter.jar. I downloaded it again from "Binaries" and everything works as expected.
JMeter should be started using :
jmeter/bin/jmeter.sh for Linux
jmeter/bin/jmeter.bat for windows
this will ensure correct property files are read and necessary jars in lib are loaded.
any other method will expose you to a lot of trouble.
the most upvoted answer is wrong !
See 1.4 Running JMeter in reference documentation :
https://jmeter.apache.org/usermanual/get-started.html
If you'd like to learn more about JMeter and performance testing this book can help you.
I'm running JMeter 2.8 (Windows 7) and received a message similar to that in the original post:
C:\>jmeter
Error: Unable to access jarfile C:\local\software\jMeter\apache-jmeter-2.8\binApacheJMeter.jar
errorlevel=1
Press any key to continue . . .
I'd created a Windows environment variable JMETER_BIN and set it to the JMeter path which I could see contained ApacheJMeter.jar (so it wasn't a question that the jar was missing).
I should have noticed at the time this portion of the error: "binApacheJMeter.jar"
When I went to the jmeter.bat file to troubleshoot, I noticed this line:
%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%
and that caused me to revisit the "binApacheJMeter.jar" portion of the error.
What was happening was that the batch file was requiring a trailing slash on the end of the path in the JMETER_BIN environment variable to correctly specify the location of the .jar.
Once I corrected my environment variable, adding the trailing slash, all was wonderful.
YMMV, but this worked for me.
If you'll go through these steps:
In the Terminal type brew install jmeter and hit Enter
When it'll be done type jmeter and hit Enter again
You won't have to solve any kind of issue.
Don't thank 😀
I faced with the same error, when i downloaded the Jmeter Source, and it got fixed once i downloaded Jmeter Binary. Please watch this video.
navigate to the url http://jmeter.apache.org/download_jmeter.cgi-->download apache-jmeter-2.11.zip, which is under binaries.
this error is occurring since Apache jmeter.jar is missing in bin folder
If you are using linux and faced such problem during creating link, try to change jar file path of original jmeter file.
+ java -server -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:MaxTenuringThreshold=2 -XX:PermSize=64m -XX:MaxPermSize=128m -XX:+CMSClassUnloadingEnabled -jar ./ApacheJMeter.jar -help
Change to:
java $ARGS $JVM_ARGS -jar "/opt/apache-jmeter-2.11/bin/ApacheJMeter.jar" "$#"
Try to use updated JMeter version which is JMeter 3.0 now.
I had moved the apache jmeter folder to c:, open cmd with admin grant and execute jmater.bat.
This solved the problem for me.
This error could also happen because of version mismatch of jmeter and java. As jmeter versions supports different java versions as below.
Download the zip accordingly and you are good to go.
For people still getting the issue.
I face same problem and seems some .jar file missing.
so try tar -xf apache-jmeter-5.2.1.tgz in the console rather than just right click unzip. And also, try binary package if source package still has an issue.
this solve my issue (I am using ubuntu)
For window if you download scr folder say apache-jmeter-5.3_src then you won't find ApacheJMeter.jar file insider bin folder.One might have downloaded zip file under source section. Form this link download zip file under binaries section and click on ApacheJMeter.jar from bin folder https://jmeter.apache.org/download_jmeter.cgi
When we download the binary of apache-jmeter-x.x.tgz, where x could be any version of apache Jmeter. ApacheJMeter.jar must present inside apache-jmeter-x/bin folder , if it is not present somewhere your package not downloaded properly. Cause could be slow internet, or improper shutdown
Download package again and make sure ApacheJMeter.jar present in apache-jmeter-x/bin folder. Once it is present hit sh jemeter.sh
This issue will come if you download the source from the below URL :
https://jmeter.apache.org/download_jmeter.cgi
Solution :
Always download :
Apache JMeter 5.5 (Requires Java 8+)
Binaries
apache-jmeter-5.5.tgz sha512 pgp
apache-jmeter-5.5.zip sha512 pgp --- > This one
worked for me