Sonarqube : The 'report' parameter is missing - windows

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.

Related

msdeploy fails with ERROR_CONNECTION_TERMINATED on TeamCity

When i run msdeploy from teamcity i get ERROR_CONNECTION_TERMINATED. But if i run it from cmd on the same server (where teamcity is running) it goes through. ERROR_CONNECTION_TERMINATED occours only if site is up to date, if it has to do alot of stuff then there is no error.
I'm not running fiddler that could be causing this.
Here is command:
msdeploy -verb:sync -source:contentPath="%teamcity.build.checkoutDir%\publish\web" -dest:contentPath="%DeployPath%\web",ComputerName="%MSDeploy.ComputerName%",Username="%MSDeploy.Username%",Password="%MSDeploy.Password%",AuthType="Basic" -useCheckSum -skip:Directory="\\web\\uploads$" -skip:File="\\app_offline.htm$" -allowUntrusted 
Output:
[11:32:15][Step 9/9] PowerShell Executable:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:32:15][Step 9/9] Working directory:
C:\TeamCity\buildAgent\work\81d93b891723185
[11:32:15][Step 9/9] Command:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:32:15][Step 9/9] PowerShell arguments: -NonInteractive,
-ExecutionPolicy, ByPass, -File, C:\TeamCity\buildAgent\temp\buildTmp\powershell4517896340075893898.ps1
[11:32:16][Step 9/9] Info: Using ID
'a6102aa0-ae6b-43b5-9f15-5a6c0977232f' for connections to the remote
server.
[11:32:17][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\app_offline.htm) skipped due to skip
directive 'CommandLineSkipDirective 2'.
[11:32:27][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\ePeroWs\app_offline.htm) skipped due
to skip directive 'CommandLineSkipDirective 2'.
[11:32:27][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\ipsWebApi\app_offline.htm) skipped due
to skip directive 'CommandLineSkipDirective 2'.
[11:32:37][Step 9/9] Info: Object dirPath
(C:\inetpub\dev.proplatform\web\uploads) skipped due to skip directive
'CommandLineSkipDirective 1'.
[11:32:37][Step 9/9] Info: Using ID
'98d4de3d-2ed9-4a43-b156-ebf69bac99dc' for connections to the remote
server.
[11:33:13][Step 9/9] Error Code: ERROR_CONNECTION_TERMINATED
[11:33:13][Step 9/9] More Information: Web Deploy experienced a
connection problem with the server and had to terminate the
connection. Contact your server administrator if the problem
persists. Learn more at:
https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
[11:33:13][Step 9/9] Error: Unexpected end of file has occurred. The
following elements are not closed: results. Line 1, position 550.
[11:33:13][Step 9/9] Error count: 1.
I tried running command in cmd and powershell on teamcity. I got error on TC, but if i run command directlly in cmd or powershell on the same server i got no error.
I found what the problem was. It was Windows real time protection which was cousing this problem. So i added process msdeploy.exe as an exception and now it works fine.
I hope this helps somebody in the future. I spent days trying to figure it out what the problem was.

Getting started on Corda on Windows

I am trying to get started on Corda on Windows and I am following the started guides using the following docs:
https://docs.corda.net/quickstart-index.html#setting-up-a-development-environment
https://vimeo.com/217462250
https://docs.corda.net/getting-set-up.html
I have downloaded all the latest version (as of 22.09.19) of Git (2.23.0, 64-bit version) / Java JDK (jdk-8u221-windows-x64.exe) / and the latest IntelliJ.
However I am facing the following issues:
When I open the 'Event Log' I don't see any messages event gradle message
Also when I try and run the Nodes from Intellj > Run CordaApps Kotlin I get the following error message:
When I try and run the nodes from the Git bash terminal
Jatin#LAPTOP-16QRBJDJ MINGW64 ~/cordapp-tutorial (release-V3)
$ ./gradlew.bat deployNodes
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
:java-source:compileJava UP-TO-DATE
:java-source:processResources UP-TO-DATE
:java-source:classes UP-TO-DATE
:java-source:configureCordappFatJar
:java-source:jar UP-TO-DATE
:java-source:deployNodes
Bootstrapping local network in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes
Node config files found in the root directory - generating node directories
Generating directory for Notary
Generating directory for PartyA
Generating directory for PartyB
Generating directory for PartyC
Nodes found in the following sub-directories: [Notary, PartyA, PartyB, PartyC]
Waiting for all nodes to generate their node-info files...
:java-source:deployNodes FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:deployNodes'.
> Node in Notary exited with 1 when generating its node-info - see logs in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes\Notary\logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 23s
5 actionable tasks: 2 executed, 3 up-to-date
The log:
CAPSULE EXCEPTION: Illegal char <"> at index 34: C:\Program Files\Java\jdk1.7.0\bin" (for stack trace, run with -Dcapsule.log=verbose)
USAGE: <options> corda.jar
Actions:
capsule.version - Prints the capsule and application versions.
capsule.modes - Prints all available capsule modes.
capsule.jvms - Prints a list of all JVM installations found.
capsule.help - Prints this help message.
Options:
capsule.mode=<value> - Picks the capsule mode to run.
capsule.reset - Resets the capsule cache before launching. The capsule to be re-extracted (if applicable), and other possibly cached files will `enter code here`be recreated.
capsule.log=<value> (default: quiet) - Picks a log level. Must be one of none, quiet, verbose, or debug.
capsule.java.home=<value> - Sets the location of the Java home (JVM installation directory) to use; If 'current' forces the use of the JVM that launched the capsule.
capsule.java.cmd=<value> - Sets the path to the Java executable to use.
capsule.jvm.args=<value> - Sets additional JVM arguments to use when running the application."
Have you set Java classpath to point to jdk1.8.0_221?
From the log record it seems that the jdk is 1.7. Corda require at least version 8u171. Please check the classpath and installed java version.
You should add Java to the PATH environment variable by following the instructions in the Oracle documentation - "https://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path"
Which java variant you are using?
If it is Adopt OpenJDK 8, use HotSpot JVM not the OpenJ9 Version.
Here is the link for windows x64 AdoptOpenJDK 8

Issue installing openwhisk with incubator-openwhisk-devtools

I have a blocking issue installing openwhisk with docker
I typed make quick-start right after a git pull of the project incubator-openwhisk-devtools. My OS is Fedora 29, docker version is 18.09.0, docker-compose version is 1.22.0. JDk 8 Oracle.
I get the following error:
[...]
adding the function to whisk ...
ok: created action hello
invoking the function ...
error: Unable to invoke action 'hello': The server is currently unavailable (because it is overloaded or down for maintenance). (code ciOZDS8VySDyVuETF14n8QqB9wifUboT)
[...]
[ERROR] [#tid_sid_unknown] [Invoker] failed to ping the controller: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for health-0: 30069 ms has passed since batch creation plus linger time
[ERROR] [#tid_sid_unknown] [KafkaProducerConnector] sending message on topic 'health' failed: Expiring 1 record(s) for health-0: 30009 ms has passed since batch creation plus linger time
Please note that controller-local-logs.log is never created.
If I issue a touch controller-local-logs.log in the right directory the log file is always empty after I try to issue make quick-start again.
http://localhost:8888/ping gives me the right answer: pong.
http://localhost:9222 is not reacheable.
Where am I wrong?
Thank you in advance

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 - Fail to request server version | HTTP Status 404 /

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

Resources