Running JOT as a systemd service
Need a bit of help in getting JOT as systemd service. When starting getting following error:
: module.js:478
: throw err;
: ^
: Error: Cannot find module 'nconf'
: at Function.Module._resolveFilename (module.js:476:15)
: at Function.Module._load (module.js:424:25)
: at Module.require (module.js:504:17)
: at require (internal/module.js:20:19)
: at Object.<anonymous> (/opt/jot-server/config/index.js:14:13)
: at Module._compile (module.js:577:32)
: at Object.Module._extensions..js (module.js:586:10)
: at Module.load (module.js:494:32)
: at tryModuleLoad (module.js:453:12)
: at Function.Module._load (module.js:445:3)
I am guessing that I don't quite have the jot.service properly written.
-
-
·
Alexey
- ·
Hello!
You need to go to jot server root folder and execute the next command:
npm install
this command will install the all dependencies. -
·
Alexey
-
- · Will Monte
- ·
Yes, that procedure has been done. What does the jot.service contents should be?
-
- · Will Monte
- ·
-
- · Will Monte
- ·
Started JOT.
systemd[1]: jot.service: main process exited, code=exited, status=203/EXEC
systemd[1]: Unit jot.service entered failed state.
systemd[1]: jot.service failed.
systemd[1]: jot.service holdoff time over, scheduling restart.
systemd[1]: Stopped JOT.
systemd[1]: Started JOT.
systemd[1]: jot.service: main process exited, code=exited, status=203/EXEC
systemd[1]: Unit jot.service entered failed state.
systemd[1]: jot.service failed.
systemd[1]: jot.service holdoff time over, scheduling restart.
systemd[1]: Stopped JOT. -
- · Will Monte
- ·
I figured it out. Not sure why Alexey couldn't just give me the info I requested. I have JOT running as a service now.
-
-
·
Alexey
- ·
Hello Will Monte,
Sorry, I see only error message and answered on it.
About systemd: we also using this tool on our servers and if you like to write targets/services for it, you need to create special files and write commands according to your needs and requirements. I don't know how your service files with commands look like, so it is hard to say where is the problem.
-
·
Alexey
-
- · Mayki
-
·
In reply to Alexey
- ·
Hi,
Instead of using systemd one can use PM2 as a service manager. I did and JOT server starts automatically at reboot of my server. (Running Ubuntu 18.04.4 LTS)
Link to PM2 site:
-
- · Will Monte
- ·
Systemd works just fine, no need for pm2 or forever.
-
-
·
Alexey
-
·
In reply to Mayki
- ·
Yes, PM2 can be used as alternative to forever.
-
·
Alexey