Comments (15)
I had this error and fixed it setting the pid folder in my capistrano deploy file:
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
from capistrano-unicorn.
+1
from capistrano-unicorn.
+1
from capistrano-unicorn.
+1
from capistrano-unicorn.
As I understand relative paths to pid file in config/unicorn.rb stopped working, now it works only with absolute path.
from capistrano-unicorn.
In my case I'm receiving:
* 2013-12-05 10:18:00 executing `unicorn:reload'
triggering before callbacks for `unicorn:reload'
/tmp/unicorn.rb20131205-11768-d8q40k:7:in `read': No such file or directory - config/unicorn/production.rb (Errno::ENOENT)
from /tmp/unicorn.rb20131205-11768-d8q40k:7:in `reload'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/lib/unicorn/configurator.rb:75:in `instance_eval'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/lib/unicorn/configurator.rb:75:in `reload'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/lib/unicorn/configurator.rb:68:in `initialize'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:108:in `new'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:108:in `initialize'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/bin/unicorn:126:in `new'
from /home/morman/.gem/ruby/1.9.3/gems/unicorn-4.7.0/bin/unicorn:126:in `<top (required)>'
from /home/morman/.gem/ruby/1.9.3/bin/unicorn:23:in `load'
from /home/morman/.gem/ruby/1.9.3/bin/unicorn:23:in `<main>'
*** err :: failed to auto-detect pid from config/unicorn/production.rb
*** err :: falling back to default: /home/deploy/web/printbox/current/tmp/pids/unicorn.pid
Even though config/unicorn/production.rb
exists in rails app. Works fine with 0.1.10.
from capistrano-unicorn.
Maybe the bug is related to my case.
I set pid
in config/unicorn/production.rb
like this:
pid File.expand_path('tmp/pids/unicorn.pid', ENV['RAILS_ROOT']).to_s
From 0.2.0 capistrano-unicorn
auto-detects pid path from the config file and pid
above is evaluated at local machine which is different from server's path.
I think:
- Auto-detecting should run on server's environment and then
- For relative path, the path extracted here should be wrapped by
File.expand_path
from capistrano-unicorn.
@k2nr Sounds great! Would you please send us a pull request with that patch? If you could add/fix/identify relevant specs, that'd be excellent.
from capistrano-unicorn.
@guangnan, @cschramm, @jnimety, @glebtv, @michalorman - it would help us a lot in fully understanding this issue if you could provide:
- the value of
unicorn_pid
(if any) in your capistrano config file, and - the value of
pid
in your unicorn config file
from capistrano-unicorn.
pid 'tmp/pids/unicorn.pid'
from capistrano-unicorn.
@k2nr, @sfsekaran - I already carefully considered server-side detection, tried to implement it, and then rejected it. So I'm not yet convinced this is the way to go.
from capistrano-unicorn.
pid "/var/www/app_name/shared/pids/unicorn.pid"
from capistrano-unicorn.
pid File.expand_path('../../../tmp/pids/unicorn.pid', __FILE__)
from capistrano-unicorn.
@lecoueyl
Awesome! it worked well
I think capistrano is having trouble with unicorn on recognising the pids and it seems like a good solution doing the job manually.
from capistrano-unicorn.
In fact, this is the default folder setting in capistrano-unicorn.
But capistrano is not setting it so you have to do it by hand :)
from capistrano-unicorn.
Related Issues (20)
- mixed env of passenger servers and unicorn server fails to run `unicorn:reload' is only run for servers matching {:roles=>:unicorn, :except=>{:no_release=>true}}, but no servers matched HOT 3
- sudo: bundle: command not found, Compatible with RVM? HOT 2
- License missing from gemspec HOT 4
- Support for --no-default-middleware flag HOT 3
- Remind the developer to use absolute path if Unicorn sockets is been used.
- Detecting failed restart HOT 1
- Disable set -x debugging option HOT 1
- Cannot figure out multistage environment, unicorn_rails and -E flag
- Easy Questions
- README and NEWS files seem to be ahead of actual release HOT 1
- Not compatible with capistrano 3 HOT 1
- capistrano-unicorn with capistrano 3.x HOT 17
- problem while deploying with capistrano-unicorn HOT 6
- config.eager_load is set to nil HOT 7
- assets:precomplie bug in v0.1.10 - Namespaces#to_s HOT 1
- avoiding duplicate unicorns starting with Upstart / Init
- --- HOT 2
- Must Restart twice to see the latest codes deployed
- NoMethodError: undefined method `instance' for Capistrano::Configuration:Class HOT 4
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 capistrano-unicorn.