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


Groups > linux.debian.user > #166636 > unrolled thread

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

Started byjstaff-emplyprep <jstaff@emplyprep.com>
First post2016-04-12 00:00 +0200
Last post2016-04-13 01:10 +0200
Articles 9 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  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

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

Fromjstaff-emplyprep <jstaff@emplyprep.com>
Date2016-04-12 00:00 +0200
Subjectcannot run a node.js app using systemd on debian jessie
Message-ID<rmS2e-4ac-19@gated-at.bofh.it>
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 ?

[toc] | [next] | [standalone]


#166645

FromDominique Dumont <dod@debian.org>
Date2016-04-12 09:50 +0200
Message-ID<rn1fb-3tS-1@gated-at.bofh.it>
In reply to#166636
On Monday 11 April 2016 15:35:19 jstaff-emplyprep wrote:
>      $ 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.

Could you run 'systemctl status webpage.service' and show us the output ?

All the best
-- 
 https://github.com/dod38fr/   -o- http://search.cpan.org/~ddumont/
http://ddumont.wordpress.com/  -o-   irc: dod at irc.debian.org

[toc] | [prev] | [next] | [standalone]


#166669

Fromjstaff-emplyprep <jstaff@emplyprep.com>
Date2016-04-13 01:10 +0200
Message-ID<rnfBv-7qw-1@gated-at.bofh.it>
In reply to#166645
ok, using systemctl status -l => lacks ExecStart setting
   => Executable path is not absolute, ignoring

don't we have the full path ? what is it looking for ?  if it's behind 
an NGINX proxy, does that matter ?

On 04/12/2016 01:27 AM, Dominique Dumont wrote:
> On Monday 11 April 2016 15:35:19 jstaff-emplyprep wrote:
>>       $ 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.
> Could you run 'systemctl status webpage.service' and show us the output ?
>
> All the best

[toc] | [prev] | [next] | [standalone]


#166681

FromDominique Dumont <dod@debian.org>
Date2016-04-13 12:20 +0200
Message-ID<rnq3U-8a8-21@gated-at.bofh.it>
In reply to#166669
On Tuesday 12 April 2016 16:52:51 jstaff-emplyprep wrote:
> ok, using systemctl status -l => lacks ExecStart setting
>    => Executable path is not absolute, ignoring
> 
> don't we have the full path ? what is it looking for ?  

May be your /usr/local/bin/node is a relative link...

> if it's behind 
> an NGINX proxy, does that matter ?

I don't think so.

HTH

-- 
 https://github.com/dod38fr/   -o- http://search.cpan.org/~ddumont/
http://ddumont.wordpress.com/  -o-   irc: dod at irc.debian.org

[toc] | [prev] | [next] | [standalone]


#166688

Fromjstaff-emplyprep <jstaff@emplyprep.com>
Date2016-04-14 00:40 +0200
Message-ID<rnBC2-8vj-13@gated-at.bofh.it>
In reply to#166681
no, it is not a sym link

I really think something is wrong with systemd in Jessie - we have been 
unable to run node, ruby unicorn, and wsgi  - all ran pre-systemd

maybe it's buggy, maybe it's just looking for something not in 
docs/tutorials

should not be this hard though.



On 04/13/2016 03:58 AM, Dominique Dumont wrote:
> On Tuesday 12 April 2016 16:52:51 jstaff-emplyprep wrote:
>> ok, using systemctl status -l => lacks ExecStart setting
>>     => Executable path is not absolute, ignoring
>>
>> don't we have the full path ? what is it looking for ?
> May be your /usr/local/bin/node is a relative link...
>
>> if it's behind
>> an NGINX proxy, does that matter ?
> I don't think so.
>
> HTH
>

[toc] | [prev] | [next] | [standalone]


#166689

Fromlists@rickv.com
Date2016-04-14 01:30 +0200
Message-ID<rnCor-IX-29@gated-at.bofh.it>
In reply to#166688
just asking, these aren't from the leftpad problem with npm?
have you run 'npm cache clear'?



On Wed, Apr 13, 2016 at 04:19:02PM -0600, jstaff-emplyprep wrote:
>no, it is not a sym link
>
>I really think something is wrong with systemd in Jessie - we have 
>been unable to run node, ruby unicorn, and wsgi  - all ran pre-systemd
>
>maybe it's buggy, maybe it's just looking for something not in 
>docs/tutorials
>
>should not be this hard though.
>
>
>
>On 04/13/2016 03:58 AM, Dominique Dumont wrote:
>>On Tuesday 12 April 2016 16:52:51 jstaff-emplyprep wrote:
>>>ok, using systemctl status -l => lacks ExecStart setting
>>>    => Executable path is not absolute, ignoring
>>>
>>>don't we have the full path ? what is it looking for ?
>>May be your /usr/local/bin/node is a relative link...
>>
>>>if it's behind
>>>an NGINX proxy, does that matter ?
>>I don't think so.
>>
>>HTH
>>
>
>

[toc] | [prev] | [next] | [standalone]


#166710

Fromjstaff-emplyprep <jstaff@emplyprep.com>
Date2016-04-14 19:40 +0200
Message-ID<rnTpf-5FL-1@gated-at.bofh.it>
In reply to#166689

On 04/13/2016 05:12 PM, lists@rickv.com wrote:
> just asking, these aren't from the leftpad problem with npm?
> have you run 'npm cache clear'?

not the cause, and sad if this is the best info we can get - losing 
faith in Debian.




>
>
>
> On Wed, Apr 13, 2016 at 04:19:02PM -0600, jstaff-emplyprep wrote:
>> no, it is not a sym link
>>
>> I really think something is wrong with systemd in Jessie - we have 
>> been unable to run node, ruby unicorn, and wsgi  - all ran pre-systemd
>>
>> maybe it's buggy, maybe it's just looking for something not in 
>> docs/tutorials
>>
>> should not be this hard though.
>>
>>
>>
>> On 04/13/2016 03:58 AM, Dominique Dumont wrote:
>>> On Tuesday 12 April 2016 16:52:51 jstaff-emplyprep wrote:
>>>> ok, using systemctl status -l => lacks ExecStart setting
>>>>    => Executable path is not absolute, ignoring
>>>>
>>>> don't we have the full path ? what is it looking for ?
>>> May be your /usr/local/bin/node is a relative link...
>>>
>>>> if it's behind
>>>> an NGINX proxy, does that matter ?
>>> I don't think so.
>>>
>>> HTH
>>>
>>
>>
>
>

[toc] | [prev] | [next] | [standalone]


#166715

FromDaniel Keast <daniel@kea.st>
Date2016-04-14 20:50 +0200
Message-ID<rnUuZ-6rs-1@gated-at.bofh.it>
In reply to#166710
On Thu, Apr 14, 2016 at 11:21:06AM -0600, jstaff-emplyprep wrote:
> 
> 
> On 04/13/2016 05:12 PM, lists@rickv.com wrote:
> >just asking, these aren't from the leftpad problem with npm?
> >have you run 'npm cache clear'?
> 
> not the cause, and sad if this is the best info we can get - losing faith in
> Debian.
> 

Can we see your unit file?

> 
> 
> 
> >
> >
> >
> >On Wed, Apr 13, 2016 at 04:19:02PM -0600, jstaff-emplyprep wrote:
> >>no, it is not a sym link
> >>
> >>I really think something is wrong with systemd in Jessie - we have been
> >>unable to run node, ruby unicorn, and wsgi  - all ran pre-systemd
> >>

It's been flawless for me, it took a little reading to understand the
differences from sysvinit though.

> >>maybe it's buggy, maybe it's just looking for something not in
> >>docs/tutorials
> >>
> >>should not be this hard though.
> >>

Have you tried this:

https://wiki.archlinux.org/index.php/systemd#Investigating_systemd_errors

or this?

https://wiki.archlinux.org/index.php/systemd#Diagnosing_problems_with_a_specific_service

> >>
> >>
> >>On 04/13/2016 03:58 AM, Dominique Dumont wrote:
> >>>On Tuesday 12 April 2016 16:52:51 jstaff-emplyprep wrote:
> >>>>ok, using systemctl status -l => lacks ExecStart setting
> >>>>   => Executable path is not absolute, ignoring
> >>>>
> >>>>don't we have the full path ? what is it looking for ?
> >>>May be your /usr/local/bin/node is a relative link...
> >>>
> >>>>if it's behind
> >>>>an NGINX proxy, does that matter ?
> >>>I don't think so.
> >>>
> >>>HTH
> >>>
> >>
> >>
> >
> >
> 
> 

[toc] | [prev] | [next] | [standalone]


#166670

Fromjstaff-emplyprep <jstaff@emplyprep.com>
Date2016-04-13 01:10 +0200
Message-ID<rnfBv-7qw-13@gated-at.bofh.it>
In reply to#166645
error (Reason: Invalid argument)
systemd[12329]: Failed at step EXEC sp...
webpage.service lacks ...
systemctl daemon-reload' recommended

unfortunately the returned "..." error msg does not help much

and running sudo daemon-reload just returns the prompt


On 04/12/2016 01:27 AM, Dominique Dumont wrote:
> On Monday 11 April 2016 15:35:19 jstaff-emplyprep wrote:
>>       $ 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.
> Could you run 'systemctl status webpage.service' and show us the output ?
>
> All the best

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web