I'm trying to run jmeter to launch a load test.
One thing that I found strange is that I can run the following jmeter command in macOS without any problem.
PROTOCOL=https
DOMAIN=mywebsite.com/API
PORT=443
LOOP=1
THREADS=1
/var/jenkins_home/apache-jmeter-5.1.1/bin/jmeter \
-Jjmeter.save.saveservice.output_format=xml \
-Jprotocol=${PROTOCOL} \
-Jdomain=${DOMAIN} \
-Jport=${PORT} \
-Jloop=${LOOP} \
-Jthreads=${THREADS} \
-n -t mywebsite.jmx \
-l jmeter.jtl \
-j mywebsite.log
But when I run the above command a linux machine, I got the error saying.
<httpSample t="0" it="0" lt="0" ct="0" ts="0" s="false" lb="" rc="Non HTTP response code: java.net.MalformedURLException" rm="Non HTTP response message: Illegal character found in host: '/'" tn="Thread Group 1-1" dt="text" by="822" sby="0" ng="1" na="1">
<null/>
</httpSample>
And 100% of the jmeter requests failed.
This error message is found in jmeter.jtl result file.
It looks like that jmeter doesn't allow / in its domain in the linux environment. My domain mywebsite.com/API contains a / symbol.
The java version on my macOS is
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
and the java version on my linux machine is
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
The jmeter on both of the systems is 5.1.1.
Does anyone know what goes wrong in my linux environment?

