SonarQube 5.6 - update plugin behind proxy (HTTPS) and web context - sonarqube

Using the update center behind a proxy with an associated context gives me this known error:
Fail to download the plugin (css, version 3.1) from https://github.com/racodond/sonar-css-plugin/releases/download/3.1/sonar-css-plugin-3.1.jar
Error is : Fail to download: https://github.com/racodond/sonar-css-plugin/releases/download/3.1/sonar-css-plugin-3.1.jar (no proxy)
I've seen I must provide http.proxyHost/Port in the sonar.properties configuration file, but I've got problems with web context (assigned by sonar.web.context=/mycontext).
Two cases:
http.proxyHost=myhost/mycontext => fails because tries connection with myhost/mycontext:port
Fail to download the plugin (css, version 3.1) from https://github.com/racodond/sonar-css-plugin/releases/download/3.1/sonar-css-plugin-3.1.jar
Error is : Fail to download: https://github.com/racodond/sonar-css-plugin/releases/download/3.1/sonar-css-plugin-3.1.jar (HTTP proxy: <myhost>/<mycontext>:443)
http.proxyHost=myhost => fails and sonarqube don't show any plugin
Note: Ports are 80 y 443 (standard), https uses same host.
Any help is much appreciated.

Related

JFrog Artifactory unable to download jars from remote repository

When I run my maven build pointing to the JFrog Artifactory setup I see the following error in the log:
2020-05-14T04:41:01.640Z [jfrt ] [ERROR] [dcb2a29d3c46472e] [o.a.r.RemoteRepoBase:806 ] [http-
nio-8081-exec-1] - IO error while trying to download resource
'jcenter:org/springframework/security/spring-security-web/4.2.2.RELEASE/spring-security-web-
4.2.2.RELEASE.jar': **javax.net.ssl.SSLException: Connection reset**
2020-05-14T04:41:01.641Z [jfrt ] [WARN ] [dcb2a29d3c46472e] [o.a.e.DownloadServiceImpl:266 ] [http-
nio-8081-exec-1] - **Sending HTTP error code 404: Connection reset**
I have checked the connectivity to the jcenter repo from within the Artifactory admin conosole, and its says that its able to connect.
Require your assistance.
Regards
Please check the URL you are using for JCenter and make sure it is using secure HTTP - https://jcenter.bintray.com.
Starting in January 2020, JCenter is only serving requests made with HTTPS. From that point on, all requests made with HTTP are denied and any builds that use a JCenter URL with the non-secure HTTP protocol will fail.
For more info see the following blog post.

Jmeter - Plugins behind the proxy

I placed plugin manager in "lib\ext" folder and tried to open it showed error:
java.io.IOException: Repository responded with wrong status code: 407
Jmeter version - 3.3
Plugin version - 0.16
Jmeter is invoked from command line by using the following parameters:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -H Proxyserver -P 1234 -u princen -a ***
Parameters modified as suggested here
JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***" C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat
Above try gives the following error message
Windows cannot find "JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
When I tried to changes command to the following:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
I received an error:
java.io.IOException: Repository responded with wrong status code: 407
Can someone please correct parameters required to load the plugin manager?
Ensure you use last version of jmeter-plugins download manager.
Regarding your parameters, you're mixing different configurations, just set (for both http and https):
JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=john -Dhttps.proxyPass=password -Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=john -Dhttp.proxyPass=password"
Where password is your real password.
None of above methods working for me. Its really tough to work with Java(due to Loadrunner background). I added Ultimate thread alone and its working fine.
Thank you all for your inputs..
JMeter is using the official proxy configuration from Oracle (like here: https://memorynotfound.com/configure-http-proxy-settings-java/)
The problem is that the jmeter documentation is wrong about the password parameter: it should be http.proxyPassword not http.proxyPass.
Also you must use the https. properties for secured urls you want to access using the proxy. And the http. properties for non secured.

Nexus 3.6 OSS Docker Hub Proxy - Can docker search but not docker pull

I've deployed Nexus OSS 3.6 and it's being served on http://server:8082/nexus
I have configured a docker-hub proxy using the instructions in http://www.sonatype.org/nexus/2017/02/16/using-nexus-3-as-your-repository-part-3-docker-images/ and have configured the docker-group to serve under port 18000
I can perform the following:
docker login server:18000
docker search server:18000/jenkins
but when I run:
docker pull server:18000/jenkins
i get the following error:
Error response from daemon: Get http://10.105.139.17:18000/v2/jenkins/manifests/latest:
error parsing HTTP 400 response body: invalid character '<'
looking for beginning of value:
"<html>\n<head>\n<meta http-equiv=\"Content-Type\"
content=\"text/html;charset=ISO-8859-1\"/>\n<title>
Error 400 </title>\n</head>\n<body>\n<h2>HTTP ERROR: 400</h2>\n
<p>Problem accessing /nexus/v2/token.
Reason:\n<pre> Not a Docker request</pre></p>\n<hr />
Powered by Jetty:// 9.3.20.v20170531<hr/>\n
</body>\n</html>\n"
My jetty nexus.properties config file is:
# Jetty section
application-port=8082
application-host=0.0.0.0
# nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/nexus
# Nexus section
# nexus-edition=nexus-pro-edition
# nexus-features=\
# nexus-pro-feature
Could anyone offer any suggestions on how to fix this please?
I have the same problem when I enabled the anonymous read on some docker repository.
Repositories->Docker hosted->Check the checkbox (Disable to allow anonymous pull) from the repository.
seems you need to upgrade Nexus to 3.6.1 according to :
https://issues.sonatype.org/browse/NEXUS-14488
in order to allow anonymous read again

Gradle Docker plugin broken pipe on osx

Hi I try to use this awesome Gradle plugin: https://github.com/bmuschko/gradle-docker-plugin
I use the following URL obtained from my docker-machine / kitematic installation on osx:
docker-machine url default
tcp://192.168.99.100:2376
However using:
url = "tcp://192.168.99.100:2376"
results in the error:
org.apache.http.conn.UnsupportedSchemeException: tcp protocol is not supported
When I change the tcp to httpI get a different error:
INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[pool-4-thread-1] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
org.apache.http.client.ClientProtocolException
in case the gradle dockerBuildImage task is run.
But manually building the Dockerfile created by gradle works without any problems.
The following code can be used to replicate the problem. https://github.com/geoHeil/lab04/blob/master/build.gradle
Docker-machine enables TLS by default. I Switching to the TLSmode should be a good solution:
url = 'https://192.168.59.103:2376'
certPath = new File(System.properties['user.home'], '.boot2docker/certs/boot2docker-vm')

Socket.IO flashsocket security sandbox error

I have been playing around with node.js and socket.io for the past few days. Everything works fine on my local machine (windows using iss for a webserver), but when uploading it to my remote server (ubuntu box), I get security errors.
[trace] Warning: Failed to load policy file from http://localhost:8000/crossdomain.xml
[trace] *** Security Sandbox Violation ***
[trace] Connection to http://localhost:8000/socket.io/1/ halted - not permitted from http://****/virtualcinema/VirtualCinema.swf
[trace] Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://****/virtualcinema/VirtualCinema.swf cannot load data from http://localhost:8000/socket.io/1/.
The AS3 code it's erroring on is:
Security.loadPolicyFile("xmlsocket://localhost:10843");
socket = new FlashSocket("localhost:8000");
The policy file is being served correctly on port 10843 and I can receive the policy file fine at http://**:10843/ in my browser. Why is it trying to load the policy file on port 8000. That warning does not appear on my local build.
The socket.io code:
socket = io.listen(8000);
socket.configure(function()
{
socket.set("transports", ["flashsocket"]);
socket.set("log level", 2);
});
I'm confused as to why it gets resolved fine when I test it on a localmachine but not on a remote one. Any help would be much appreciated :)
The crossdomain.xml I am using:
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>
Fixed. I changed it from pointing to localhost to my servers externalIP.
I had tried this before, but unfortunately the server had cached my swf file and I did not realise it was fixed.
Security.loadPolicyFile("xmlsocket://****.com:10843");
socket = new FlashSocket("****.com:8000");

Resources