I am running sonarqube using gradle command ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url.
I am getting error Failed to upload report - HTTP code 413.
Request Entity Too Large.
I am using sonarserver version : Community Edition Version 7.8.
I am running sonar report using gradle command: ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url
I am getting error Failed to upload report.
Sonarqube server is on oracle cloud (oci) node and the report file size is 10M.
413 Request Entity Too Large
I got this when I was using the Nginx server for SonarQube.
Explanation
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.
Solution
For Nginx servers
To allow the request size to be up to 20 megabytes, add the following line to your Nginx configuration file:
...
client_max_body_size 20M;
....
configuration files should be found in /etc/nginx/ directory
Tips
I would recommend updating the dedicated configuration file for SonarQube server placed inside /etc/nginx/sites-enabled/ folder
this property can be placed inside the server {...} , http {...} or, location{...} block of the configuration file
Related
I followed this YouTube video
https://www.youtube.com/watch?v=dIJ-VLkuw0s
at 10:15 min, they have added "http://localhost:9080/res" as server URL
when I tried the same , I got below error
The location "http://localhost::9080/" is not a valid file system path: : is an invalid character in resource name 'localhost::9080'.
I downloaded WebSphere from https://www.ibm.com/support/pages/websphere-liberty-developers
WebSphere Liberty Web Profile 8 21.0.0.4 file(93MB)
unzipped the downloaded file
I ran server from location by running bat file from location
C:\Users\vaageesh\wlp-webProfile8-21.0.0.4\wlp\bin\server.bat
still when I added "http://localhost:9080/res" as server URL
Target servers tab in
"Create Deployment configuration" step, its throwing error
could you guide me exactly how to configure server and pre-requisites needed to deploy rules on this server with configurations we have done
you need to unselect "Local Rule ...." to have a proper wizard that is relative to Web deploiement.
The screenshot you are mentioning is about local directory folder deploiement.
See picture.
Best
Emmanuel
I pulled the latest docker image for sonarqube and the image runs fine. The sonarqube server is listening at localhost:9000. When I run the dotnet sonarscanner begin to analyze asp.net Core 3.1 project, after some time, I get timeout error. Below is the log from the command
Using the .NET Core version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
18:47:29.653 Updating build integration targets...
18:49:09.803 Failed to request and parse 'http://localhost:9000/api/server/version': The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.811 The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.814 Pre-processing failed. Exit code: 1
The API request works fine through Postman. What could cause the failure?
After I try to change port 9000 to 8000 and retry and it worked!
ports:
- "8000:9000"
I'm kind of stuck troubleshooting an issue.
During a Jenkins build I see the following error:
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://services.gradle.org/distributions/gradle-1.7-bin.zip
This also happens when I run ./gradlew clena build in my project in localhost (no VPN, etc)
It does NOT happen when I paste the binary URL into my browser (so that old gradle version does exist)
Binary referenced in gradel-wrapper.properties:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip
Any ideas?
Comments have pointed you to answer, but to clarify with more information and references.
Gradle announced on October 17, 2019, that starting on Janurary 2020, all Gradle services will no longer serve requests made with HTTP.
The URL you have specified for in gradle-wrapper.properties is for HTTP, switch to the HTTPS URL and it should work.
Reference: https://blog.gradle.org/decommissioning-http
I'm trying to get Sonar working locally on an OS X box to do some proof of concept work, I've downloaded the following:
Sonar Qube: 4.5.6
Sonar Runner: 2.4
Sonar Qube is configured as:
sonar.web.host=localhost
sonar.web.context=/sonar
sonar.web.port=9000
When I try and use Sonar Runner with one of the example projects I get the following error:
ERROR: Error during Sonar runner execution
ERROR: Fail to request server version
ERROR: Caused by: Status returned by url : 'http://localhost:9000/sonar/api/server/version' is invalid : 404
If I copy and paste the URL from the console into the browser then the page loads (displaying 4.5.6).
What could be causing the script to receive a 404?
The box is behind a proxy but nothing should be trying to get to the outside world
UPDATE:
Changing the configuration from localhost to using the machines IP address produces a timeout rather than a 404, everything still works fine through the browser.
So it turned out my problem was that the JVM wasn't using the proxy settings of my machine, I had to add the following to the Sonar runner script.
SONAR_RUNNER_OPTS="-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=my.local.host"
It's possible that HTTP queries from sonar-runner are routed based on system proxy settings, while your browsers may use their own proxy settings.
Go check the system-wide setting:
System Preferences/Network/Advanced/Proxies/Bypass proxy settings for these Hosts & Domains
And make sure that localhost/127.0.0.1 is in there.
Im trying to use jenkins to build and deploy the war file to a tomcat present in different server and im getting the following error -
Deploying /var/lib/jenkins/jobs/ura_Web/workspace/ura-1.0.war to container Tomcat 6.x Remote
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/jobs/ura_Web/workspace/ura-1.0.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:195)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath.act(FilePath.java:905)
at hudson.FilePath.act(FilePath.java:878)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:969)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1618)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:491)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: java.io.FileNotFoundException: http://192.168.2.X/manager/list
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
... 16 more </code>
Can anyone tell me what is wrong?
I had exactly this problem just now and still have not solved it. However, I suspect it is happening because of proxy issues.
Is it possible to try setting the manager URL to http://localhost
rather than http://192.168.2.X? This worked for me, showing that the credentials were at least correct and the module functions. When I switch the manager URL back to a remote machine or the FQDN of the local server, it again failed. This indicates to me something proxy related.
The only trouble then is configuring the proxy settings for Jenkins, especially http.nonProxyHosts. If you can do that maybe you'll have more luck than me. I cannot get the Jenkins System Information proxy values to change no matter what I do!
Also manually test from a browser on both the build server and elsewhere your access to the manager URL: http://192.168.2.X/manager/list