What is the right host url in sonar for bamboo(plugin) configuration? - sonarqube

I have to set host url in sonar for bamboo(bambo plugin) configuration.
While my local docker program is running sonarqube container, it is confused to use localhost:9000 at host url in app configuration.
The error message is saying An error occurred while connecting the given SonarQube server: localhost:9000 failed to respond.
What should I do? Am I doing wrong or Is there anything to set more thing?
enter image description here

As your SonarQube instance is running in a different server, you need to point your "Sonar for Bamboo" plugin to that server, port 9000 (default of SonarQube). So, for example, if your server containing the SonarQube instance has the IP address 192.168.15.1 in your network, you need to configure the plugin to http://192.168.15.1:9000.
I did it in my environment and it works perfectly.

Related

Jenkins cannot be accessed by ip address even from the same computer

I downloaded the jenkins war file in my private computer. I started the jenkins using java -jar jenkins.war. I can access the jenkins at localhost:8080. I have inbound and outbound rules for allowing port 8080 in my firewall. I get my ipv4 address from command prompt using 'ipconfig'. However I am unable to access the jenkins using this ip from other systems in the same network. I am even unable to access it from my own systems incognito mode with http://ipadress:8080. Cant the jenkins in my machine be accessed by others?
I also tried installing jenkins as service but could not access it. I tried changing the jenkins url in setting to http://ipadress:8080 also.

How to deploy a spring boot application to tomcat server from jenkins?

Sample Spring boot application is created and build on Jenkins.
For Deployment of war file in tomcat server ,
I am facing a several issues.
Error :
Credentials At Jenkins :
tomcat-users.xml File :
Still I am facing the same issue. I had searched in google and stackoverflow but still i can't found the correct answer.
Can Any one help me in this ?
Your error message is a connection refused: connect exception. You should check the following:
Your Tomcat server is up and running on port 8082 at the same server where your jenkins server is running (localhost). To make sure, run: telnet localhost 8082 from the same server commandLine ( I see you are in windows). If it connects then your Tomcat server is OK.
Check if the manager application of Tomcat is deployed. Try to load the following web page and check if exists: http://localhost(or hostname of server):8082/manager/html
Try to disable the windows firewall and any other firewall you may have (or antivirus firewall) and check if it prevents jenkins to connect to Tomcat (again check with telnet command)

Jmeter plugin perfMon not listening to localhost

In jMeter, I have installed perfMon plugin that listens to 4444 port successfully. My application runs on localhost:8080. It seems when I give default http port as 8080 as per the attached image, api works fine but no graph for perfMon metric plugin. But when I give http default port as 4444, perfMon shows graph but API fails giving 404.
How can I run both my application in localhost:8080 and listen to same port using server agent/ perfMon agent (which runs on 4444 port)?
FYI. I need to monitor the tomcat server(where my tested application resides).For that I have installed server-agent in my tomcat server.Edited jmeter.properties like below: remote_hosts=localhost:4444
I am running my application in tomcat of docker container and I have installed perfMon server agent locally at my system /opt directory. Does it has to installed somewhere specific directory ?
In server agent console, I am getting error
ERROR 2018-03-09 13:25:19.126 [kg.apc.p] (): Error getting metric
org.hyperic.sigar.SigarException: No such process: 728
at org.hyperic.sigar.SigarProxyCache.invoke(SigarProxyCache.java:220)
at com.sun.proxy.$Proxy0.getProcCpu(Unknown Source)
at kg.apc.perfmon.metrics.CPUProcMetric.getValue(CPUProcMetric.java:35)
at kg.apc.perfmon.PerfMonMetricGetter.getMetricsLine(PerfMonMetricGetter.java:114)
at kg.apc.perfmon.PerfMonWorker.processSenders(PerfMonWorker.java:280)
at kg.apc.perfmon.PerfMonWorker.run(PerfMonWorker.java:243)
at java.lang.Thread.run(Thread.java:748)
as I have set the pid in metric parameter as follows(my tomcat pid =728 in docker)
every time after hitting API in jMeter, it is saying client disconnted
I got the solution. When it says "client disconnected", it is not an error, it is info. I forgot to change pid in metric parameter whenever I run the server.

Sonar Runner 404 localhost

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.

Jenkins Deploy Error Tomcat 6.x

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

Resources