I want an automated deploy to payara server with Jenkins, but I don't know how to achieve this. Could someone please help me?
Maybe I should use docker or any other application to make this job. I used the plugin "deploy war/ear" but this was the error:
C:\Program Files (x86)\Jenkins\workspace\pp1>exit 0
Deploying C:\Program Files (x86)\Jenkins\workspace\pp1\target\despliegue1-1.0-SNAPSHOT.war to container GlassFish 3.x Remote with context
ERROR: Build step failed with exception
org.glassfish.api.admin.InvalidCommandException: V3 cannot process this command at this time, please wait
at com.sun.enterprise.admin.remote.RemoteAdminCommand.fetchCommandModel(RemoteAdminCommand.java:1152)
at com.sun.enterprise.admin.remote.RemoteAdminCommand.getCommandModel(RemoteAdminCommand.java:330)
at com.sun.enterprise.admin.cli.remote.RemoteCommand.prepare(RemoteCommand.java:297)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:242)
at com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput(RemoteCommand.java:389)
at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:117)
Caused: java.lang.RuntimeException
at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)
at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:704)
Caused: java.lang.RuntimeException: error submitting remote command
at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:735)
at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:693)
at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:169)
Caused: java.lang.IllegalStateException: error submitting remote command
at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:171)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:439)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:197)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
at hudson.FilePath.act(FilePath.java:1077)
at hudson.FilePath.act(FilePath.java:1060)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE
Related
I'm trying to deploy the war to remote Glassfish 4.1 server using Jenkins (V2.138.1) deploy to container plugin(v1.13) with following configuration
WAR/EAR files : target/myapp.war
Context path : /myapp
Containers :
Glassfish 3.x
credential : admin/****
Glassfish home :
Glassfish admin port : 4848
Glassfish hostname : my-pc
But following error occurred :
ERROR: Build step failed with exception
org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; java.util.concurrent.TimeoutException
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:295)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:133)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:217)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
at hudson.FilePath.act(FilePath.java:1077)
at hudson.FilePath.act(FilePath.java:1060)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE
This is the problem with Glassfish v4.1.1
I upgraded Glassfish to v4.2.1. It's work for me:)
I am trying to set up a CI using Jenkins in my project
Steps done
1)Changed the workspace directory to a custom folder /var/jenkins-test/${ITEM_FULLNAME}
2)Proper repo URL in the source code management
But I am getting the following error after Jenkins build
java.io.IOException: Failed to mkdirs: /var/jenkins-test/node-express
at hudson.FilePath.mkdirs(FilePath.java:1170)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1200)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1724)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE
Artifacts are being copied, but while deploying it to tomcat, the following exception is being thrown
org.codehaus.cargo.container.ContainerException: Failed to deploy
[/home/sherlock/.jenkins/workspace/My_Staging/MyApi.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:106)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:184)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
at hudson.FilePath.act(FilePath.java:1047)
at hudson.FilePath.act(FilePath.java:1025)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by:
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
The Tomcat Manager responded "FAIL - Deployed application at context
path [/MyGubbiApi] but context failed to start " instead of the
expected "OK" message
The error indicates your war was deployed, but failed to start. Check your tomcat logs for more detailed errors.
Also to verify this issue is not related to your Jenkins job configuration, could you verify whether manually deploying the war works? If manually deploying works, then the issue is likely in the Jenkins job configuration. If manual deployment fails (with same error), the problem can be found in the tomcat logs.
I am having issues getting GitHub to talk to Jenkins after an upgrade to our private GitHub.
I had the webhooks setup and everything was working till the upgrade now I am getting the following error in the logs
ERROR: [GitHub Commit Status Setter] Failed to update commit state on
GitHub. Ignoring exception [{"message":"Not
Found","documentation_url":"https://developer.github.com/enterprise/2.11/v3"}]
has anyone seen this issue before?
Added Job:
Added error log:
ERROR: Build step failed with exception
java.io.FileNotFoundException: <redacted URL>
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
at org.kohsuke.github.Requester.parse(Requester.java:612)
at org.kohsuke.github.Requester.parse(Requester.java:594)
at org.kohsuke.github.Requester._to(Requester.java:272)
Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/enterprise/2.11/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:686)
at org.kohsuke.github.Requester._to(Requester.java:293)
at org.kohsuke.github.Requester.to(Requester.java:234)
at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:1075)
at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:160)
Caused: org.jenkinsci.plugins.github.common.CombineErrorHandler$ErrorHandlingException
at org.jenkinsci.plugins.github.common.CombineErrorHandler.handle(CombineErrorHandler.java:74)
at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:164)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
I think you should update the status result
I try to build my grails project with jenkins, i'm newbie on jenkins.
first step i get my project from bitbucket,
after i used the grail plugin to build but i have this error :
What's wrong with my configuration, it's not a jenkins user right issue as i could see in several tickets
[mycj] $ /var/jenkins_home/workspace/mycj/grailsw -Dgrails.work.dir=mycj cl
ean --non-interactive --plain-output
FATAL: command execution failed
java.io.IOException: Cannot run program "/var/jenkins_home/workspace/mycj/grailsw" (in directory "/var/jenkins_home/workspace/mycj"): error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:245)
at hudson.Proc$LocalProc.<init>(Proc.java:214)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
at hudson.Launcher$ProcStarter.start(Launcher.java:384)
at hudson.Launcher$ProcStarter.join(Launcher.java:395)
at com.g2one.hudson.grails.GrailsBuilder.perform(GrailsBuilder.java:266)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 15 more
Build step 'Build With Grails' marked build as failure
Finished: FAILURE
It looks like the Jenkins user doesn't have write permission on the working directory.