node.js - Forever not starting when using Jenkins -


So I have a Jenkins build that is always starting with the following command.

  Sudo NODE_ENV = Development Forever start- a -l /var/nodejs/app/logs/forever.log -o/var/nodejs/app/logs/output.log -e / Var / nodejs / app / log / error log /var/nodejs/app/app.js   

This command throws the following error.

  is running on the development server fs.js: 427 return binding.open (pathModule._makeLong (path), stringflag (flags), mode); ^ Error: ENOENT, no such file or directory on object.fs.openSync (fs.js: 427: 18) at Object.fs.readFileSync (fs.js: 284: 15) on object 'ssl / gd_bundle.crt' . & Lt; Anonymous & gt; Object on (module .js: 456: 26) Module._Applications.js (module.js: 474: 10) (/var/nodejs/app/app.js:190:10) on the module. Module._load on function (module .js: 312: 12) load (module .js: 356: 32) function on startup. Module.Rannman (Module JS: 497: 10) (node ​​.js: 119: 16)) at node.js: 902: 3 Error: Skipped as usual detected the script code: 8  < / pre> 

When I run from the command line on the server, I get the same error, although only if I am not in the directory with the app.js file if I'm specifying the path to the app.js file I am always sensitive to the files instead of the file.

I have also come to know that always-p-flag or the usual structure is not respecting the directory any ideas?

Nothing has been found to do with Jenkins, as you said you were the only one Error from command line

Whatever I can tell, this is not a problem with "always [sensation] where the file is located" rather than your node script app. JS is sensitive to where it is launched, Examples of uses a path along with directories without problems. Try to launch your code without any wrong code for forever , and you will follow the same problem.

Anywhere in your script code, you depend on the current work directory when SSL / gd_bundle.crt . Without looking at your code source, I can only guess and point fingers.

  • If your ssl / gd_bundle.crt is relative to the location of the script, then according to this reply: , you should use the __digname to get the directory location of the script, which will be identical regardless of the current working directory.

  • If your ssl / gd_bundle.crt location is set to the file system, then you use a full path starting with

    -p is being ignored as, a quick Google search should turn it on: indicates that this is an open bug.

    Edit:
    Nodes Script (if you do not have a file), you can correct the current directory before executing your node command Can change in In Jenkins also works in the command line:

    cd / var / nodejs / app & amp; sudo NODE_ENV = development always start-a -l log /forever.log -o log /output.log -e log / html>

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -