JMeter command line - linux version vs windows version - windows

I'm been using JMeter on a linux box, under the command line for a little bit. works fine.
Today, I tried it on a windows box (new client, etc) and it does work but the OUTPUT is waay different, in the console window.
The linux version dumps to the console a running commentary of what is going on -> Min/Max/Throughput/Error messages, etc. etc.
On windows, there's non of that.. eg..
C:\Users\Administrator>c:\temp\jakarta-jmeter-2.3.4\bin\jmeter -n -t "C:\Users\A
dministrator\Desktop\JMeter Test Files\MyProject.jmx" -Dthrea
ds=10 -Dloop=10 -Drampup=1
Created the tree successfully using C:\Users\Administrator\Desktop\JMeter Test Files\MyProjectjmx
Starting the test # Fri Oct 23 21:08:37 PDT 2009 (1256357317843)
Waiting for possible shutdown message on port 4445
Tidying up ... # Fri Oct 23 21:09:09 PDT 2009 (1256357349008)
... end of run
Is there a setting i need to set? something i'm missing from the configuration file?
Note: Please don't tell me to stick with the Linux version - lets keep any religious wars out of this discussion.

Basically when you are running your script from windows, you are not mentioning where your output should store. Check if you are using any listeners and storing the results somewhere on the windows box.
You can add one more parameter as - -l in the command line to get the help

Related

Jenkins Agent can't reconnect

I've been attempting to setup a Windows agent for our Jenkins on Linux to use. Mostly using the instructions from https://www.gdcorner.com/2019/12/30/JenkinsHomeLab-P3-WindowsAgents.html
Only mostly, as those (like EVERY OTHER SET I've found) don't match the current Jenkins screens.)
I got to the point where I ran the curl/java -jar commands on the Agent machine in an Administrator Command window.
It worked, and connected to Jenkins, showed up as running. Though this means it was still running as a normal program in a command window.
While attempting to figure out what was meant by "Click the Launch agent from browser. " - which showed a small window that should then be displayed - which would allow you to install it as a service, I closed the Command window.
I never figured out how to "click the launch agent from browser", so I opened a new admin command window and re-ran the commands. They no longer work. It gets this error every time: (note that "WinDInstaller" is really "Win%2DInstaller")
Sep 28, 2022 10:15:40 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\Enterprise\Agent\remoting as a remoting work directory
Sep 28, 2022 10:15:40 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to C:\Enterprise\Agent\remoting
Failed to obtain http://metrixbld1:8080/computer/WinDInstaller/jenkins-agent.jnlp?encrypt=true
java.io.IOException: Failed to load http://metrixbld1:8080/computer/WinDInstaller/jenkins-agent.jnlp?encrypt=true: 404 Not Found
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:514)
at hudson.remoting.Launcher.run(Launcher.java:346)
at hudson.remoting.Launcher.main(Launcher.java:297)
Waiting 10 seconds before retry
It seems like it should be possible to get an Agent running on windows as a Service - but so far I've not found a set of instructions that work.
EDIT: Since that agent definition no longer worked, I created a new one and had it just copy the settings from the old one.
Then ran the new java/agent command - and it worked.
Apparently you can only launch a new agent once. If it ever stops you have to re-create it????

How to deploy Apache-Jmeter-5.1.1 on Pivotal Cloud Foundary

I am trying to deploy an Apache-Jmeter (version 5.1.1), a stand-alone application on Pivotal cloud Foundry but unable to
I have the Apache-Jmeter (version 5.1.1) set-up running on my windows machine so I tried to push that directory/folder to PCF as an App but it failed with the below error
C:\Program Files\apache-jmeter-5.1.1>cf push apache-jmeter-5.1.1
Pushing from manifest to org dev-testing/ space Dev as user1...
Using manifest file C:\Program Files\apache-jmeter-5.1.1\manifest.yml
Getting app info...
readat C:\Program Files\apache-jmeter-5.1.1\bin\jmeter.bat: negative offset
FAILED
Here is my manifest.yml file looks like :
---
applications:
- name: jmeter-5-1-pcf
path: bin/jmeter.bat
memory: 512m
instances: 1
I should be able to run my Jmeter scripts (I mean test.jmx) from Pivotal Cloud Foundry, also It could be good if I can see the UI of Apache-Jmeter which was deployed on Pivotal Cloud Foundry
OK, easy answer first.
readat C:\Program Files\apache-jmeter-5.1.1\bin\jmeter.bat: negative offset
FAILED
It's failing because that's a Windows bat file, and you're trying to run it on Linux. You would want to run the .sh start script, and make sure you're pushing the .tgz download from the JMeter Binaries page.
Beyond that, it gets murky and depends on what exactly you want to run?
You could simply run jmeter from the command line, like here. In that case, you don't have a persistent running server though, which poses a problem because Cloud Foundry expects your app to run forever.
You could work around this by using a task instead. You would need to push JMeter as an app, let it stage then stop the app. After that you could cf run-task to execute jmeter -n -t plan.jmx ....
The other option would be to try and run JMeter remote, but that's not going to work well because JMeter uses Java RMI, which is not HTTP based so it would require use of Cloud Foundry TCP routes, or copious use of cf ssh to make tunnels. Neither are great options.
I would suggest using the cf cli. A quick test, the following worked for me.
Download the .tgz binary release from JMeter's web site.
Add the following .cfignore file. It just skips stuff you don't need.
NOTICE
LICENSE
README.md
docs
printable_docs
licenses
extras
Add a file .profile. This will set a couple env variables to make JMeter work.
export JAVA_HOME=.java-buildpack/open_jdk_jre/
export PATH=$PATH:$JAVA_HOME/bin
Put your .jmx files into the JMeter directory.
Then run cf push -b java_buildpack -m 1G -c 'sleep 9999' -u process --no-route jmeter-cli.
The app should start and do nothing, immediately run cf stop jmeter-cli. You just need to do this so that the app stages.
Then run cf run-task jmeter-cli './bin/jmeter -n -t your-test.jmx'.
Run cf logs --recent jmeter-cli and see the results. Or run cf logs jmeter-cli in a second terminal and stream them as the task runs.
Example output:
2019-09-08T22:06:35.72-0400 [CELL/0] OUT Cell e5f61515-c164-4c36-9686-faa2a0a363ed creating container for instance 29a1deb6-04c1-4105-91f8-0a8a5dadf367
2019-09-08T22:06:36.56-0400 [CELL/0] OUT Cell e5f61515-c164-4c36-9686-faa2a0a363ed successfully created container for instance 29a1deb6-04c1-4105-91f8-0a8a5dadf367
2019-09-08T22:06:41.18-0400 [APP/TASK/4e6e54e6/0] ERR Sep 09, 2019 2:06:41 AM java.util.prefs.FileSystemPreferences$1 run
2019-09-08T22:06:41.18-0400 [APP/TASK/4e6e54e6/0] ERR INFO: Created user preferences directory.
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Creating summariser <summary>
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Created the tree successfully using Test Google.jmx
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Starting the test # Mon Sep 09 02:06:41 UTC 2019 (1567994801615)
2019-09-08T22:06:41.63-0400 [APP/TASK/4e6e54e6/0] OUT Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT summary = 30 in 00:00:02 = 19.9/s Avg: 99 Min: 60 Max: 450 Err: 0 (0.00%)
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT Tidying up ... # Mon Sep 09 02:06:43 UTC 2019 (1567994803664)
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT ... end of run
2019-09-08T22:06:44.39-0400 [APP/TASK/4e6e54e6/0] OUT Exit status 0
The only other thing to mention is that you can use the -l option and write the output to a JTL file. If you do that, it will write to the local file system and when your task ends that file will disappear, you won't be able to get it.
If you need to write the results to a JTL file, then you will also need to modify the task command that you run to, upon completion of JMeter, upload the results file to persistent storage like S3.
Hope that helps!

Storm cannot start use "supervisor.run.worker.as.user: true" option on Windows Server

Version: 1.2.2
platform: Windows 10
When storm.yaml config use "supervisor.run.worker.as.user: true" option, Storm start failed on Windows 10, and No log in log file.
Running as other users is not supported on Windows.
https://github.com/apache/storm/blob/8a475696e908c53f1c06bf1a8f373d8ac0483427/storm-server/src/main/java/org/apache/storm/daemon/supervisor/RunAsUserContainer.java#L55
Someone would need to provide a Windows compatible variant of this class, as well as a couple of other bits in the code. The issue is tracked at https://issues.apache.org/jira/browse/STORM-371 if you'd like to work on it.

Jmeter distributed testing 2 slave systems

I am running a jmeter test with one master and two slave systems.
the values I provided in master system are:
no of threads: 750
ramp up: 420 seconds
loop count: 1
when I press ctrl+shift+R, the test execution begins on both "A" & "B" remote systems and the message
"Starting the test on host XXX.XXX.X.XXX # Mon Feb 8 08:08:21 IST 2016
"
is displayed on cmd prompt of both systems.
But after sometime I found that there is no response from server. I checked if there is any activity in the "summary listener", but there is no activity.
I checked the generated "summary.xlsx" file and found all the requests from system "A" have been served and only some of the requests from system "B" were served.
When I checked system A's cmd prompt it says
"Finished the test on host XXX.XXX.X.XXX # Mon Feb 8 08:08:21 IST 2016
".
(I think it is ok, because all its requests were served).
When I checked system B's cmd prompt I DIDN'T find the message
"Finished the test on host XXX.XXX.X.XXX # Mon Feb 8 08:08:21 IST 2016
".
Hoping that the requests of system B would be executed eventually, I left it for 8 hours.
But to my surprise when I checked it in the morning it was just, where I have last seen it.
No further requests from system B were executed, checked the server log no response there either. And I also didn't find the message
"Finished the test on host XXX.XXX.X.XXX # Mon Feb 8 08:08:21 IST 2016
"
on system B.
Please suggest me how I can get all the requests from both slave systems served without the above problem.
I can bet that the issue is in different subnets. Read the following step by step manual, especially limitations section:
RMI cannot communicate across subnets without a proxy; therefore neither can jmeter without a proxy.
So, make sure that both A and B are in the same subnet with master.
I assume that you are able to run a standalone/non-distributed test in Slave B w/o issues. If you have not checked that, please ensure if it works fine.
In this case, read this site. https://cloud.google.com/compute/docs/tutorials/how-to-configure-ssh-port-forwarding-set-up-load-testing-on-compute-engine/. It has good information on the jmeter communication during distributed testing.
I would check if the RMI ports on slave B are open.

Entering vagrant ssh for the first time in the terminal

I really don't understand here when I entered vagrant ssh for the first time in the terminal. I'm using laravel Homestead.
output was:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information disabled due to load higher than 1.0
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
Last login: Fri Oct 3 01:24:38 2014 from 10.0.2.2
I really don't understand:
Last login: Fri Oct 3 01:24:38 2014 from 10.0.2.2 //because its first time I entered vagrant ssh
and this:
System information disabled due to load higher than 1.0
The last login you see may come from when the Vagrant Box was originally created. For example I just launched a new Vagrant VM based on hashicorp/precise64 and the "last login" showed as September 2012. Subsequent logins will show the last time that you logged in.
Regarding the system information being disabled, see this ServerFault question: System information disabled due to load higher than 1.0 amazon ec2.
Both of the above can safely be considered normal behavior.

Resources