Run testSuite in katalon using Jenkins throwing "Access denied" - jenkins

When I build My KatalonTestSuite using Jenkins in windows 10 I am getting below error message.
Started by user Forough Omidvar
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\KatalonTestSuiteRun
[KatalonTestSuiteRun] $ "C:\Program Files\Git\bin" -xe C:\Windows\TEMP\jenkins7833660586059993479.sh
Access is denied
FATAL: command execution failed
java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "C:\Program Files\Git\bin" (in directory "C:\Program Files (x86)\Jenkins\workspace\KatalonTestSuiteRun"): CreateProcess error=5, Access is denied
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:250)
at hudson.Proc$LocalProc.<init>(Proc.java:219)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
at hudson.Launcher$ProcStarter.start(Launcher.java:455)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1853)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Build step 'Execute shell' marked build as failure
Finished: FAILURE
It seems Jenkin users don’t have the right permission to access the files but I have permission via windows/Security.

Related

AutoDeploy Jenkins, Payara

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

Build step 'Windows PowerShell' marked build as failure in jenkins

I am trying to run a simple powershell script as a post build windows powershell step.
the command I have given is powershell -File test.ps1.
the test.ps1 file has a simple write-host that says: Write-Host "Hello how are you doing"
the build is a maven project and runs fine with out the inclusion of the windows powershell post step. However, with the inclusion of the powershell script it fails and throws the following error-
[JENKINS] Archiving C:\Jenkins\workspace\WLR3\pom.xml to aBILLity/NxTier/1.0-SNAPSHOT/NxTier-1.0-SNAPSHOT.pom
[WLR3] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\TEST_R~1\AppData\Local\Temp\jenkins9080398754273983665.ps1'"
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "powershell.exe" (in directory "C:\Jenkins\workspace\WLR3"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:249)
at hudson.Proc$LocalProc.<init>(Proc.java:218)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
at hudson.Launcher$ProcStarter.start(Launcher.java:449)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:939)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:890)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1794)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Windows PowerShell' marked build as failure
channel stopped
any help would be much appreciated!
thanks a lot!

Build Grails project (2.5) with jenkins

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.

Jenkins - FileName Extensions error

I am using Jenkins for my work where I am trying to JMeter through Jenkins build option to run a batch file, but blocked with the below error.
Started by user admin
Building in workspace D:\
[] $ cmd /c call C:\Users\XXXX\AppData\Local\Temp\hudson4481668363865698547.bat
The filename or extension is too long
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd" (in directory "D:\"): CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:243)
at hudson.Proc$LocalProc.<init>(Proc.java:212)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
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:1720)
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: CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 16 more
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
I have tried different option of invoking the build but always getting the same error.
Request you to please help in this issue, as I am not able to proceed.

sonar not generating reports with jenkins

I have jenkins installed and integrated with sonar but I get the following error during sonar analysis:
send-mail: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
[workspace] $ mvn -f /root/.jenkins/jobs/test_4.9/workspace/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://xx.xx.xx.xx:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true -Dsonar.host.url=http://xx.xx.xx.xx:8080/sonar
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/root/.jenkins/jobs/test/workspace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
at hudson.Launcher$ProcStarter.start(Launcher.java:338)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.tasks.Maven.perform(Maven.java:263)
at hudson.plugins.sonar.utils.SonarMaven.executeMaven(SonarMaven.java:138)
at hudson.plugins.sonar.SonarPublisher.executeSonar(SonarPublisher.java:300)
at hudson.plugins.sonar.SonarPublisher.perform(SonarPublisher.java:261)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632)
at hudson.model.Run.run(Run.java:1463)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:239)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 18 more
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Follow the instructions correctly in the URL to make sonar works with jenkins.

Resources