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

Node executable is not begin initialised on slave node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • nodejs-plugin
    • None
    • Jenkins 2.30
      nodejs plugin from branch workaround-26583
      env-inject plugin 1.93.1
      CentOS 6.8

      I followed the workaround recommendation in JENKINS-41848 since I have env-inject plugin (and rely heaviliy on it) and "Provide npm to $PATH" did not work.

      With the workaround-26583 branch, $PATH issue has been addressed, but now the node build steps don't work. I have no global npm modules configured in tool config (and no spaces in the field either).

      If I add an invalid value to global npm modules (ie comma-delimited: phantomjs,pnpm,gulp), I get an error running npm. Otherwise, I get the stacktrace below (even when I have valid global npm modules specified)

      FATAL: command execution failed
      jenkins.plugins.nodejs.tools.DetectionFailedException: Cannot get installation for node, since it is not online
      at jenkins.plugins.nodejs.tools.NodeJSInstallation.getPlatform(NodeJSInstallation.java:178)
      at jenkins.plugins.nodejs.tools.NodeJSInstallation.access$000(NodeJSInstallation.java:64)
      at jenkins.plugins.nodejs.tools.NodeJSInstallation$1.call(NodeJSInstallation.java:128)
      at jenkins.plugins.nodejs.tools.NodeJSInstallation$1.call(NodeJSInstallation.java:123)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Thread.java:745)
      at ......remote call to Channel to /10.130.221.2(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1435)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      at hudson.remoting.Channel.call(Channel.java:795)
      at jenkins.plugins.nodejs.tools.NodeJSInstallation.getExecutable(NodeJSInstallation.java:123)
      at jenkins.plugins.nodejs.NodeJSCommandInterpreter.perform(NodeJSCommandInterpreter.java:106)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:65)
      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)
      ERROR: Build step failed with exception
      java.lang.IllegalStateException: Node executable not initialised
      at jenkins.plugins.nodejs.NodeJSCommandInterpreter.buildCommandLine(NodeJSCommandInterpreter.java:144)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:108)
      at jenkins.plugins.nodejs.NodeJSCommandInterpreter.internalPerform(NodeJSCommandInterpreter.java:138)
      at jenkins.plugins.nodejs.NodeJSCommandInterpreter.perform(NodeJSCommandInterpreter.java:134)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:65)
      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)
      Build step 'Execute NodeJS script' marked build as failure

            nfalco Nikolas Falco
            akom Alexander Komarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: