Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #166636

cannot run a node.js app using systemd on debian jessie

From jstaff-emplyprep <jstaff@emplyprep.com>
Newsgroups linux.debian.user
Subject cannot run a node.js app using systemd on debian jessie
Date 2016-04-12 00:00 +0200
Message-ID <rmS2e-4ac-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


the systemd service as shown below fails to run with the error show 
below - we cannot figure out why.  Can someone explain what is wrong 
with the setup and/or show a setup that works ?

any help greatly appreciated


as info: we can run  "node server.js" from the command line as below:
     cd /home/webpage/web
     node server.js
     ==>  Express server listening on port 8000

   our setup
     ls -l /home/webpage/web/
     -rw-r--r--   1 1001 1001  7461 Apr  9 06:51 server.js

     ls -l /etc/systemd/system
     -rw-r--r-- 1 root root  352 Apr 11 07:23 webpage.service
     sudo vim /etc/systemd/system/webpage.service
     [Unit]
     Description=systemd for webpage
     After=network.target
     [Service]
     ExecStart=/usr/local/bin/node /home/webpage/web/server.js
     Restart=always
     RestartSec=10
     StandardOutput=syslog
     StandardError=syslog
     User=nginx
     Group=nginx
     Environment=NODE_ENV=production PORT=8000
     WorkingDirectory=/home/webpage/web
     [Install]
     WantedBy=multi-user.target

     $ sudo service webpage restart
     Failed to restart webpage.service: Unit webpage.service failed to 
load: Invalid argument. See system logs and 'systemctl status 
webpage.service' for details.

     sudo vim /var/log/syslog
     jessie kernel: iptables denied: IN=eth0 OUT= 
MAC=fe:fd:45:a4:cf:af:84:78:ac:5a:0b:41:08:00 SRC=93.174.93.94 
DST=69.164.207.175 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=27620 PROTO=TCP 
SPT=43887 DPT=5901 WINDOW=1024 RES=0x00 SYN URGP=0

any ideas what is wrong ?

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

cannot run a node.js app using systemd on debian jessie jstaff-emplyprep <jstaff@emplyprep.com> - 2016-04-12 00:00 +0200
  Re: cannot run a node.js app using systemd on debian jessie Dominique Dumont <dod@debian.org> - 2016-04-12 09:50 +0200
    Re: cannot run a node.js app using systemd on debian jessie jstaff-emplyprep <jstaff@emplyprep.com> - 2016-04-13 01:10 +0200
      Re: cannot run a node.js app using systemd on debian jessie Dominique Dumont <dod@debian.org> - 2016-04-13 12:20 +0200
        Re: cannot run a node.js app using systemd on debian jessie jstaff-emplyprep <jstaff@emplyprep.com> - 2016-04-14 00:40 +0200
          Re: cannot run a node.js app using systemd on debian jessie lists@rickv.com - 2016-04-14 01:30 +0200
            Re: cannot run a node.js app using systemd on debian jessie jstaff-emplyprep <jstaff@emplyprep.com> - 2016-04-14 19:40 +0200
              Re: cannot run a node.js app using systemd on debian jessie Daniel Keast <daniel@kea.st> - 2016-04-14 20:50 +0200
    Re: cannot run a node.js app using systemd on debian jessie jstaff-emplyprep <jstaff@emplyprep.com> - 2016-04-13 01:10 +0200

csiph-web