Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62135

Problems while trying to run a simple groovy scryt

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • pipeline
    • None

      I have a very simple script that I am trying to run on a windows 10 acting as my jenkins server:

      node {
      stage("postman test")

      { git "https://github.com/eyanez111/Postman-newman-jenkins.git" sh "npm install" sh "npm run api-test-production"       }

      }

       

       

      I am getting this out. I have done tons of research but I have not found anything:

      Started by user admin
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\jsonplaceholder_api_tests
      [Pipeline] {
      [Pipeline] stage
      [Pipeline]

      { (postman test) [Pipeline] git No credentials specified Cloning the remote Git repository Cloning repository https://github.com/eyanez111/Postman-newman-jenkins.git > git.exe init C:\Program Files (x86)\Jenkins\workspace\jsonplaceholder_api_tests # timeout=10 Fetching upstream changes from https://github.com/eyanez111/Postman-newman-jenkins.git > git.exe --version # timeout=10 > git.exe fetch --tags --force --progress -- https://github.com/eyanez111/Postman-newman-jenkins.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git.exe config remote.origin.url https://github.com/eyanez111/Postman-newman-jenkins.git # timeout=10 > git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git.exe config remote.origin.url https://github.com/eyanez111/Postman-newman-jenkins.git # timeout=10 Fetching upstream changes from https://github.com/eyanez111/Postman-newman-jenkins.git > git.exe fetch --tags --force --progress -- https://github.com/eyanez111/Postman-newman-jenkins.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git.exe rev-parse "refs/remotes/origin/master^\{commit}

      " # timeout=10
      > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
      Checking out Revision cd8ff9e84040b15f23b998f7849d84e301573079 (refs/remotes/origin/master)
      > git.exe config core.sparsecheckout # timeout=10
      > git.exe checkout -f cd8ff9e84040b15f23b998f7849d84e301573079 # timeout=10
      > git.exe branch -a -v --no-abbrev # timeout=10
      > git.exe checkout -b master cd8ff9e84040b15f23b998f7849d84e301573079 # timeout=10
      Commit message: "Initial test setup"
      First time build. Skipping changelog.
      [Pipeline] sh
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      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>(Unknown Source)
      at java.lang.ProcessImpl.start(Unknown Source)
      at java.lang.ProcessBuilder.start(Unknown Source)
      at hudson.Proc$LocalProc.<init>(Proc.java:252)
      at hudson.Proc$LocalProc.<init>(Proc.java:221)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
      at hudson.Launcher$ProcStarter.start(Launcher.java:454)
      at org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:234)
      at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:103)
      at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:317)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      Caused: java.io.IOException: Cannot run program "nohup" (in directory "C:\Program Files (x86)\Jenkins\workspace\jsonplaceholder_api_tests"): CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessBuilder.start(Unknown Source)
      at hudson.Proc$LocalProc.<init>(Proc.java:252)
      at hudson.Proc$LocalProc.<init>(Proc.java:221)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
      at hudson.Launcher$ProcStarter.start(Launcher.java:454)
      at org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:234)
      at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:103)
      at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:317)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      at WorkflowScript.run(WorkflowScript:4)
      at __cps.transform__(Native Method)
      at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
      at sun.reflect.GeneratedMethodAccessor329.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
      at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Finished: FAILURE

      any help will be highly appreciated thanks

            Unassigned Unassigned
            eyanez111 Francisco yanez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: