Discussion:
[oae-dev] Putty vs. Terminal
Michael Anthony Balmes
2014-03-20 23:04:33 UTC
Permalink
Hi sir,
There was an error when I start up my sakai Oae.. when i used putty and
execute this script node app.js | node_modules/.bin/bunyan &.. it is
working but when i
close the putty it will also close the server..i try to use the terminal in
server and execute this but there was an error occur and cannot be loaded..
so how can i execute this without using the putty..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/oae-dev/attachments/20140321/eec9ade1/attachment.html
Simon Gaeremynck
2014-03-21 06:43:42 UTC
Permalink
This is because when you close putty, you log out from the server.
When you log a session out in linux it will send a HUP signal [1] to all the processes you've started during that session that are still running.
This usually means that each process will stop.

You can avoid this by using nohup [2]. That will tell a process to ignore the HUP signal.
e.g.:
nohup node app.js | node_modules.bin/bunyan &

Regards,

Simon

[1] http://en.wikipedia.org/wiki/SIGHUP#SIGHUP
[2] http://linux.die.net/man/1/nohup
Post by Michael Anthony Balmes
Hi sir,
There was an error when I start up my sakai Oae.. when i used putty and execute this script node app.js | node_modules/.bin/bunyan &.. it is working but when i
close the putty it will also close the server..i try to use the terminal in
server and execute this but there was an error occur and cannot be loaded..
so how can i execute this without using the putty..
_______________________________________________
oae-dev mailing list
oae-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/oae-dev
Michael Anthony Balmes
2014-03-21 06:47:34 UTC
Permalink
ah i see. but when i use the terminal inside the server, there's alot error
occur when i try to run the script but when it comes to putty, it just run
smoothly..
Post by Simon Gaeremynck
This is because when you close putty, you log out from the server.
When you log a session out in linux it will send a HUP signal [1] to all
the processes you've started during that session that are still running.
This usually means that each process will stop.
You can avoid this by using nohup [2]. That will tell a process to ignore the HUP signal.
nohup node app.js | node_modules.bin/bunyan &
Regards,
Simon
[1] http://en.wikipedia.org/wiki/SIGHUP#SIGHUP
[2] http://linux.die.net/man/1/nohup
Post by Michael Anthony Balmes
Hi sir,
There was an error when I start up my sakai Oae.. when i used putty
and execute this script node app.js | node_modules/.bin/bunyan &.. it is
working but when i
Post by Michael Anthony Balmes
close the putty it will also close the server..i try to use the terminal
in
Post by Michael Anthony Balmes
server and execute this but there was an error occur and cannot be
loaded..
Post by Michael Anthony Balmes
so how can i execute this without using the putty..
_______________________________________________
oae-dev mailing list
oae-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/oae-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/oae-dev/attachments/20140321/de5c8a93/attachment.html
Simon Gaeremynck
2014-03-21 06:53:42 UTC
Permalink
Are you logging on as the same user when using the terminal as when connecting over SSH (putty)?
If you've done a lot of things as the root user over putty and then try to start some of them up as a regular user, you might get a couple of errors for example.

We'd need to see more details (logs, command output, ..) to know what the cause of that is.

Regards,

Simon
ah i see. but when i use the terminal inside the server, there's alot error occur when i try to run the script but when it comes to putty, it just run smoothly..
This is because when you close putty, you log out from the server.
When you log a session out in linux it will send a HUP signal [1] to all the processes you've started during that session that are still running.
This usually means that each process will stop.
You can avoid this by using nohup [2]. That will tell a process to ignore the HUP signal.
nohup node app.js | node_modules.bin/bunyan &
Regards,
Simon
[1] http://en.wikipedia.org/wiki/SIGHUP#SIGHUP
[2] http://linux.die.net/man/1/nohup
Post by Michael Anthony Balmes
Hi sir,
There was an error when I start up my sakai Oae.. when i used putty and execute this script node app.js | node_modules/.bin/bunyan &.. it is working but when i
close the putty it will also close the server..i try to use the terminal in
server and execute this but there was an error occur and cannot be loaded..
so how can i execute this without using the putty..
_______________________________________________
oae-dev mailing list
oae-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/oae-dev
Loading...