Coder Social home page Coder Social logo

Comments (15)

lecoueyl avatar lecoueyl commented on July 30, 2024 2

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.

cschramm avatar cschramm commented on July 30, 2024

+1

from capistrano-unicorn.

jnimety avatar jnimety commented on July 30, 2024

+1

from capistrano-unicorn.

glebtv avatar glebtv commented on July 30, 2024

+1

from capistrano-unicorn.

glebtv avatar glebtv commented on July 30, 2024

As I understand relative paths to pid file in config/unicorn.rb stopped working, now it works only with absolute path.

from capistrano-unicorn.

michalorman avatar michalorman commented on July 30, 2024

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.

k2nr avatar k2nr commented on July 30, 2024

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.

sfsekaran avatar sfsekaran commented on July 30, 2024

@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.

aspiers avatar aspiers commented on July 30, 2024

@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.

cschramm avatar cschramm commented on July 30, 2024
pid 'tmp/pids/unicorn.pid'

from capistrano-unicorn.

aspiers avatar aspiers commented on July 30, 2024

@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.

RobWu avatar RobWu commented on July 30, 2024

pid "/var/www/app_name/shared/pids/unicorn.pid"

from capistrano-unicorn.

jnimety avatar jnimety commented on July 30, 2024

pid File.expand_path('../../../tmp/pids/unicorn.pid', __FILE__)

from capistrano-unicorn.

wonook avatar wonook commented on July 30, 2024

@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.

lecoueyl avatar lecoueyl commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.