瘦服务器权限和守护程序问题

时间:2013-02-01 00:25:11

标签: redmine thin

我正在尝试通过Thin部署Redmine 2.x并遇到了几个不同的问题。首先,当通过webrick进行测试时,我可以匿名成功导航Redmine。我甚至可以登录,但是在提交表单后我收到了一个应用程序错误。这是production.log的相关部分:

Successful authentication for 'admin' from 97.79.126.223 at Fri Feb 01 00:14:04 UTC 2013
Redirected to http://54.235.144.11:3000/
Completed 302 Found in 67ms (ActiveRecord: 37.3ms)

NoMethodError (undefined method `options' for {:ctime=>1359677644, :user_id=>1, :atime=>1359677644}:Hash):
rack (1.5.1) lib/rack/session/abstract/id.rb:321:in `commit_session'
rack (1.5.1) lib/rack/session/abstract/id.rb:218:in `context'
rack (1.5.1) lib/rack/session/abstract/id.rb:212:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__750860825__call__4__callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.5.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.5.1) lib/rack/lock.rb:17:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.11) lib/rails/engine.rb:479:in `call'
railties (3.2.11) lib/rails/application.rb:223:in `call'
rack (1.5.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.5.1) lib/rack/handler/webrick.rb:60:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.5.1) lib/rack/handler/webrick.rb:14:in `run'
rack (1.5.1) lib/rack/server.rb:264:in `start'
railties (3.2.11) lib/rails/commands/server.rb:70:in `start'
railties (3.2.11) lib/rails/commands.rb:55
railties (3.2.11) lib/rails/commands.rb:50:in `tap'
railties (3.2.11) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6

我在使用Thin和Webrick进行部署时收到此错误。我以前从未遇到过使用redmine的错误,无论它是如何部署的。

我面临的另一个问题是如何启动瘦服务器。当我在Rails目录中并提供sudo thin start Thin成功启动时,如果我尝试通过sudo /etc/init.d/thin start启动瘦我得到这个可爱的错误

>> Exiting!
/usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_unix_server': no unix-domain acceptor (RuntimeError)
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:528:in `start_server'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:548:in `start_unix_domain_server'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/unix_server.rb:19:in `connect'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `send'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
    from /usr/lib64/ruby/gems/1.8/gems/thin-1.5.0/bin/thin:6
    from /usr/bin/thin:19:in `load'
    from /usr/bin/thin:19

这是我的redmine.yml瘦配置文件

servers: 3
chdir: /www/redmine.guidelinecentral.com
user: apache
log: /var/log/thin/redmine.log
daemonize: true
pid: /var/run/thin/redmine.pid
group: apahce
require: []

timeout: 30
wait: 30
max_persistent_conns: 100
socket: /var/run/redmine/sockets/thin.sock
max_conns: 1024
environment: production

1 个答案:

答案 0 :(得分:0)

我无法解决此问题,最终重新安装了Thin和Redmine。我认为某处有一颗坏宝石。