Jenkins build not able to generate sources - jenkins

I'm having some trouble with my jenkins build - I'm trying to generate some sources based on several json files. No problem on my lokalhost, but my Jenkins build always fails with this exception:
[ERROR] Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.23:generate (DriversGeneration) on project DKVGatewayRestClient: Execution DriversGeneration of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.23:generate failed: Unrecognised URI, can't resolve this: http://gateway-int.dkv-euroservice.com/metadatastore/1.0.0.1-SNAPSHOT/mds/com/dkv/shared/drivers/getCardList.json: Connection timed out -> [Help 1]
Basically it says that http://gateway-int.dkv-euroservice.com/metadatastore/1.0.0.1-SNAPSHOT/mds/com/dkv/shared/drivers/getCardList.json is not a valid URI, but this definatly is not the case. As said, my localhost can work with this URI without any problems - browser and maven build work exactly as expected. Even using requesting this URL via curl on my Jenkins server works perfectly fine. Just the Jenkins build constantly fails. Have already restartet Jenkins but no difference ...
Can anyone give me a hint? Thanks in advance and regards. Sebastian

Related

Error Sonarqube IllegalStateException: Fail to request http://192.xx.yy.zz:9000/api/ce/submit?projectKey=

When I activate the integration between Jenkins and Sonarqube, with a project having already put data on the sonar website, I get the error during the Sonarqube scanner execution.
This error is:
java.lang.IllegalStateException:
Fail to request http://192.168.163.128:9000/api/ce/submit?projectKey=itoo-exam-api&projectName=itoo-exam-api
How would you troubleshoot this?
Check the full debug log, as in this thread:
I enabled -X at the sonar_run.bat then found out that it required the following path
C:\Windows\System32\config\systemprofile\AppData\Local\Temp
to exists, my case is that I am without the Temp folder, so the upload failed with the above error.
(Or add a TEMPDIR variable as in here)
More generally, do check the sonarqube logs.

Travis CI - android gradle project

I'm attempting to create a travis build to run this android gradle project.
Travis is erroring on this java related SSL exception. I can't figure out what I'm missing. Any help would be greatly appreciated. I've attached the link to the build, with the full error and build info.
$ ./gradlew clean build
Downloading https://services.gradle.org/distributions/gradle-2.2.1- all.zip
Exception in thread "main" java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching services.gradle.org found.
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Here is the full build.
Travis Build
Here's the cause:
http://discuss.gradle.org/t/urgent-ssl-apache-configuration-for-services-gradle-org-is-bad/8808
Workaround would be to modify gradle/wrapper/gradle-wrapper.properties with distributionUrl using http instead of https. Until they fix the problem.

Jenkins build breaks on SaxParsing xsd scheme

i have a maven2 project which is built periodically by jenkins. The bad thing about it ... it won´t build anymore.
I´m not sure what has changed, because i don´t have any tickets in the code itself or jenkins configuration, but strange as it is..... the local build works.
Normally that would hint on a configuration problem in jenkins, but the error in jenkins is:
[ERROR] XJC while parsing schema(s) file:/global/contint/build_server/jenkins/jobs/ERIC_E4N%20Continuous-Trunk-Check/workspace/Eric4N-publishing-xsd/src/main/resources/E4N_E4D_InterfaceSalesAllowanceDoType.xsd[76,14]: org.xml.sax.SAXParseException: 'SalesAllowanceDoType' is already defined
Locally I don´t get this error....
Any clues where I could continue my search ?
Thanks alot and Greetings !

Trying to set up jenkins with perforce plugin: unable to check workspace against depot

I have perforce installed on my ubuntu server and am accessing it from a Windows XP machine on the same network. It is located at mysql:1667. I am able to access perforce via p4v from the windows machine.
I installed jenkins on the same server, and can access it via mysql:8080. I have installed the perforce plugin, and put set the file location at usr/local/bin/p4.
When I try to create a new project, I put in the info mysql:1667, jenkins, XXXXXXXX, jenkins_space (which has been created and is listed among the workspaces in p4v), I see the red "unable to check workspace against depot". Reading that this is possibly a misleading error message, I try to do a build anyway (with absolutely no build commands). The "build" fails, and I get the following:
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/test7
Using master perforce client: jenkins_space
[test7] $ /usr/local/bin/p4 workspace -o jenkins_space
Caught exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406)
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301)
at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1545)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1506)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:843)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
at hudson.model.Run.execute(Run.java:1678)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
ERROR: Unable to communicate with perforce. Connect to server failed; check $P4PORT
Finished: FAILURE
Any ideas what I might have/be doing wrong?
Thank you,
Brian
The error is indicating that it isn't connecting to the server. There's nothing in the logs indicating that the calls to perforce are getting a valid P4PORT and they aren't being sent command-line arguments.
Double-check that your Source Code Management plugin in your Job is configured as you expect it to be. The P4PORT should be coming from Jenkins immediately before the first p4 command is generated (although it won't appear in the logs).
Generally "Unable to check workspace against depot" is a valid diagnostic. If you get "Workspace does not exist", that may be bogus, due to a number of factors, but the "Unable to check" error tends to indicate that a connection can't be made or there is an authentication failure.
If you are using SSL, make sure you put that in the connection string as well (ssl:mysql:1667 as an example), since that will cause a connection failure, although it should generate a different message in the logs.
I faced a similar issue and restarting the jenkins server on the slave machine worked for me.
Check the configuration in jenkins and ensure that the user used for perforce has valid permissions and the P4PORT settings are correct.Once you are done,restart the jenkins service in the slave.
Seems like jenkins was still using the old settings which was causing the failure.

NullPointerException in Jenkins

I'm currently reading the book 'Jenkins Continuous Integration Cookbook', and I came across this error after building a project on Jenkins:
ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users#googlegroups.com
java.lang.NullPointerException
at java.io.File.<init>(File.java:239)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:58)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
at hudson.FilePath.act(FilePath.java:1001)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:604)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
at hudson.model.Run.execute(Run.java:1604)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:246)
project=hudson.maven.MavenModuleSet#68f55ff2[A]
project.getModules()=[]
project.getRootModule()=null
I'm confused why I'm getting this, since my Java code is all autogenerated via Maven, and my tests in HTML format. I was able to successfully build the code using maven, before placing a directory with /src and pom.xml as it's children onto bitbucket.
Any ideas why this error is showing? Any advice will be appreciated.
Adding the rest of the error logs below (couldn't before because I was getting formatting errors).
FATAL: null
java.lang.NullPointerException
at java.io.File.<init>(File.java:239)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:58)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:41)
at hudson.FilePath.act(FilePath.java:1001)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:604)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
at hudson.model.Run.execute(Run.java:1604)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:246)
According a similar bug report (but not exactly the same) I guess that your problem may be caused by a wrong configuration in Jenkins.
I suggest you to check the MAVEN_HOME used by Jenkins (i.e. check that it is really a MAVEN_HOME directory and is the correct maven version)

Resources