Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: nodejs-plugin
-
Labels:None
-
Environment:Jenkins:2.60.2
NodeJS:1.2.2
-
Similar Issues:
Description
Issue
When using the automatic installer of type "Extract .zip/.tar.gz" for NodeJS ( see tool-config.png) and use it in the NodeSJ script step in a freestyle job (see job-config.png
), this results in a Permission Denied exception:
Started by user admin Building in workspace /tmp/je-1-home/workspace/testFreestyle Unpacking https://nodejs.org/dist/v6.11.1/node-v6.11.1-linux-x64.tar.gz to /tmp/je-1-home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node-001 on Jenkins [testFreestyle] $ /var/folders/m7/lghwdpdx70d6454dsp825bxc0000gn/T/hudson7136647660096639963.js FATAL: command execution failed java.io.IOException: Cannot run program "/var/folders/m7/lghwdpdx70d6454dsp825bxc0000gn/T/hudson7136647660096639963.js" (in directory "/tmp/je-1-home/workspace/testFreestyle"): 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:850) at hudson.Launcher$ProcStarter.start(Launcher.java:384) at hudson.Launcher$ProcStarter.join(Launcher.java:395) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:84) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735) 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:490) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) 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) ... 16 more Build step 'Execute NodeJS script' marked build as failure Finished: FAILURE
Workaround
Use the [Custom Tools plugin](https://plugins.jenkins.io/custom-tools-plugin) and a Shell step
Use Pipeline
Nikolas Falco Thanks for looking into this.
Right, and there is no way to control this in the global config. So maybe you are right, this is an issue in core. The "Permission denied" on a temp *.js file made me think it could be an issue with the NodeJS plugin.