我试图使用命令RUBBER_ENV=staging FILTER=staging cap rubber:unicorn:restart
重新启动麒麟,但我发现了以下错误:无法重新启动麒麟
triggering load callbacks
* 2013-10-21 11:49:47 executing `rubber:init'
** Auto role: app => staging.x.com, {:platform=>"linux"}
** Auto role: unicorn => staging.x.com, {:platform=>"linux"}
** Auto role: nginx => staging.x.com, {:platform=>"linux"}
** Auto role: collectd => staging.x.com, {:platform=>"linux"}
** Auto role: common => staging.x.com, {:platform=>"linux"}
** Auto role: monit => staging.x.com, {:platform=>"linux"}
** Auto role: db => staging.x.com, {:primary=>true, :platform=>"linux"}
** Auto role: postgresql => staging.x.com, {:platform=>"linux"}
** Auto role: postgresql_master => staging.x.com, {:platform=>"linux"}
** Auto role: examples => staging.x.com, {:platform=>"linux"}
** Auto role: graphite_server => staging.x.com, {:platform=>"linux"}
** Auto role: graphite_web => staging.x.com, {:platform=>"linux"}
** Auto role: memcached => staging.x.com, {:platform=>"linux"}
** Auto role: web => staging.x.com, {:platform=>"linux"}
** Auto role: web_tools => staging.x.com, {:platform=>"linux"}
* 2013-10-21 11:49:50 executing `rubber:unicorn:restart'
* 2013-10-21 11:49:50 executing `rubber:unicorn:stop'
* executing "sudo -p 'sudo password: ' bash -l -c 'if [ -f /var/run/unicorn.pid ]; then pid=`cat /var/run/unicorn.pid` && kill -TERM $pid; fi'"
servers: ["staging.voylla.com"]
connection failed for: staging.x.com (Net::SSH::AuthenticationFailed: root)
一些research ponted了几件事情,但我在后,甚至得到错误在我deploy.rb
以下设置:
set :ssh_options, {:auth_methods => "publickey"}
set :ssh_options, {:keys => ["~/voylla.pem"]}
我甚至尝试了方案中提到here。但是这也行不通。
有人可以请帮忙。谢谢
我做'须藤visudo'并添加行'用户名ALL =(ALL)NOPASSWD:ALL'底部如[在这里]所述(http://askubuntu.com/questions/147241/execute-sudo-without-password)。但它没有奏效。我得到了同样的错误 – nish
如果你做了什么工作,错误至少会改变,因为'*执行“sudo -p'sudo密码:'bash'不会被打印了 –
我使用'sudo su'。它不提示输入密码,所以我想我在这里丢失了别的东西 – nish