AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 609321
Accepted
Anatol
Anatol
Asked: 2014-07-02 06:11:55 +0800 CST2014-07-02 06:11:55 +0800 CST 2014-07-02 06:11:55 +0800 CST

Redmine 迁移后出现错误 500

  • 772

我已经在Ubuntu 12.04上安装了一个新的Redmine 2.5.1安装,使用 apache2 和乘客遵循以下方法:http ://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step

在那之后我已经

  1. 转储了现有 Redmine 1.1.3.stable 安装的 mysql 数据库,
  2. 将其还原到我的新服务器上的新数据库,
  3. 将附件从旧服务器复制到新服务器到 /usr/share/redmine/files (+ chmod 755)
  4. 告诉 redmine 将新创建的数据库与我在数据库配置中导入的旧票证一起使用。
  5. 将 dir 更改为 /usr/share/redmine 并触发此操作
rake db:migrate RAILS_ENV=production 

rake generate_secret_token

到目前为止,一切都很好。Redmine 可以在浏览器中查看,管理设置可以在 Projects 中更改。

但是,如果我尝试创建新票证或查看旧票证,我会收到错误 500。此外,Redmine 给了我版本 1.1.3,但应该是 2.5.1。看来我可能忘记运行迁移脚本了。

错误 500

找到我创建的错误

  1. /usr/share/redmine/log/production.log
  2. chmod 755 生产日志
  3. 更改了我的 apache2 配置中的错误处理
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogLevel WARN
ErrorLog "/var/log/apache2/redmine-error.log"
CustomLog "/var/log/apache2/redmine-access.log" common

但我在 production.log、redmine-error.log、error.log 中看不到任何错误!?

如何解决错误 500 问题?

更新我处理让日志记录运行。这是日志输出:

    ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'author' in 'where clause': SELECT * FROM `workflows` WHERE (`workflows`.old_status_id = 1 AND (role_id IN (1) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))) ):
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql_adapter.rb:324:in `execute'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql_adapter.rb:639:in `select'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:665:in `find_by_sql'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:1582:in `find_every'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:619:in `find'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_collection.rb:60:in `find'
  app/models/issue_status.rb:78:in `find_new_statuses_allowed_to'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_proxy.rb:215:in `send'
  /usr/lib/ruby/vendor_ruby/active_record/associations/association_proxy.rb:215:in `method_missing'
  app/models/issue.rb:471:in `new_statuses_allowed_to'
  app/controllers/issues_controller.rb:325:in `build_new_issue_from_params'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `evaluate_method'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:166:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:225:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:629:in `run_before_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:615:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:24:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61
redmine
  • 1 1 个回答
  • 2727 Views

1 个回答

  • Voted
  1. Best Answer
    Anatol
    2014-07-25T23:56:16+08:002014-07-25T23:56:16+08:00

    这个问题可以通过给 tmp dir chmod 755 来解决

    • 0

相关问题

  • 对于 RoR 应用程序,强制 URL 根为 HTTPS 而不是 HTTP

  • Ruby on Rails 应用程序的虚拟主机设置(mod 乘客)

  • 在 Apache + Passenger 上运行 Ruby on Rails 应用程序 == 占用大量内存

  • 在 2003 服务器上使用 SQLITE 备份 Redmine?

  • 在 Windows Server 2003 上使用 Bitnami 堆栈安装程序设置 Redmine

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve