•  · 43 friends

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.

0 0 0 0 0 0
  • 125
Replies (9)
  • Hello!
    You need to go to jot server root folder and execute the next command:
    npm install
    this command will install the all dependencies. 

    0 0 0 0 0 0
    • Yes, that procedure has been done.  What does the jot.service contents should be?

      0 0 0 0 0 0
      • image_transcoder.php?o=bx_froala_image&h=3168&dpx=1&t=1585170513

        0 0 0 0 0 0
        • 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.

          0 0 0 0 0 0
          • 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.

            0 0 0 0 0 0
            • 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.

              0 0 0 0 0 0
              • 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:

                https://pm2.keymetrics.io/docs/usage/pm2-doc-single-page/

                0 0 0 0 0 0
                • Systemd works just fine, no need for pm2 or forever.

                  0 0 0 0 0 0
                  • Yes, PM2 can be used as alternative to forever. 

                    0 0 0 0 0 0
                    Not logged in users can't 'Comments Post'.
                    6
                    3
                    1
                    Labels:
                    Added:
                    Category:

                    UNA - Social Media Software Framework

                    Close