Comments (5)
When I type /etc/init.d/node-app start
to test in the terminal, it's ok.
When I reboot, the above problem will happen.
from node-startup.
I got the same issue on Debian 6.
When I test it with /etc/init.d/node-app start
everything works fine.
On reboot my log file writes this:
/var/www/vhosts/localapp.7goods.de/node/app.js: line 1: syntax error near unexpected token ('/var/www/vhosts/localapp.7goods.de/node/app.js: line 1: var http = require('http');'
index.js file:
var http = require('http');
//...
from node-startup.
Can you try setting the force flag on reboot? in the init.d script change this line to true:
FORCE_OP=false
from node-startup.
Yes I tried it already. But it doesn't change anything.
from node-startup.
@Alex1990 The log and pid directories don't require root permissions. It all depends on how you setup the config, how you run the script, and permissions of the locations. If you run the script as a normal user, the normal user will own the files. If you run the script as root, the files will be created and owned by root, so your normal user won't be able to modify them after that point.
A possible solution, that I'm not sure is correct, is to have the script set less strict permissions on the files.
I just want to make sure - the original problem you were having was only happening on restart, right? If you started fresh, used root account for everything, and restarted, do you have the same problems?
from node-startup.
Related Issues (20)
- Positive Feedback HOT 1
- Node app stopped, but pid file exists HOT 3
- Script doesn't start Node HOT 10
- Can't running node app when rebooting HOT 3
- HOST? HOT 1
- I'm getting the wrong pid in AWS linux HOT 11
- node app does not stop HOT 1
- cannot restart from admin panel
- Using node-startup in AWS EC2 - reboot does not start the service HOT 1
- PID recorded on AWS EC2 at startup was wrong. HOT 3
- How to execute script without sudo word in script HOT 6
- Can't support multiple node service HOT 1
- Change user HOT 6
- `is_running` detection implementation HOT 2
- add option to open log file in "append" mode
- stdin: is not a tty
- Run restart from started node app? HOT 1
- Start after power loss or system crash HOT 6
- Unable to start HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-startup.