Defect #30851

Redmine 4.0.1 Internnal error 500 on accessing the settings page

Added by net ops over 2 years ago. Updated over 2 years ago.

Status:ReopenedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Administration
Target version:-
Resolution:Invalid Affected version:4.0.1

Description

Hi,

I've setup a brand new redmine 4.0.1 plateform and everything's running fine but the "Settings" sub menu from "Administration" menu.
When I click on it, I've got an internal error (redmine error 500)

When I go back to my previous version redmine 3.4.5, I can access the Settings page, no problem.

Here is my configuration :

Centos 7 operating system
[redmine-4.0.1]# bundler -v
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Bundler version 2.0.1

[redmine-4.0.1]# passenger -v
Phusion Passenger 6.0.1

[redmine-4.0.1]# ruby -v
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]

[redmine-4.0.1]# rails -v
Rails 5.2.2

Here's my database.yml

Using seperate mysql server for redmine database:

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "redmine" 
  encoding: utf8

This is error on the browsers:

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.

This is the exact error each time I click on Administration, Settings page in the production.log

Started GET "/settings" for 10.11.0.254 at 2019-02-20 12:26:56 -0600
Processing by SettingsController#index as HTML
  Current user: aqureshi (id=79)
  Rendering settings/edit.html.erb within layouts/admin
  Rendered settings/_general.html.erb (117.3ms)
  Rendered settings/_display.html.erb (1691.3ms)
  Rendered common/_tabs.html.erb (1820.0ms)
  Rendered settings/edit.html.erb within layouts/admin (1820.8ms)
Completed 500 Internal Server Error in 1884ms (ActiveRecord: 39.0ms)

*ActionView::Template::Error (Invalid argument @ apply2files - /web/servers/redmine-4.0.1/tmp/cache*/.i18n%2Flanguages_options%2F4.0.1.stable20190220-19164-oswowk):
    3: <div class="box tabular settings">
    4: <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %></p>
    5:
    6: <p><%= setting_select :default_language, lang_options_for_select(false) %></p>
    7:
    8: <p><%= setting_check_box :force_default_language_for_anonymous %></p>
    9:

lib/redmine/i18n.rb:125:in `languages_options'
app/helpers/application_helper.rb:1232:in `lang_options_for_select'
app/views/settings/_display.html.erb:6:in `block in _app_views_settings__display_html_erb__340993510091443663_70326203883240'
app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__340993510091443663_70326203883240'
app/views/common/_tabs.html.erb:17:in `block in _app_views_common__tabs_html_erb__2649452778657733169_70326203643820'
app/views/common/_tabs.html.erb:16:in `each'
app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__2649452778657733169_70326203643820'
app/helpers/application_helper.rb:386:in `render_tabs'
app/views/settings/edit.html.erb:5:in `_app_views_settings_edit_html_erb__3986788488367518628_70326203621180'
app/controllers/settings_controller.rb:31:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I have also started the webrick server:

[redmine-4.0.1]# bundle exec rails server webrick -e production

When I click on Settings, I get this in the webrick server conosle:

http://redmine-test.trondent.net:3000/stylesheets/application.css -> /images/true.png
10.11.0.254 - - [20/Feb/2019:12:41:16 CST] "GET /settings HTTP/1.1" 500 648
http://redmine-test.trondent.net:3000/admin/info -> /settings

Please advise?

Thank you so much for your time in advance..

redmine.jpg (53 KB) net ops, 2019-06-25 23:52

History

#1 Updated by net ops over 2 years ago

In looking around google search to troubleshoot this issue:

1. I have added 777 permission to redmine folder on my Centos 7 server:

2. I even added this in my mysql server,

mysqlqa-01 etc]# vim /etc/my.cnf

character-set-server=utf8
skip-character-set-client-handshake

3. Also I deleted the following groups from the users table: GroupNonMember and GroupAnonymous

[redmine_test]> SELECT * from users WHERE id=96;
+----+-------+-----------------+-----------+-----------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
| id | login | hashed_password | firstname | lastname        | admin | status | last_login_on | language | auth_source_id | created_on          | updated_on          | type           | identity_url | mail_notification | salt | must_change_passwd | passwd_changed_on |
+----+-------+-----------------+-----------+-----------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
| 96 |       |                 |           | Anonymous users |     0 |      1 | NULL          |          |           NULL | 2015-08-27 20:52:28 | 2015-08-27 20:52:28 | GroupAnonymous | NULL         |                   | NULL |                  0 | NULL              |
+----+-------+-----------------+-----------+-----------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
1 row in set (0.00 sec)

[redmine_test]> SELECT * from users WHERE id=97;
+----+-------+-----------------+-----------+------------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
| id | login | hashed_password | firstname | lastname         | admin | status | last_login_on | language | auth_source_id | created_on          | updated_on          | type           | identity_url | mail_notification | salt | must_change_passwd | passwd_changed_on |
+----+-------+-----------------+-----------+------------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
| 97 |       |                 |           | Non member users |     0 |      1 | NULL          |          |           NULL | 2015-08-27 20:52:28 | 2015-08-27 20:52:28 | GroupNonMember | NULL         |                   | NULL |                  0 | NULL              |
+----+-------+-----------------+-----------+------------------+-------+--------+---------------+----------+----------------+---------------------+---------------------+----------------+--------------+-------------------+------+--------------------+-------------------+
1 row in set (0.01 sec)

[redmine_test]> DELETE from users WHERE id=96;
Query OK, 1 row affected (0.25 sec)

[redmine_test]> DELETE from users WHERE id=97;
Query OK, 1 row affected (0.04 sec)

#2 Updated by net ops over 2 years ago

I have these 2 plugins installed but I even tried without installing the plugins from fresh install, still cannot access Settings page period. Get Internal Error message.

git clone https://github.com/arkhitech/redmine_timesheet_plugin.git redmine_timesheet_plugin

git clone https://github.com/collectiveidea/action_mailer_optional_tls.git action_mailer_optional_tls

#3 Updated by Go MAEDA over 2 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Could you try the following command?

bundle exec rake tmp:clear

Please use forums for questions. Reading How to request help may be helpful for you.

#4 Updated by net ops over 2 years ago

  • Status changed from Closed to Reopened

I did tried that command as well that did not help either, I forgot to list it.

Is this a defect or configuration or setup issue?

Thanks for your time.

#5 Updated by net ops over 2 years ago

Nevemind, I will post it in Forums.

Thanks again.

#6 Updated by Holger Just over 2 years ago

  • Description updated (diff)

#7 Updated by net ops over 2 years ago

I still have same issue with internal server error 500 when accessing the settings

it has to do with these files under this path: /web/servers/redmine-4.0.4/app/views/settings/edit.html.erb

if I remove the two line, then I see blank Settings page with no Internal server error

see screen shot attached:

[root@redmine-04 settings]# more edit.html.erb_ORIG
<h2><%= l(:label_settings) %></h2>

<%= render_settings_error @setting_errors %>

<%= render_tabs administration_settings_tabs %>

<% html_title(l(:label_settings), l(:label_administration)) ->
[root@redmine-04 settings]# more edit.html.erb
<h2><
= l(:label_settings) %></h2>

<% html_title(l(:label_settings), l(:label_administration)) -%>
[root@redmine-04 settings]# pwd
/web/servers/redmine-4.0.4/app/views/settings
[root@redmine-04 settings]#

This is production.log below:

Processing by SettingsController#index as HTML
Current user: aqureshi (id=79)
Rendering settings/edit.html.erb within layouts/admin
Rendered settings/_general.html.erb (37.6ms)
Rendered settings/_display.html.erb (42.0ms)
Rendered settings/_authentication.html.erb (68.7ms)
Rendered settings/_api.html.erb (7.4ms)
Rendered settings/_projects.html.erb (57.9ms)
Rendered settings/_users.html.erb (476.1ms)
Rendered settings/_issues.html.erb (98.7ms)
Rendered common/_tabs.html.erb (1139.6ms)
Rendered settings/edit.html.erb within layouts/admin (1144.2ms)
Completed 500 Internal Server Error in 1203ms (ActiveRecord: 83.8ms)

ActionView::Template::Error (undefined method `close_duplicate_issues' for #<Class:0x000000000491deb8>):
7:
8: <p><%= setting_select :cross_project_subtasks, cross_project_subtasks_options ></p>
9:
10: <p><
= setting_check_box :close_duplicate_issues ></p>
11:
12: <p><
= setting_check_box :issue_group_assignment %></p>
13:

app/helpers/settings_helper.rb:51:in `setting_value'
app/helpers/settings_helper.rb:98:in `setting_check_box'
app/views/settings/_issues.html.erb:10:in `block in app_views_settings_issues_html_erb___1767202756477160075_70265069608480'
app/views/settings/_issues.html.erb:1:in `_app_views_settings__issues_html_erb___1767202756477160075_70265069608480'
app/views/common/_tabs.html.erb:17:in `block in app_views_common_tabs_html_erb__33151668821407475_70265068915160'
app/views/common/_tabs.html.erb:16:in `each'
app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__33151668821407475_70265068915160'
app/helpers/application_helper.rb:386:in `render_tabs'
app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb___487560671902126446_70265068908560'
app/controllers/settings_controller.rb:31:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Creating scope :sorted. Overwriting existing method User.sorted.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method User.sorted.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :system. Overwriting existing method Enumeration.system.
Started GET "/admin/info" for 10.11.0.254 at 2019-06-25 16:45:49 -0500
Processing by AdminController#info as HTML
Current user: aqureshi (id=79)
Rendering admin/info.html.erb within layouts/admin
Rendered admin/info.html.erb within layouts/admin (16.2ms)
Rendered admin/_menu.html.erb (9.9ms)
Rendering layouts/base.html.erb
Rendered layouts/base.html.erb (175.4ms)
Completed 200 OK in 470ms (Views: 193.4ms | ActiveRecord: 63.2ms)
Started GET "/timesheet/index" for 10.11.0.254 at 2019-06-25 16:45:55 -0500
Processing by TimesheetController#index as HTML
Current user: aqureshi (id=79)
Rendering plugins/redmine_timesheet_plugin/app/views/timesheet/index.html.erb within layouts/base
Rendered plugins/redmine_timesheet_plugin/app/views/timesheet/_form.html.erb (835.3ms)
Rendered plugins/redmine_timesheet_plugin/app/views/timesheet/index.html.erb within layouts/base (866.4ms)
Completed 200 OK in 1185ms (Views: 905.5ms | ActiveRecord: 89.2ms)
Started GET "/admin" for 10.11.0.254 at 2019-06-25 16:45:57 -0500
Processing by AdminController#index as HTML
Current user: aqureshi (id=79)
Rendering admin/index.html.erb within layouts/admin
Rendered admin/_menu.html.erb (5.6ms)
Rendered admin/index.html.erb within layouts/admin (7.0ms)
Rendering layouts/base.html.erb
Rendered layouts/base.html.erb (121.4ms)
Completed 200 OK in 161ms (Views: 122.7ms | ActiveRecord: 25.1ms)
Started GET "/settings" for 10.11.0.254 at 2019-06-25 16:46:00 -0500
Processing by SettingsController#index as HTML
Current user: aqureshi (id=79)
Rendering settings/edit.html.erb within layouts/admin
Rendered settings/edit.html.erb within layouts/admin (1.0ms)
Rendered admin/_menu.html.erb (5.6ms)
Rendering layouts/base.html.erb
Rendered layouts/base.html.erb (154.0ms)
Completed 200 OK in 216ms (Views: 191.7ms | ActiveRecord: 11.8ms)

Also available in: Atom PDF