Performance Error in NonGUIDriver java.lang.IllegalArgumentException - maven

I have maven project, with the help of which I am trying to execute a jmx file, running JMeter with (jmeter-maven-plugin). I have the following console output
P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO] Invalid value detected for <postTestPauseInSeconds>. Setting pause to 0...
[INFO]
[INFO]
[INFO] Executing test: ZawyaJmeterTest.jmx
[INFO] Writing log file to: D:\tools\jmeter_examples\Example\jmeter-maven-example\target\jmeter\logs\ZawyaJmeterTest.jmx.log
[INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'D:\tools\jmeter_examples\Example\jmeter-maven-example\target\jmeter\testFiles\ZawyaJmeterTest.jmx', missing class com.thoughtworks.xstream.converters.ConversionException: No field 'sentBytes' found in class 'org.apache.jmeter.samplers.SampleSaveConfiguration' : No field 'sentBytes' found in class 'org.apache.jmeter.samplers.SampleSaveConfiguration'
I thought in order to fix the issue org.apache.jmeter.samplers.SampleSaveConfiguration I tried to add SampleSaveConfiguration class in dependency
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>3.1</version>
</dependency>
But It did not helped in fact. Than I looked for problem No field 'sentBytes' found in class 'org.apache.jmeter.samplers.SampleSaveConfiguration', but in class SampleSaveConfiguration I found field private boolean sentBytes;
I do not know in what way search such issue.
When running JMeter test locally it is fine -
d:\tools\jmeter_examples\Example\jmeter-maven-example>jmeter -n -t D:\tools\jmeter_examples\Example\jmeter-maven-example\src\test\jmeter\ZawyaJmeterTest.jmx -l D:\tools\jmeter_examples\Example\jmeter-maven-example\target\jmeter\results\ZawyaJmeterTest.jtl
Writing log file to: d:\tools\jmeter_examples\Example\jmeter-maven-example\jmeter.log
Created the tree successfully using D:\tools\jmeter_examples\Example\jmeter-maven-example\src\test\jmeter\ZawyaJmeterTest.jmx
Starting the test # Wed Nov 30 17:26:53 EET 2016 (1480519613563)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
Tidying up ... # Wed Nov 30 17:27:07 EET 2016 (1480519627819)
... end of run
Does anybody faced such issue? Or recommend some ways of the decision, please!!!

It seems that current version of jmeter-maven-plugin (2.0.3) lags a bit behind the JMeter versions (current is 3.1).
I had absolutely the same exception when tried to run my 3.1-versioned jmx. But, when I've recreated the jmx with JMeter GUI of version 2.13, it worked well with jmeter-maven-plugin of version 2.0.3.
Probably it is worth to downgrade your working version of JMeter.

Last version 2.6.0 of jmeter-maven-plugin now support last version of JMeter 3.3 and is now maintained by 2 persons among which one committer of Apache JMeter project so it now tightly follows JMeter releases.
See this on how to configure it:
https://wiki.apache.org/jmeter/JMeterMavenPlugin
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Basic-Configuration
All your issues should be fixed.

Related

Beam / DataFlow unexpected error ProtocolMessageEnum not implemented when using DataFlowRunner

When running my Beam pipeline locally it all works as expected but when trying to run it on the DataflowRunner I suddenly get the error below. Honestly I don't even know where to start evaluating this because the DataflowRunner seems to be a black box.
Jan 14, 2019 11:26:51 AM org.apache.beam.runners.dataflow.DataflowRunner fromOptions
INFO: PipelineOptions.filesToStage was not specified. Defaulting to files from the classpath: will stage 165 files. Enable logging at DEBUG level to see which files will be staged.
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class org.apache.beam.model.pipeline.v1.RunnerApi$StandardPTransforms$Primitives does not implement the requested interface com.google.protobuf.ProtocolMessageEnum
at org.apache.beam.runners.core.construction.BeamUrns.getUrn(BeamUrns.java:27)
at org.apache.beam.runners.core.construction.PTransformTranslation.<clinit>(PTransformTranslation.java:58)
at org.apache.beam.runners.core.construction.UnconsumedReads$1.visitValue(UnconsumedReads.java:49)
at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:666)
at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at org.apache.beam.sdk.runners.TransformHierarchy$Node.access$600(TransformHierarchy.java:311)
at org.apache.beam.sdk.runners.TransformHierarchy.visit(TransformHierarchy.java:245)
at org.apache.beam.sdk.Pipeline.traverseTopologically(Pipeline.java:458)
at org.apache.beam.runners.core.construction.UnconsumedReads.ensureAllReadsConsumed(UnconsumedReads.java:40)
at org.apache.beam.runners.dataflow.DataflowRunner.replaceTransforms(DataflowRunner.java:868)
at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:660)
at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:173)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:313)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:299)
at (my code: pipe.run().waitUntilFinish();)
check the versions of beam etc and upgrade your dependencies where possible.
I had the same error and after seeing you get this error, I thought it must be a dependency conflict as it didn't exist before.
I'm using scio to deploy to dataflow and just referenced what they're using. https://github.com/spotify/scio/blob/v0.7.1/build.sbt
I updated guava and protobuf also.
I know you're using java, but try updating beam to 2.9.0 and maybe guava, protobuf...

Sonarqube : The 'report' parameter is missing

I am using MSBuild. I have Java 8 installed.
I am running the following commands:
SonarQube.Scanner.MSBuild.exe begin /k:"ABC" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92" /d:sonar.verbose=true
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:rebuild
SonarQube.Scanner.MSBuild.exe end /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92"
The last step fails:
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
12:53:21.909 Creating a summary markdown file...
12:53:21.918 Post-processing failed. Exit code: 1
The MSBuild version is greater than 14.
Java 8 is properly installed. Documentation indicates that Java 8 is adequate.
Any idea on what could be wrong?
Where do I add the -X switch? I tried on all 3 statements
Update :I installed Java SDK 9. Still same issue.
Update :With verbose logging and using /n naming parameter:
INFO: Analysis report generated in 992ms, dir size=4 MB
INFO: Analysis reports compressed in 549ms, zip size=1 MB
INFO: Analysis report generated in C:\ABC\.sonarqube\out\.sonar\scanner-report
DEBUG: Upload report
DEBUG: POST 400 http://localhost:9000/api/ce/submit?projectKey=ABC | time=1023ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.833s
INFO: Final Memory: 51M/170M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Process returned exit code 1
The SonarQube Scanner did not complete successfully
Creating a summary markdown file...
Post-processing failed. Exit code: 1
I've struggled the same problem with SonarQube and I've finally found a solution:
You need to restart sonar service after using evaluation token.
Please note this isn't the answer, however I feel this feedback is valuable to getting this question answered.
I can reproduce this issue in POSTMan with a POST request to:
http://localhost:9000/api/ce/submit?projectKey=myProjectKey
This returns
{
"errors": [
{
"msg": "The 'report' parameter is missing"
}
]
}
You can get a similar error by removing the projectKey query parameter. I tried adding a report query parameter and received the same error:
http://localhost:9000/api/ce/submit?projectKey=brian3016&report=report
Given this, I feel there is a problem with their code. It should have included a report parameter when creating the POST request, but it failed to do so.
Verbose output seems to have changed from using the -X switch to /d:sonar.verbose=true. E.G.
SonarScanner.MSBuild.exe begin /k:"myProjectKey" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="myLogin" /d:sonar.verbose=true
Note the verbose logging didn't give me any valuable insight.
(Also note that the documentation currently says to use SonarQube.Scanner.MSBuild.exe, but the verbose logger told me to switch to SonarScanner.MSBuild.exe)
SO...how we we report this issue to someone that can fix it? Their documentation says to go to Stackoverflow. So here we are.
I thought it may have been an issue with a project. So I created a new project with nothing other than the startup template Console Application. Same error.
In my case SonarQube 7.9.1 (deployed with Helm to Kubernetes cluster) was missing temp directory /opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT after Helm rollback. No idea what happened to it.
Logfile /opt/sonarqube/logs/web.log inside SonarQube pod had this error:
2021.02.02 06:57:03 WARN web[AXdZ6l6MParQCncJACv3][o.s.s.w.ServletRequest] Can't read file part for parameter report
java.io.IOException: The temporary upload location [/opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT] is not valid
The fix was to exec into pod and create the missing directory. Would like to know the reason though...
The issue is with the sonar service starting up.
First try to stop the SonarStart.bat by using Ctrl+c, and then try to open localhost:9000 ( or whichever port you configured sonar server).
If it is still opening then go to task manager and search for wrapper.exe service and stop the service. If no service is found then go to:
Task manager>Details> and stop all java.exe process.
Note: If you running many Java applications, right-click the java.exe and choose goto service, and stop only those java.exe that belongs to AppX deployment.services
Now start sonarstart.bat as administrator..
today i face the same error when using jenkins to scanner the code.
get the error when POST /api/ce/submit and get 400 code by add the sonar.verbose=true
i use the below step to check reason
first to restart the sonarqube => failed
check the report file size by using "du -sh" get 108m and DB server support 1G => failed
login the sonar-qube server and check the access.log, web.log and another log, finally find the error reason " Processing of multipart/form-data request failed. No space left on device", so i check the server by command "df -h", some devices are used 100% => so i remove some no-using file and fix it!!!
check if you have enough memory
ex: free -m
In my case I had to upgrade memory.

SonarQube Build Breaker plugin: Report processing did not complete successfully: FAILED

I am trying to upload reports generated by Istanbul to Sonar dashboard using a gulp task and it fails with the below error. Looks like the Build Breaker plugin in SonarQube is timing out before it can upload the report to Sonar. Any way that i can tweak this plugin?
I am using Sonar 5.3.
15:42:43.411 INFO: Analysis report generated in /workspace/{project}/.sonar/report
15:42:43.430 INFO: ------------------------------------------------------------------------
15:42:43.430 INFO: EXECUTION FAILURE
15:42:43.430 INFO: ------------------------------------------------------------------------
15:42:43.430 INFO: Total time: 5:06.287s
15:42:43.609 INFO: Final Memory: 57M/2603M
15:42:43.609 INFO: ------------------------------------------------------------------------
15:42:43.609 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: FAILED
at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(QualityGateBreaker.java:152)
at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(QualityGateBreaker.java:108)
at org.sonar.plugins.buildbreaker.QualityGateBreaker.executeOn(QualityGateBreaker.java:95)
at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:65)
at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
This is a known invalid issue: #14 (he problem occurs on the server side, not in Build Breaker mechanism/logic).
Matthew DeTullio's comment:
This is because the server side background task for your project is
failing. You need to check the logs there and fix that problem first.
The report processing step is when SQ computes the quality gate
status. This plugin simply checks the status computed there, so if
processing fails this plugin will mark the analysis a failure.
In my company we found on the server side:
java.lang.OutOfMemoryError: GC overhead limit exceeded
The reason could be any error in the SonarQube processing of background task.
And the error is very generic like below
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: FAILED
In my case, the server on which SonarQube is installed, ran out of disk space hence it was not able to write the logs.
So, the idea is to check sonar.log to understand whats wrong and rectify it, restart SonarQube service.
less <SONAR_INSTALL_DIR>/logs/sonar.log
2021-03-28 01:13:25,124 elasticsearch[sonarqube][management][T#3] ERROR An exception occurred processing Appender file_es org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /apps/sonarqube-8.3.0.34182/logs/es.log
Reboot the Sonar service
cd <SONAR_INSTALL_DIR>/bin
./sonar.sh stop
./sonar.sh start

sonar unable to create JDBC datasource

When I try to run sonar-runner from the command line for a project, I get a 500 error:
INFO - Install plugins
INFO - Install JDBC driver
INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 12.320s
Final Memory: 7M/152M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Fail to download [http://localhost:9000/api/server]. Response code: 500
UpDate
I think this is caused by conflit with local ruby version as I have in sonar.log this description:
ERROR web[o.s.s.ui.JRubyFacade] Fail to render: http://localhost:9000/api/server/index?format=json
undefined method `generate' for #<JSON::Ext::Generator::State:0x10b4e1f2>
/Users/me/.rvm/gems/ruby-1.9.3-p448/gems/json-1.8.1/lib/json/common.rb:223:in `generate'
/Users/me/.rvm/gems/ruby-1.9.3-p448/gems/json-1.8.1/lib/json/common.rb:470:in `JSON'
How can I fix this? Thanks
I found an old bug in the SonarQube issue tracker (http://jira.sonarsource.com/browse/SONAR-3579) that describes the same problem, it is indeed a compatibility issue. It is suggested as a workaround to unset GEM_PATH and GEM_HOME variables before launching Sonar.
I put the following two lines into the sonar startup script:
unset GEM_PATH
unset GEM_HOME
A restart of the sonar service solved the problem for me in SonarQube Version 5.1.1 and SonarQube Runner 2.4.

Jmeter(Unable to run Jmeter in Ubuntu Amazon Instance)

While running Jmeter in Ubuntu Amazon Instance, I am getting the following error--
ubuntu#ip-172-31-22-219:~/Jmeter/apache-jmeter-2.9/bin$ jmeter
[warning] /usr/bin/jmeter: Unable to locate commons-net in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-activation-1.1-spec in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-javamail-1.4-provider in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate jboss-j2ee in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate jdom1 in /usr/share/java
[warning] /usr/bin/jmeter: No JAVA_CMD set for run_java, falling back to JAVA_CMD = java
java.lang.Throwable: Could not access /usr/share/jmeter/lib/junit
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:96)
An error occurred: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
I don't know where exactly the problem is . Can any one please help?
Thanks,
Vimal
Seems like you are trying to start the GUI version of JMeter and not the NON GUI version.
If you want to run JMeter on the commandline, you can take a look at this page: http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/
jmeter -n -t MyTestPlan.jmx
-n ensures it runs in non-GUI mode.
You should see something like -
Created the tree successfully using Post Request.jmx
Starting the test # Mon Jun 02 16:10:44 IST 2014 (1401705644820)
Waiting for possible shutdown message on port 4445
Tidying up ... # Mon Jun 02 16:10:47 IST 2014 (1401705647509)
... end of run

Resources