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

SSHKit::Runner::ExecuteError: Exception while executing: npm exit status: 254 #19

Closed
joncursi opened this issue Oct 5, 2016 · 3 comments

Comments

@joncursi
Copy link

joncursi commented Oct 5, 2016

Hi,

I have been getting intermittent npm install errors during my capistrano deploy process. I'm getting back npm error code 254, which is a bit cryptic as I can't find much info about it online. This is the capistrano failure error when deploying with --trace:

DEBUG [e9c1e739] Command: cd /apps/appName/releases/20161005212751 && /usr/bin/env npm install --production --silent --no-progress
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@xx.xxx.xx: npm exit status: 254
npm stdout: Nothing written
npm stderr: Nothing written
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
SSHKit::Command::Failed: npm exit status: 254
npm stdout: Nothing written
npm stderr: Nothing written
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/command.rb:100:in `exit_status='
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/netssh.rb:127:in `execute_command'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `block in create_command_and_execute'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `tap'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `create_command_and_execute'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:69:in `execute'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/capistrano-npm-1.0.2/lib/capistrano/tasks/npm.rake:18:in `block (5 levels) in <top (required)>'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:88:in `with'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/capistrano-npm-1.0.2/lib/capistrano/tasks/npm.rake:17:in `block (4 levels) in <top (required)>'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:80:in `within'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/capistrano-npm-1.0.2/lib/capistrano/tasks/npm.rake:16:in `block (3 levels) in <top (required)>'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/jcursi/.rvm/gems/ruby-2.2.2/gems/sshkit-1.9.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => npm:install
The deploy has failed with an error: Exception while executing as deploy@xx.xxx.xx: npm exit status: 254
npm stdout: Nothing written
npm stderr: Nothing written

Any ideas on why this is occurring? Thanks!

@sergmetelin
Copy link

Started to get a similar issue out of the blue:

`cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@xxxxx.com: npm exit status: 1
npm stdout: Nothing written
npm stderr: Nothing written

SSHKit::Command::Failed: npm exit status: 1
npm stdout: Nothing written
npm stderr: Nothing written

Tasks: TOP => deploy:updated => npm:install
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@xxxxx.com: npm exit status: 1
npm stdout: Nothing written
npm stderr: Nothing written
`

Any ideas what it could be?

@nextofsearch
Copy link

Add the lline below in deploy.rb and you will be able to see detailed log:
set :npm_flags, '--production' # default

@iamcaleberic
Copy link

iamcaleberic commented Nov 4, 2016

@joncursi

exit status: 254- >

Happens when you have an out-of-resources condition on your server....like low or no processing power or ram...for processes you are currently running...this forces the connection to be closed...can be fixed by creating a swap on your server...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants