项目

一般

简介

打开地址报500错误

0

sky sky
大约 2 个月 之前增加

正常使用了一周左右,突然出现无法打开首页的情况,直接显示500错误页面,查看日志后网上搜了搜也没有解决方案,有没有大神可以分析下问题出在哪里。系统报错日志如下:

Completed 500 Internal Server Error in 7ms (ActiveRecord: 2.5ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Table 'bitnami_redmine.tokens’ doesn’t exist: UPDATE `tokens` SET `tokens`.`updated_on` = '2021-04-26 15:47:29’ WHERE `tokens`.`user_id` = 34 AND `tokens`.`value` = '5bdb918139f86a3fb172ea144ea59a2bba4e108a’ AND `tokens`.`action` = 'session’ AND (updated_on > '2021-04-26 14:47:29.921682’)):

app/models/user.rb:492:in `verify_session_token’
app/controllers/application_controller.rb:83:in `session_expired?'
app/controllers/application_controller.rb:73:in `session_expiration’
Started GET "/redmine/” for 127.0.0.1 at 2021-04-26 15:47:45 +0800
Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 8ms (ActiveRecord: 2.5ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Table 'bitnami_redmine.tokens’ doesn’t exist: UPDATE `tokens` SET `tokens`.`updated_on` = '2021-04-26 15:47:45’ WHERE `tokens`.`user_id` = 35 AND `tokens`.`value` = 'dd2ede7e1432e065820e427f6bcc9ea91a23a3f1’ AND `tokens`.`action` = 'session’ AND (updated_on > '2021-04-26 14:47:45.966019’)):

app/models/user.rb:492:in `verify_session_token’
app/controllers/application_controller.rb:83:in `session_expired?'
app/controllers/application_controller.rb:73:in `session_expiration’
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Started GET "/redmine/login?back_url=http%3A%2F%2F192.168.0.40%3A9000%2Fredmine%2F” for 127.0.0.1 at 2021-04-26 15:49:58 +0800
Processing by AccountController#login as HTML
Parameters: {“back_url"⇒“http://192.168.0.40:9000/redmine/”}
Completed 500 Internal Server Error in 78ms (ActiveRecord: 6.6ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Table 'bitnami_redmine.tokens’ doesn’t exist: SHOW FULL FIELDS FROM `tokens`):

app/models/user.rb:485:in `verify_session_token’
app/controllers/application_controller.rb:83:in `session_expired?'
app/controllers/application_controller.rb:73:in `session_expiration’
Started GET "/redmine/” for 127.0.0.1 at 2021-04-26 15:49:59 +0800
Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 73ms (ActiveRecord: 7.8ms)

解答 (2)

0

sky sky
大约 2 个月 之前增加

找了之前备份的库还原后解决。

-1

redmineplugins.cn Admin
大约 2 个月 之前增加

在redmine目录下执行下面指定后再试试看:

bundle exec rake generate_secret_token  

用的是bitnami redmine 部署安装的,在安装目录Bitnami\redmine-4.2.0-1下执行后提示
Could not locate Gemfile or .bundle/ directory

redmine\htdocs执行命令后重启服务,还是无法打开页面。

    (1-2/2)