简体   繁体   中英

unicorn master failed to start

i try to start a app via nginx & unicorn . i start server successfully for 3 time bye similar codes. but i usually see this :

[root@server yaqoot]# unicorn_rails -c config/unicorn.rb -D
/usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/configurator.rb:88:in `block in reload': directory for stderr_path=/var/www/yaqoot/log/unicorn/log not writable (ArgumentError)
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/configurator.rb:84:in `each'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/configurator.rb:84:in `reload'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/configurator.rb:65:in `initialize'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:76:in `new'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:76:in `initialize'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `new'
    from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.1.0/bin/unicorn_rails:23:in `load'
    from /usr/local/rvm/gems/ruby-2.1.0/bin/unicorn_rails:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
master failed to start, check stderr log for details

how i can fix this?

As it's stated in the error message:

/var/www/yaqoot/log/unicorn/log not writable

So,

  • you need to set different path for err logging

or

  • you need to run unicorn as a proper user

or

  • you need to chown/change permissions for this folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM