Unicorn错误添加监听器

时间:2015-04-15 00:09:20

标签: ruby docker listener unicorn

我遇到了启动并运行独角兽服务器的问题。我尝试使用:

运行独角兽
bundle exec unicorn -c /var/www/docninja/unicorn.rb -E development -D -p 8080

我收到以下错误:

I, [2015-04-14T23:54:52.117609 #123]  INFO -- : listening on addr=/var/www/docninja/tmp/sockets/unicorn.docninja.sock fd=10
I, [2015-04-14T23:54:52.118624 #123]  INFO -- : listening on addr=0.0.0.0:8080 fd=11
I, [2015-04-14T23:54:52.119553 #123]  INFO -- : worker=0 spawning...
I, [2015-04-14T23:54:52.127642 #123]  INFO -- : master process ready
I, [2015-04-14T23:54:52.129109 #126]  INFO -- : worker=0 spawned pid=126
I, [2015-04-14T23:54:52.129559 #126]  INFO -- : Refreshing Gem list
F, [2015-04-14T23:59:07.536943 #130] FATAL -- : error adding listener addr=/var/www/docninja/tmp/sockets/unicorn.docninja.sock
/usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/socket_helper.rb:152:in `bind_listen': socket=/var/www/docninja/tmp/sockets/unicorn.docninja.sock specified but it is not a socket! (Argument$
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:242:in `listen'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `block in bind_new_listeners!'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `each'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:809:in `bind_new_listeners!'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:138:in `start'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/unicorn:23:in `load'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/unicorn:23:in `<main>'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

这是我的主要app目录中的unicorn.rb文件(/ var / www / docninja):

app_dir = "/var/www/docninja"

# Set the working application directory
working_directory app_dir

# Unicorn PID file location
pid "#{app_dir}/tmp/pids/unicorn.pid"

# Path to logs
stderr_path "#{app_dir}/log/unicorn.stderr.log"
stdout_path "#{app_dir}/log/unicorn.stdout.log"

# Path to socket file for nginx
listen "#{app_dir}/tmp/sockets/unicorn.docninja.sock", :backlog => 64

worker_processes 1

timeout 30

这里的所有路径似乎都是正确的,因为它找到了套接字目录,而日志就是它们应该存在的位置;但是,它只是无法在其上添加一些监听器?

我不确定这是否有帮助,但我也是在使用Dockerfile在Docker容器中设置它。

非常感谢任何帮助!

0 个答案:

没有答案