Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sails container cannot use forever --watch #2

Closed
gattazr opened this issue Feb 8, 2017 · 3 comments
Closed

Sails container cannot use forever --watch #2

gattazr opened this issue Feb 8, 2017 · 3 comments
Assignees
Labels

Comments

@gattazr
Copy link
Member

gattazr commented Feb 8, 2017

If the command of the sails container is forever -w -c "npm start" ./, the error ENOSPC is thrown and the container crashes.

During development, it forces the container to be restarted every time the sources are modified

@gattazr
Copy link
Member Author

gattazr commented Feb 8, 2017

Using the issue foreversd/forever#739 as a reference, I tried to use an older version of forever

With the version 0.14.2, I get the following error :

sails_1    | npm info it worked if it ends with ok
sails_1    | npm info using npm@4.1.2
sails_1    | npm info using node@v7.5.0
sails_1    | npm info lifecycle backend@0.0.1~prestart: backend@0.0.1
sails_1    | npm info lifecycle backend@0.0.1~start: backend@0.0.1
sails_1    |
sails_1    | > backend@0.0.1 start /srv/sails
sails_1    | > node app.js "/srv/sails/"
sails_1    |
sails_1    | info:
sails_1    | info:                .-..-.
sails_1    | info:
sails_1    | info:    Sails              <|    .-..-.
sails_1    | info:    v0.12.11            |\
sails_1    | info:                       /|.\
sails_1    | info:                      / || \
sails_1    | info:                    ,'  |'  \
sails_1    | info:                 .-'.-==|/_--'
sails_1    | info:                 `--'-------'
sails_1    | info:    __---___--___---___--___---___--___
sails_1    | info:  ____---___--___---___--___---___--___-__
sails_1    | info:
sails_1    | info: Server lifted in `/srv/sails`
sails_1    | info: To see your app, visit http://localhost:1337
sails_1    | info: To shut down Sails, press <CTRL> + C at any time.
sails_1    |
sails_1    |
sails_1    | debug: -------------------------------------------------------
sails_1    | debug: :: Wed Feb 08 2017 16:47:41 GMT+0000 (UTC)
sails_1    | debug: Environment : development
sails_1    | debug: Port        : 1337
sails_1    | debug: -------------------------------------------------------
sails_1    | error: restarting script because /srv/sails/api/controllers/UserController.js changed
sails_1    | error: Forever detected script was killed by signal: SIGKILL
sails_1    | error: Script restart attempt #1
sails_1    | npm info it worked if it ends with ok
sails_1    | npm info using npm@4.1.2
sails_1    | npm info using node@v7.5.0
sails_1    | npm info lifecycle backend@0.0.1~prestart: backend@0.0.1
sails_1    | npm info lifecycle backend@0.0.1~start: backend@0.0.1
sails_1    |
sails_1    | > backend@0.0.1 start /srv/sails
sails_1    | > node app.js "/srv/sails/"
sails_1    |
sails_1    |
sails_1    | error: Server failed to start.
sails_1    | error: (received error: EADDRINUSE)
sails_1    | error:
sails_1    | error: Troubleshooting tips:
sails_1    | error:
sails_1    | error:  -> Is something else already running on port 1337 ?
sails_1    | error:
sails_1    | error:  -> Are you deploying on a platform that requires an explicit hostname, like OpenShift?
sails_1    | error:     (Try setting the `explicitHost` config to the hostname where the server will be accessible.)
sails_1    | error:     (e.g. `mydomain.com` or `183.24.244.42`)
sails_1    |
sails_1    |
sails_1    | npm info lifecycle backend@0.0.1~start: Failed to exec start script
sails_1    | npm ERR! Linux 4.4.43-boot2docker
sails_1    | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "/srv/sails/"
sails_1    | npm ERR! node v7.5.0
sails_1    | npm ERR! npm  v4.1.2
sails_1    | npm ERR! code ELIFECYCLE
sails_1    | npm ERR! backend@0.0.1 start: `node app.js "/srv/sails/"`
sails_1    | npm ERR! Exit status 1
sails_1    | npm ERR!
sails_1    | npm ERR! Failed at the backend@0.0.1 start script 'node app.js "/srv/sails/"'.
sails_1    | npm ERR! Make sure you have the latest version of node.js and npm installed.
sails_1    | npm ERR! If you do, this is most likely a problem with the backend package,
sails_1    | npm ERR! not with npm itself.
sails_1    | npm ERR! Tell the author that this fails on your system:
sails_1    | npm ERR!     node app.js "/srv/sails/"
sails_1    | npm ERR! You can get information on how to open an issue for this project with:
sails_1    | npm ERR!     npm bugs backend
sails_1    | npm ERR! Or if that isn't available, you can get their info via:
sails_1    | npm ERR!     npm owner ls backend

@gattazr gattazr added the bug label Feb 8, 2017
@gattazr gattazr self-assigned this Feb 8, 2017
@gattazr
Copy link
Member Author

gattazr commented Feb 15, 2017

The error ELIFECYCLE is linked to the use of npm with root. Using an other user in the sails docker image should fix the problem.

balderdashy/sails#2673

@gattazr
Copy link
Member Author

gattazr commented Feb 19, 2020

Project is dead and seeing this open issue annoys me 😄

@gattazr gattazr closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant