I already have installed JMeter 5.X, I don't know why bzt is trying to download it again.
I edited the .bzt-rc file. Provided path of installed JMeter. Below code from .bzt-rc file.
path: C:\001_team\apache-jmeter-5.2.1\bin # path to local jmeter installation ~/.bzt/jmeter-taurus/{version}/bin/jmeter
Didn't find a way to set the existing path of installed JMeter.
Tried ti use existing JMETER in cmd:
bzt -o modules.jmeter.path=C:\001_Team\apache-jmeter-5.2.1\bin InContact.jmx
C:\001_TeamPlatinum>bzt InContact.jmx
13:29:30 INFO: Taurus CLI Tool v1.14.1[0m
13:29:30 INFO: Starting with configs: ['C:\\Users\\teams\\AppData\\Local\\Temp\\jmx_u679qs83.json'][0m
13:29:30 INFO: Configuring...[0m
13:29:30 INFO: Artifacts dir: C:\001_Team\2020-02-21_13-29-30.812601[0m
13:29:30 INFO: Preparing...[0m
[33m13:29:31 WARNING: Failed to check for updates[0m
13:29:31 INFO: Will install JMeter into C:\Users\teams\.bzt\jmeter-taurus\5.2.1[0m
[31m13:29:31 ERROR: Can't fetch https://jmeter.apache.org/download_jmeter.cgi[0m
13:29:31 INFO: Downloading: https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip[0m
[31m13:29:32 ERROR: Error while downloading https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip: Unsuccessful download from https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip[0m
100% [ ] ETA: --:--:--
[31m13:29:32 ERROR: Internal Error: JMeter download failed: No more links to try[0m
13:29:32 INFO: Post-processing...[0m
13:29:32 INFO: Artifacts dir: C:\001_TeamPlatinum\2020-02-21_13-29-30.812601[0m
[33m13:29:32 WARNING: Done performing with code: 1[0m
This path setting must point to the root folder of your JMeter installation, not to the "bin" subfolder
So change your configuration to look like:
path: C:\001_team\apache-jmeter-5.2.1
or
bzt -o modules.jmeter.path=C:\001_Team\apache-jmeter-5.2.1
and Taurus should pick up your local JMeter installation.
References:
JMeter Location & Auto-Installation
Navigating your First Steps Using Taurus
Related
I am trying to containerize my application build, though, when running the build that uses bazel with bazel-gazelle inside a container I will get this error:
$ bazel run --spawn_strategy=local //:gazelle --verbose_failures
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/BUILD.bazel:43:15: GoToolchainBinary external/go_sdk/builder [for host] failed: (Exit 1): go failed: error executing command
(cd /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/execroot/__main__ && \
exec env - \
GOROOT_FINAL=GOROOT \
external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a)
# Configuration: e0f1106e28100863b4221c55fca6feb935acec078da5376e291cf644e275dae5
# Execution platform: #local_config_platform//:host
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
Target //:gazelle failed to build
INFO: Elapsed time: 2.302s, Critical Path: 0.35s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
I tried to run it standalone:
$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
and still got no success.
Never had this kind of link problem and the linker don't provide much more information. Tried to install all packages I could think of and still no luck.
For context:
Running Ubuntu 20.04 LTS
Docker 20.10.9
Bazel 4.2.2
Rules GO v0.31.0
Bazel Gazelle v0.25.0
Also tried to run it with the strace, though I don't think I am skilled enough to find meaningful information from the tool output.
#edit
For more context:
e$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -v -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
HEADER = -H5 -T0x401000 -R0x1000
searching for runtime.a in /opt/go/pkg/linux_amd64/runtime.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
I'm trying to start JMeter from Yandex.Tank in Yandex Cloud instance, based on Ubuntu 18.
Installed JMeter here: /home/tank/apache-jmeter-5.2.1/bin/jmeter
If I run JMeter using this path it starts successfully:
/home/tank/apache-jmeter-5.2.1/bin/jmeter -n -t ReloadTest.jmx -l result-1.jtl -e -o ./result-1
When I run yandex-tank, there is an error message:
[ERROR] Test interrupted:
<type 'exceptions.RuntimeError'>: Unable to access to JMeter executable file or it does not exist:
/home/tank/apache-jmeter-5.2.1/bin/jmeter
load.yaml:
phantom:
enabled: false
jmeter:
enabled: true
jmx: ReloadTest.jmx
buffered_seconds: 10
jmeter_path: /home/tank/apache-jmeter-5.2.1/bin/jmeter
jmeter_ver: 5.2
ext_log: all
overload:
enabled: true
package: yandextank.plugins.DataUploader
token_file: "token.txt"
Tried this, without success:
chmod +x /home/tank/apache-jmeter-5.2.1/bin/jmeter
chmod 777 /home/tank/apache-jmeter-5.2.1/bin/jmeter
I cannot reproduce your issue using latest YandexTank 1.12.8.1, you might want to update your current installation using pip like:
pip install https://api.github.com/repos/yandex/yandex-tank/tarball/master
If will still be experiencing problems - run YandexTank with -v command-line argument, it should produce more verbose debug messages so you will be able to figure out where the problem lives
2020-03-16 09:45:38,960 [DEBUG] yandextank.core.tankcore tankcore.py:267 Starting <yandextank.plugins.JMeter.plugin.Plugin object at 0x7fe01d57a090>
2020-03-16 09:45:38,968 [INFO] yandextank.plugins.JMeter.plugin plugin.py:119 Starting /home/tank/apache-jmeter-5.2.1/bin/jmeter with arguments: ['/home/tank/apache-jmeter-5.2.1/bin/jmeter', '-n', '-t', '/modified_s7ZsHU.jmx', '-j', '/logs/2020-03-16_09-45-22.748390/jmeter_0vPrFi.log', '-Jjmeter.save.saveservice.default_delimiter=\\t', '-Jjmeter.save.saveservice.connect_time=true']
2020-03-16 09:45:50,632 [WARNING] yandextank.plugins.JMeter.plugin plugin.py:188 JMeter UDP port wasn't discovered
2020-03-16 09:45:50,635 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.JMeter.plugin.Plugin object at 0x7fe01d57a090> required 11.666250 seconds to start
2020-03-16 09:45:50,637 [DEBUG] yandextank.core.tankcore tankcore.py:267 Starting <yandextank.plugins.RCAssert.plugin.Plugin object at 0x7fe01d5059d0>
2020-03-16 09:45:50,640 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.RCAssert.plugin.Plugin object at 0x7fe01d5059d0> required 0.000021 seconds to start
2020-03-16 09:45:50,647 [DEBUG] yandextank.core.tankcore tankcore.py:267 Starting <yandextank.plugins.Telegraf.plugin.Plugin object at 0x7fe01d505110>
2020-03-16 09:45:50,650 [DEBUG] yandextank.plugins.Telegraf.plugin plugin.py:62 load_start_time = 1584351950.65
2020-03-16 09:45:50,655 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.Telegraf.plugin.Plugin object at 0x7fe01d505110> required 0.005424 seconds to start
2020-03-16 09:45:50,659 [DEBUG] yandextank.core.tankcore tankcore.py:267 Starting <yandextank.plugins.ResourceCheck.plugin.Plugin object at 0x7fe01d505c50>
2020-03-16 09:45:50,664 [INFO] yandextank.core.tankcore tankcore.py:271 Plugin <yandextank.plugins.ResourceCheck.plugin.Plugin object at 0x7fe01d505c50> required 0.000014 seconds to start
2020-03-16 09:45:50,666 [INFO] yandextank.core.tankcore tankcore.py:279 Waiting for test to finish...
You can also try to change the ownership of the whole JMeter folder to the tank user like:
chown -R tank /home/tank/apache-jmeter-5.2.1
And finally, you can consider switching to Taurus tool which better supports JMeter and is capable of automatically downloading JMeter with plugins so you won't have to worry about installing JMeter. Check out Navigating your First Steps Using Taurus article for more details.
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.
When I execute the pipeline below I get a 401 error on http://mysonarhost.my.domain:9000/api/settings/values.protobuf.
The same command executes without errors from a command prompt.
The api/settings/values.protobuf URL can be accessed using a browser.
I tried setting the token in various places but none seem to help .
Versions
sonarqube Version 6.3.1 (build 21392)
Jenkins ver. 2.75 on RHEL 7
Jenkins Node on windows 2012 R2
sonar-scanner 2.8
pipeline
https://i.imgur.com/S3Vk0fl.png
log
sonar-scanner -X -Dproject.settings=..\sonar_ccesmarttools.properties -Dsonar.logon=mytoken
06:32:33.829 INFO: Scanner configuration file: X:\workspaces\common\tools\hudson.plugins.sonar.SonarRunnerInstallation\SonarQubeScanner\bin\..\conf\sonar-scanner.properties
06:32:33.836 INFO: Project root configuration file: X:\cce\SmartLisaNightly\git\ccesmarttools\CceSmartTools\..\sonar_ccesmarttools.properties
06:32:33.873 INFO: SonarQube Scanner 3.0.3.778
06:32:33.874 INFO: Java 1.8.0_73 Oracle Corporation (64-bit)
06:32:33.874 INFO: Windows Server 2012 R2 6.3 amd64
06:32:33.874 INFO: SONAR_SCANNER_OPTS=-Xmx16g
06:32:34.041 DEBUG: keyStore is :
06:32:34.042 DEBUG: keyStore type is : jks
06:32:34.042 DEBUG: keyStore provider is :
06:32:34.042 DEBUG: init keystore
06:32:34.042 DEBUG: init keymanager of type SunX509
06:32:34.158 INFO: User cache: C:\Users\jenkinsuser\.sonar\cache
06:32:34.158 DEBUG: Extract sonar-scanner-api-batch in temp...
06:32:34.173 DEBUG: Get bootstrap index...
06:32:34.173 DEBUG: Download: http://mysonarhost.my.domain:9000/batch/index
06:32:34.232 DEBUG: Get bootstrap completed
06:32:34.233 DEBUG: Create isolated classloader...
06:32:34.243 DEBUG: Start temp cleaning...
06:32:34.255 DEBUG: Temp cleaning done
06:32:34.255 DEBUG: Execution getVersion
06:32:34.260 DEBUG: Execution start
06:32:34.557 DEBUG: Publish global mode
06:32:34.698 INFO: Load global settings
06:32:34.749 DEBUG: GET 401 http://mysonarhost.my.domain:9000/api/settings/values.protobuf | time=43ms
06:32:34.751 INFO: ------------------------------------------------------------------------
06:32:34.751 INFO: EXECUTION FAILURE
06:32:34.751 INFO: ------------------------------------------------------------------------
06:32:34.751 INFO: Total time: 0.961s
06:32:34.788 INFO: Final Memory: 17M/1963M
06:32:34.788 INFO: ------------------------------------------------------------------------
06:32:34.788 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller
From the documentation, the property should be sonar.login, not sonar.logon.
I managed to solve it thanks to Gilles QUERRET answer and comments.
the token should be in the sonar.login property
added the withCredentials node
stored the token with id SONAR_TOKEN in http://myjenkinsserver:8090/credentials/store/system/domain/_/
changed single quotes in the bat command to double quotes to allow $SONAR_TOKEN to be evaluated
not part of the initial question, added -Dsonar.projectVersion=${env.BUILD_NUMBER} to show the Jenkins build number in SonarQube
Working stage definition
stage('SonarQube analysis') {
withSonarQubeEnv('SonarQube') {
withCredentials([string(credentialsId: 'SONAR_TOKEN', variable: 'SONAR_TOKEN')]) {
def scannerHome = tool 'SonarQubeScanner';
env.PATH = "${scannerHome}\\bin;${env.PATH}";
dir('X:\\cce\\SmartLisaNightly\\git\\smartlisa\\SmartLisaFrontend') {
bat "sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dproject.settings=..\\sonar_SmartLisaFrontend.properties -Dsonar.projectVersion=${env.BUILD_NUMBER}"
}
}
}
}
With each run done by console or by Jenkins throws me the following error:
SonarQube Runner 2.4
Java 1.8.0_51 Oracle Corporation (32-bit)
Linux 2.6.32-504.30.3.el6.i686 i386
INFO: Runner configuration file: /usr/local/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /opt/apps/php-sonar-runner/sonar-project.properties
INFO: Default locale: "es_ES", source code encoding: "UTF-8"
INFO: Work directory: /opt/apps/php-sonar-runner/./.sonar
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.042s
Final Memory: 0M/28M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Fail to request server version
ERROR: Caused by: Status returned by url : 'http://xxx.xxx.xx.xxx:9000/api/server/version' is invalid : 404
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Open the URL 'http://xxx.xxx.xx.xxx:9000/api/server/version' in a browser, see if it gives you a 404 error. If so, you need to find the right path to Sonar root on the remote server, maybe 'http://xxx.xxx.xx.xxx:9000/sonar/'?
When you have the full URL of Sonar, update the sonar.host.url property in your pom accordingly. See full documentation for more details.
Check the value of sonar.web.context = /myPath maybe you have some path and you configure other path in your url at your jenkis, tfs, etc. That is the reason you get an 404 error.
In your example you should not have that value configurated or without a value.
'http://xxx.xxx.xx.xxx:9000/myPath/api/server/version
In your sonar-runner.properties file
define #--- Default SonarQube sever as give below
sonar.host.url=http://localhost:9000/sonar
Also cross check in sonar.properties file i.e
sonar.web.port=9000
sonar.web.host=127.0.0.1
sonar.web.context=/sonar