Jenkins error: Authorization failed to svn in sonarqube. - mysql

I am using Jenkins 2.8 with Sonarqube Plugin 2.2.1. A week ago we had a problem with the sonar server and we get this error. To solve the problem we decided to create a new mysql schema and link it with sonar server.
We did something like this:
mysql –u root -plinux;
create database sonarqube2 character set utf8;
grant all privileges on sonarqube2.* to 'sonarsuer'#'localhost' identified by 'linux';
grant all privileges sonarqube2.* to 'sonaruser'#'%' identified by 'linux';
flush privileges;
Note: We used the same user we had in the old database
After update sonar.jdbc.url with the new data in sonar.properties and in Jenkins configuration we manage to deploy sonarqube again. Then, we tried to launch a SONAR job that we have already created before and we get this error:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server)
This is the whole stacktrace:
[INFO] --- sonar-maven-plugin:2.6:sonar (default-cli) # cas ---
[INFO] SonarQube version: 5.0.1
[WARNING] Invalid POM for org.samba.jcifs:jcifs-ext:jar:0.9.4, transitive dependencies (if any) will not be available, enable debug logging for more details
INFO: Default locale: "es_ES", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Work directory: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar
INFO: SonarQube Server 5.0.1
[INFO] [13:47:05.297] Load global referentials...
[INFO] [13:47:05.751] Load global referentials done: 458 ms
[INFO] [13:47:05.771] User cache: /home/tomcat/.sonar/cache
[INFO] [13:47:05.801] Install plugins
[INFO] [13:47:07.792] Install JDBC driver
[INFO] [13:47:07.802] Create JDBC datasource for jdbc:mysql://myserver:3306/sonarqube2?useUnicode=true&characterEncoding=utf8
[INFO] [13:47:11.353] Initializing Hibernate
[ERROR] [13:47:15.591] No license for plugin views
[INFO] [13:47:16.958] Load project referentials...
[INFO] [13:47:18.003] Load project referentials done: 1045 ms
[INFO] [13:47:18.003] Load project settings
[INFO] [13:47:19.038] Loading technical debt model...
[INFO] [13:47:19.097] Loading technical debt model done: 59 ms
[INFO] [13:47:19.115] Apply project exclusions
[INFO] [13:47:19.336] ------------- Scan CAS (Central Authentication Service)
[INFO] [13:47:19.339] Load module settings
[INFO] [13:47:21.334] Loading rules...
[INFO] [13:47:23.049] Loading rules done: 1715 ms
[INFO] [13:47:23.115] Configure Maven plugins
[INFO] [13:47:23.367] No quality gate is configured.
[INFO] [13:47:29.435] Initializer FindbugsMavenInitializer...
[INFO] [13:47:29.437] Initializer FindbugsMavenInitializer done: 2 ms
[INFO] [13:47:29.437] Base dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk
[INFO] [13:47:29.437] Working dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar
[INFO] [13:47:29.438] Source paths: src/main/webapp, pom.xml, src/main/java
[INFO] [13:47:29.438] Test paths: src/test/java
[INFO] [13:47:29.439] Binary dirs: target/classes
[INFO] [13:47:29.439] Source encoding: UTF-8, default locale: es_ES
[INFO] [13:47:29.439] Index files
[INFO] [13:47:30.480] 36 files indexed
[INFO] [13:47:31.213] Quality profile for java: Sonar way
[INFO] [13:47:31.213] Quality profile for js: Sonar way
[INFO] [13:47:31.300] JIRA issues sensor will not run as some parameters are missing.
[INFO] [13:47:31.392] Sensor JavaSquidSensor...
[INFO] [13:47:32.089] Java Main Files AST scan...
[INFO] [13:47:32.094] 25 source files to be analyzed
[INFO] [13:47:36.733] Java Main Files AST scan done: 4643 ms
[INFO] [13:47:36.733] 25/25 source files analyzed
[INFO] [13:47:36.746] Java bytecode scan...
[INFO] [13:47:37.302] Java bytecode scan done: 556 ms
[INFO] [13:47:37.305] Java Test Files AST scan...
[INFO] [13:47:37.306] 5 source files to be analyzed
[INFO] [13:47:37.626] 5/5 source files analyzed
[INFO] [13:47:37.627] Java Test Files AST scan done: 321 ms
[INFO] [13:47:37.633] Package design analysis...
[INFO] [13:47:37.684] Package design analysis done: 51 ms
[INFO] [13:47:37.801] Sensor JavaSquidSensor done: 6409 ms
[INFO] [13:47:37.813] Sensor QProfileSensor...
[INFO] [13:47:37.819] Sensor QProfileSensor done: 6 ms
[INFO] [13:47:37.819] Sensor Maven dependencies...
[INFO] [13:47:40.023] Sensor Maven dependencies done: 2204 ms
[INFO] [13:47:40.026] Sensor JavaScriptSquidSensor...
[INFO] [13:47:40.205] 6 source files to be analyzed
[INFO] [13:47:45.590] 6/6 source files analyzed
[INFO] [13:47:48.499] Sensor JavaScriptSquidSensor done: 8473 ms
[INFO] [13:47:48.506] Sensor CoverageSensor...
[INFO] [13:47:48.507] Sensor CoverageSensor done: 1 ms
[INFO] [13:47:48.507] Sensor InitialOpenIssuesSensor...
[INFO] [13:47:48.525] Sensor InitialOpenIssuesSensor done: 18 ms
[INFO] [13:47:48.525] Sensor ProjectLinksSensor...
[INFO] [13:47:48.557] Sensor ProjectLinksSensor done: 32 ms
[INFO] [13:47:48.558] Sensor VersionEventsSensor...
[INFO] [13:47:48.600] Sensor VersionEventsSensor done: 42 ms
[INFO] [13:47:48.600] Sensor FileHashSensor...
[INFO] [13:47:48.608] Sensor FileHashSensor done: 8 ms
[INFO] [13:47:48.610] Sensor CoberturaSensor...
[INFO] [13:47:48.616] parsing /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/site/cobertura/coverage.xml
[INFO] [13:47:49.078] Sensor CoberturaSensor done: 468 ms
[INFO] [13:47:49.078] Sensor SCM Sensor...
[INFO] [13:47:49.089] SCM provider for this project is: svn
[INFO] [13:47:49.089] Retrieve SCM blame information...
[INFO] [13:47:49.218] 36 files to be analyzed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:04.240s
[INFO] Finished at: Fri Aug 12 13:47:54 CEST 2016
[INFO] Final Memory: 58M/955M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server)
Should I change aditional credential in Jenkins?
Any help would be appreciated.

See SonarQube 5.0 SCM support documentation for details on how to configure SVN authentication (which is what is failing here) using sonar.svn.username and sonar.svn.password.secured.
(side-note: SonarQube 5.0 is pretty old and known for having performance issues, you should really upgrade to latest/LTS version)

Related

GPG key skipped during maven release

I am following all the instructions listed here to release my project to sonatype repo: https://dzone.com/articles/publish-your-artifacts-to-maven-central
But still getting the following error during signing artifacts
[INFO] --- maven-gpg-plugin:3.0.1:sign (sign-artifacts) # exceptionless-client ---
gpg: skipped "0x9d0e3e1d": No secret key
gpg: signing failed: No secret key
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.750 s
[INFO] Finished at: 2021-08-03T10:52:18+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign (sign-artifacts) on project exceptionless-client: Exit code: 2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rezad the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I can see the key listed when I run gpg --list-key command.
I used git bash to generate new keys, but I didn't know that git bash also comes with a bundled gpg program and it was using that. However, the maven-gpg-plugin was trying to find keys using the gpg program installed under C:/Program Files(x86). After I created keys using this I installed it worked perfectly.

gcloud function: Could not find local artifact: How to solve?

My cloud function code, is a maven-jar-project. It depends on other internal maven jar, so I have added that dependency to the pom.xml.
Expected: I expect that the dependent jars will be automatically included in the cloud function deployment, however I get an error "could not find artifact". Local compilation & running does not have any issue.
I don't want to copy paste those dependency sourcecode directly to my gcloud maven project. [bad ]
[INFO] Installing <removed>-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.659 s
[INFO] Finished at: 2021-04-10T16:31:39-04:00
[INFO] ------------------------------------------------------------------------
>gcloud functions deploy response-adapter --entry-point fun.pubsub.<removed> --runtime java11 --memory 512MB --trigger-topic <removed>
--env-vars-file env.yml
Deploying function (may take a while - up to 2 minutes)...-
For Cloud Build Stackdriver Logs, visit:
Deploying function (may take a while - up to 2 minutes)...failed.
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: ...maven-plugin-2.2.0.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/cloud/tools/appengine-plugins-core/0.8.1/appengine-plugins-core-0.8.1.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar (521 kB at 375 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.21/snakeyaml-1.21.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar (502 kB at 357 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/cloud/tools/appengine-maven-plugin/2.2.0/appengine-maven-plugin-2.2.0.jar (76 kB at 53 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/cloud/tools/appengine-plugins-core/0.8.1/appengine-plugins-core-0.8.1.jar (236 kB at 164 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.5/commons-io-2.5.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar (85 kB at 59 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.21/snakeyaml-1.21.jar (299 kB at 205 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar (615 kB at 416 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.5/commons-io-2.5.jar (209 kB at 141 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/cloud/functions/invoker/java-function-invoker/1.0.2/java-function-invoker-1.0.2.jar (4.2 MB at 2.6 MB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.127 s
[INFO] Finished at: 2021-04-10T20:35:09Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project gcf-removed-adapter: Could not resolve dependencies for project gcf-demo:gcf-removed-adapter:jar:0.0.1-SNAPSHOT: Could not find artifact myadaptor:removed-mapper:jar:1.0-
SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException; Error ID: efa79f31
To achieve this, you need to deploy from JAR. Like that, you create a JAR with all the dependency already included in it (maven shade). No resolution at deployment time, only get your JAR and put it in Cloud Functions.

Maven / Fabric8 - build an OpenShift container image against a remote OpenShift installation

With Docker I need only provide DOCKER_HOST and appropriate credentials in order for the fabric8 plugin to be able to build my container image. As long as a Docker Registry is available - there is no need to install Docker-related infrastructure on the actual host which does the image build (e.g. my Bamboo agent).
With OpenShift I cannot seem to find a way to do this. It seems instead that I must run the maven goals on a host on which OpenShift has been installed, which must necessarily be a RedHat Linux host.
This seems far more complicated than it should be. Am I missing something here?
Is there a way to reference a remote OpenShift environment from the fabric8-maven-plugin when in openshift mode?
Thanks, Robin.
I'm from Fabric8 team. You don't need to run goals from host on which OpenShift has been install. Plugin reads your ~/.kube/config for information related to your OpenShift cluster and uses your API token in order to interact with OpenShift REST API.
Fabric8 Maven Plugin has been migrated to Eclipse JKube. Although Fabric8 Maven Plugin also works just fine with remote OpenShift Clusters. It's the same Fabric8 Maven Plugin but with a different name and targeted OpenShift Plugin. I would give this answer with Eclipse JKube's OpenShift Maven Plugin. You can have it in your pom.xml like this:
<dependency>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
</dependency>
Here is a demo using a simple Random generator application: https://github.com/rohanKanojia/eclipse-jkube-demo-project
Log into your OpenShift Cluster with credentials provided:
~ : $ oc login https://your-cluster.openshift.com--token=your-token
Logged into "https://your-cluster.openshift.com:443" as "rohanKanojia" using the token provided.
You have one project on this server: "rokumar"
Using project "rokumar".
Go to your project and Issue OpenShift Maven Plugin goals:
eclipse-jkube-demo-project : $ mvn package oc:build oc:resource oc:apply
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< meetup:random-generator >-----------------------
[INFO] Building random-generator 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # random-generator ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # random-generator ---
...
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) # random-generator ---
[INFO] Building jar: /home/rohaan/work/repos/eclipse-jkube-demo-project/target/random-generator-0.0.1.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.3.RELEASE:repackage (repackage) # random-generator ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- openshift-maven-plugin:1.0.1-SNAPSHOT:build (default-cli) # random-generator ---
[INFO] oc: Using OpenShift build with strategy S2I
[INFO] oc: Running in OpenShift mode
[INFO] oc: Running generator spring-boot
[INFO] oc: spring-boot: Using Docker image quay.io/jkube/jkube-java-binary-s2i:0.0.8 as base / builder
[INFO] oc: [random-generator:0.0.1] "spring-boot": Created docker source tar /home/rohaan/work/repos/eclipse-jkube-demo-project/target/docker/random-generator/0.0.1/tmp/docker-build.tar
[INFO] oc: Adding to Secret pullsecret-jkube
[INFO] oc: Using Secret pullsecret-jkube
[INFO] oc: Creating BuildServiceConfig random-generator-s2i for Source build
[INFO] oc: Adding to ImageStream random-generator
[INFO] oc: Starting Build random-generator-s2i
[INFO] oc: Waiting for build random-generator-s2i-1 to complete...
[INFO] oc: Using quay.io/jkube/jkube-java-binary-s2i:0.0.8 as the s2i builder image
[INFO] oc: INFO S2I source build with plain binaries detected
[INFO] oc: INFO S2I binary build from fabric8-maven-plugin detected
[INFO] oc: INFO Copying binaries from /tmp/src/deployments to /deployments ...
[INFO] oc: random-generator-0.0.1.jar
[INFO] oc: INFO Copying deployments from deployments to /deployments...
[INFO] oc: '/tmp/src/deployments/random-generator-0.0.1.jar' -> '/deployments/random-generator-0.0.1.jar'
[INFO] oc: INFO Cleaning up source directory (/tmp/src)
[INFO] oc:
[INFO] oc: Pushing image 172.30.39.149:5000/rokumar/random-generator:0.0.1 ...
[INFO] oc: Pushed 0/4 layers, 19% complete
[INFO] oc: Pushed 1/4 layers, 25% complete
[INFO] oc: Push successful
[INFO] oc: Build random-generator-s2i-1 in status Complete
[INFO] oc: Found tag on ImageStream random-generator tag: sha256:51756e1ff9b639c939f3c0c9246ab4ed924faa269bc9cbf05035c859d19fa50c
[INFO] oc: ImageStream random-generator written to /home/rohaan/work/repos/eclipse-jkube-demo-project/target/random-generator-is.yml
[INFO]
[INFO] --- openshift-maven-plugin:1.0.1-SNAPSHOT:resource (default-cli) # random-generator ---
[INFO] oc: Using docker image name of namespace: rokumar
[INFO] oc: Running generator spring-boot
[INFO] oc: spring-boot: Using Docker image quay.io/jkube/jkube-java-binary-s2i:0.0.8 as base / builder
[INFO] oc: jkube-controller: Adding a default DeploymentConfig
[INFO] oc: jkube-service: Adding a default service 'random-generator' with ports [8080]
[INFO] oc: jkube-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] oc: jkube-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] oc: jkube-revision-history: Adding revision history limit to 2
[INFO] oc: validating /home/rohaan/work/repos/eclipse-jkube-demo-project/target/classes/META-INF/jkube/openshift/random-generator-service.yml resource
[INFO] oc: validating /home/rohaan/work/repos/eclipse-jkube-demo-project/target/classes/META-INF/jkube/openshift/random-generator-route.yml resource
[INFO] oc: validating /home/rohaan/work/repos/eclipse-jkube-demo-project/target/classes/META-INF/jkube/openshift/random-generator-deploymentconfig.yml resource
[INFO]
[INFO] --- openshift-maven-plugin:1.0.1-SNAPSHOT:apply (default-cli) # random-generator ---
[INFO] oc: Using OpenShift at https://api.rh-idev.openshift.com:443/ in namespace rokumar with manifest /home/rohaan/work/repos/eclipse-jkube-demo-project/target/classes/META-INF/jkube/openshift.yml
[INFO] oc: OpenShift platform detected
[INFO] oc: Using project: rokumar
[INFO] oc: Creating a Service from openshift.yml namespace rokumar name random-generator
[INFO] oc: Created Service: target/jkube/applyJson/rokumar/service-random-generator.json
[INFO] oc: Creating a DeploymentConfig from openshift.yml namespace rokumar name random-generator
[INFO] oc: Created DeploymentConfig: target/jkube/applyJson/rokumar/deploymentconfig-random-generator.json
[INFO] oc: Creating Route rokumar:random-generator host: null
[INFO] oc: HINT: Use the command `oc get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2020-09-29T10:57:34+05:30
[INFO] ------------------------------------------------------------------------
Access your application deployed into OpenShift
eclipse-jkube-demo-project : $ oc get routes
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
random-generator random-generator-rokumar.b6ff.rh-idev.openshiftapps.com random-generator 8080 None
weather-web-application weather-web-application-rokumar.b6ff.rh-idev.openshiftapps.com weather-web-application 8080 None
eclipse-jkube-demo-project : $ curl random-generator-rokumar.b6ff.rh-idev.openshiftapps.com/random | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45 0 45 0 0 56 0 --:--:-- --:--:-- --:--:-- 56
{
"id": "d79ca3fd-4505-43d1-9920-a39ac15a3b49"
}
For more information, you can checkout Eclipse JKube Quickstarts

ejabberd my browser client is not connecting to server

I am trying to connect my ejabberd but it is not connecting.I checked the ejabberd.log file but i am not getting the issue what it is exactly? I am new here so if anybody knows then please help me in starting the ejabberd on ubuntu 16.04.
ejabberd.log:
2017-03-16 10:00:09.903 [info] <0.481.0>#ejabberd_listener:accept:333 (#Port<0.12667>) Accepted connection ::FFFF:127.0.0.1:53524 -> ::FFFF:127.0.0.1:5280
2017-03-16 10:00:09.904 [info] <0.554.0>#ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.12667>,#Port<0.12668>}}
2017-03-16 10:00:09.906 [info] <0.481.0>#ejabberd_listener:accept:333 (#Port<0.12669>) Accepted connection ::FFFF:127.0.0.1:53526 -> ::FFFF:127.0.0.1:5280
2017-03-16 10:00:09.907 [info] <0.555.0>#ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.12669>,#Port<0.12670>}}
2017-03-16 10:00:09.919 [info] <0.481.0>#ejabberd_listener:accept:333 (#Port<0.12671>) Accepted connection ::FFFF:127.0.0.1:53528 -> ::FFFF:127.0.0.1:5280
2017-03-16 10:00:09.920 [info] <0.556.0>#ejabberd_http:init:158 started: {p1_tls,{tlssock,#Port<0.12671>,#Port<0.12672>}}

Jenkins-Sonar communication on Openshift

I am making a development environnement based on Jenkins and Sonar.
Both are placed on isolated gears.
The Jenkins gear has been created with the Instant App option.
The Sonar gear has been created thanks to these github indications.
I created a Jenkins free-style job in order to analysis a Maven project.
The script used on that job is based on this wordpress article.
# Build script of the Job
settingsPath=$OPENSHIFT_DATA_DIR/settings.xml
settings="<settings>\n <localRepository>$OPENSHIFT_DATA_DIR</localRepository>\n</settings>\n"
echo $settings > $settingsPath
# Cleaning of the workspace
mvn --global-settings $settingsPath clean test
# Preparation of Sonar informations
export SONAR_JDBC="-Dsonar.jdbc.url=jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8"
export SONAR_DRIVER=-Dsonar.jdbc.driver=com.mysql.jdbc.Driver
export SONAR_DBUSER=-Dsonar.jdbc.username=xxx
export SONAR_DBPASS=-Dsonar.jdbc.password=xxx
export SONAR_URL=-Dsonar.host.url=http://sonar-alc.rhcloud.com
export SONAR_OPTS="$SONAR_JDBC $SONAR_DRIVER $SONAR_DBUSER $SONAR_DBPASS $SONAR_URL"
# Sonar analysis
mvn --global-settings $settingsPath sonar:sonar $SONAR_OPTS
On the execution of the mvn sonar:sonar command, I have the following error:
Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure
Here is the stacktrace corresponding to this error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ClientEvalcolor 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.1:sonar (default-cli) # ClientEvalcolor ---
[INFO] SonarQube version: 3.3.1
[INFO] [03:28:09.324] Create JDBC datasource for jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.634s
[INFO] Finished at: Mon Nov 25 03:28:10 EST 2013
[INFO] Final Memory: 12M/182M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project ClientEvalcolor: Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure
[ERROR]
[ERROR] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.): No route to host
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I know that an Openshift mysql database isn't accessible from a remote server, but Sonar seems to be runnable on Openshift, and the article that I previously linked successfully did it.
Do you have any idea about how to fix that ?
Thank you,
Alvaro C.
I finally succeeded on making my Jenkins gear send data to my Sonar gear !
I'll explain the solution I found here, maybe it will help some people.
There a three ways to access an Openshift database:
The gear that contains that database can access it easily on localhost:3306. That's the usual case.
From your own computer, you can bind ports (with the rhc tool) in order to access the database. This can't be applied from another gear, and requires the rhc tool to keep running.
Any gear from your account can access the database of a scalable application.
Usage:
When creating the Sonar gear, it's necessary to set the gear as scalable (this can't be done with jenkins/diy gears). Adding a database cartridge to this gear will consume 1 gear, but this database can be accessed from any Openshift application.
Notice that this new database will have a port different than 3306 (in my case, 39536). If you don't have this, that's probably that the embedded app isn't set scalable.
The Jenkins job script that I put in my question is correct. Changing all these "xxxxx" and the port with your database info will permit Jenkins to do his job !