Project

General

Profile

Actions

Defect #38638

closed

Redmine migration from v4.10 to 5.0.5

Added by phil vel 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello,
I've done the migration and I'm stuck to the following issue :
In production.log for url www.mysitecom/redmine/login, I got the fatal error :

_I, [2023-05-30T16:40:29.242714 #3646853] INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Started GET "/redmine/login" for 10.89.196.66 at 2023-05-30 16:40:29 +0200
I, [2023-05-30T16:40:29.256351 #3646853] INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Processing by AccountController#login as HTML
I, [2023-05-30T16:40:29.401850 #3646853] INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Current user: anonymous
I, [2023-05-30T16:40:29.414915 #3646853] INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Completed 500 Internal Server Error in 158ms (ActiveRecord: 14.6ms | Allocations: 30516)
F, [2023-05-30T16:40:29.417066 #3646853] FATAL -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8]
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] NoMethodError (undefined method `cached' for #<ActionView::FileSystemResolver:0x00007fe74d6c3bd0 @unbound_templates=#<Concurrent::Map:0x00007fe74d6c3b30 entries=0 default_proc=nil>, @path_parser=#<ActionView::Resolver::PathParser:0x00007fe74d6c3a18>, @path="/var/www/3DX/app/views">
Did you mean? catch):
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8]
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] config/initializers/10-patches.rb:55:in `find_all'
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Any idea ?
Thanks in advance.

Data:

I've tried to disable caching
In environment/production.rb, I've added

config.consider_all_requests_local       = true
config.action_controller.perform_caching = false

I got the same fatal error.

I've tried in configuration.yml
sudo_mode: true and then false : same fatal error

The rights on directory /var/www/3DX/app/views are ok :

ls -ld /var/www/3DX/app/views/
drwxrwxrwx. 53 redmine-3DX redmine-3DX 4096 Mar  5 22:35 /var/www/3DX/app/views/
ls -ld /var/www/3DX/app/views/*
drwxrwxr-x. 2 redmine-3DX redmine-3DX 4096 Mar  5 22:35 /var/www/3DX/app/views/account
drwxrwxr-x. 2 redmine-3DX redmine-3DX 4096 Mar  5 22:35 /var/www/3DX/app/views/activities
drwxrwxr-x. 2 redmine-3DX redmine-3DX 4096 Mar  5 22:35 /var/www/3DX/app/views/admin
...

Selinux is disabled.
Redmine is installed with passenger

# ps auxwww|grep -i pass
root      571904  0.0  0.0  12144  1204 pts/1    S+   09:39   0:00 grep --color=auto -i pass
root     3781016  0.0  0.1 378628 13036 ?        Ssl  May30   0:01 Passenger watchdog
root     3781019  0.4  0.2 1136712 20048 ?       Sl   May30   4:17 Passenger core
redmine+ 3788873  0.0  2.0 527472 166176 ?       Sl   May30   0:00 Passenger RubyApp: /var/www/3DX/ (production)
# ls -ld /var/www/3DX/
drwxr-xr-x. 21 redmine-3DX redmine-3DX 4096 May 30 17:59 /var/www/3DX/
# su - redmine-3DX -s /bin/bash
Last login: Tue May 30 18:04:41 CEST 2023 on pts/1
$ cd /var/www/3DX/
$ bundle check
The Gemfile's dependencies are satisfied

My gemfile :

$ cat Gemfile
source 'http://rubygems.org'

ruby '>= 2.5.0', '< 3.2.0'
gem 'bundler', '>= 1.12.0'

gem 'passenger', ">=5.3.2", require: "phusion_passenger/rack_handler" 

gem 'rails', '7.0.4.3'
gem 'globalid', '~> 0.4.2' if Gem.ruby_version < Gem::Version.new('2.6.0')
gem 'rouge', '~> 4.1.0'
gem 'request_store', '~> 1.5.0'
gem 'mini_mime', '~> 1.1.0'
gem "actionpack-xml_parser" 
gem 'roadie-rails', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 2.2.0' : '~> 3.0.0')
gem 'marcel'
gem "mail", "~> 2.8.1" 
gem 'csv', '~> 3.2.0'
gem 'nokogiri', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 1.12.5' : '~> 1.14.2')
gem "rexml", require: false if Gem.ruby_version >= Gem::Version.new('3.0')
gem 'i18n', '~> 1.12.0'
gem 'rbpdf', '~> 1.21.0'
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'
gem 'net-smtp', '~> 0.3.0'
gem 'net-imap', '~> 0.3.4'
gem 'net-pop', '~> 0.1.1'
# Rails 6.1.6.1 does not work with Pysch 3.0.2, which is installed by default with Ruby 2.5. See https://github.com/rails/rails/issues/45590
gem 'psych', '>= 3.1.0' if Gem.ruby_version < Gem::Version.new('2.6.0')

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]

# TOTP-based 2-factor authentication
gem 'rotp', '>= 5.0.0'
gem 'rqrcode'

# Optional gem for LDAP authentication
group :ldap do
  gem 'net-ldap', '~> 0.17.0'
end

# Optional gem for exporting the gantt to a PNG file
group :minimagick do
  gem 'mini_magick', '~> 4.12.0'
end

# Optional Markdown support, not for JRuby
# ToDo: Remove common_mark group when common_mark is decoupled from markdown. See defect (#36892) for more details.
gem 'redcarpet', '~> 3.6.0', groups: [:markdown, :common_mark]

# Optional CommonMark support, not for JRuby
group :common_mark do
  gem "html-pipeline", "~> 2.14.3" 
  gem "commonmarker", (Gem.ruby_version < Gem::Version.new('2.6.0') ? '0.21.0' : '~> 0.23.8')
  gem "sanitize", "~> 6.0" 
  gem 'deckar01-task_list', '2.3.2'
end

# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
  yaml_config = ERB.new(IO.read(database_file)).result
  database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config)
  adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  if adapters.any?
    adapters.each do |adapter|
      case adapter
      when 'mysql2'
        gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw]
      when /postgresql/
        gem "pg", "~> 1.2.2", :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlite3/
        gem "sqlite3", "~> 1.4.0", :platforms => [:mri, :mingw, :x64_mingw]
      when /sqlserver/
        gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw]
        gem "activerecord-sqlserver-adapter", "~> 6.1.0", :platforms => [:mri, :mingw, :x64_mingw]
      else
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
      end
    end
  else
    warn("No adapter found in config/database.yml, please configure it first")
  end
else
  warn("Please configure your config/database.yml first")
end

#group :development do
#  gem 'listen', '~> 3.3'
#  gem "yard" 
#end
#
group :test do
#  gem "rails-dom-testing" 
#  gem 'mocha', (Gem.ruby_version < Gem::Version.new('2.7.0') ? ['>= 1.4.0', '< 2.0.0'] : '>= 1.4.0')
#  gem 'simplecov', '~> 0.21.2', :require => false
#  gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
#  # For running system tests
  gem 'puma', (Gem.ruby_version < Gem::Version.new('2.7') ? '< 6.0.0' : '>= 0')
#  gem 'capybara', (if Gem.ruby_version < Gem::Version.new('2.6')
#                     '~> 3.35.3'
#                   elsif Gem.ruby_version < Gem::Version.new('2.7')
#                     '~> 3.36.0'
#                   else
#                     '~> 3.38.0'
#                   end)
#  gem "selenium-webdriver", "~> 3.142.7" 
#  gem 'webdrivers', '4.6.1', require: false
#  # RuboCop
#  gem 'rubocop', '~> 1.26.0'
#  gem 'rubocop-performance', '~> 1.13.0'
#  gem 'rubocop-rails', '~> 2.14.0'
end
#
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exist?(local_gemfile)
  eval_gemfile local_gemfile
end

# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
  eval_gemfile file
end
gem "webrick" 
#gem "puma" 
<pre>
</pre>

Actions #1

Updated by Go MAEDA 10 months ago

Could you paste all log lines containing the string "3e6f0cbf-67de-466c-93a9-557b57fcd3b8"? In short, `grep 3e6f0cbf-67de-466c-93a9-557b57fcd3b8 log/production.log`.

Actions #2

Updated by phil vel 10 months ago

Hi,
Here is the output :


# grep 3e6f0cbf-67de-466c-93a9-557b57fcd3b8 log/production.log
I, [2023-05-30T16:40:29.242714 #3646853]  INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Started GET "/redmine/login" for 10.89.196.66 at 2023-05-30 16:40:29 +0200
I, [2023-05-30T16:40:29.256351 #3646853]  INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Processing by AccountController#login as HTML
I, [2023-05-30T16:40:29.401850 #3646853]  INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8]   Current user: anonymous
I, [2023-05-30T16:40:29.414915 #3646853]  INFO -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8] Completed 500 Internal Server Error in 158ms (ActiveRecord: 14.6ms | Allocations: 30516)
F, [2023-05-30T16:40:29.417066 #3646853] FATAL -- : [3e6f0cbf-67de-466c-93a9-557b57fcd3b8]
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] NoMethodError (undefined method `cached' for #<ActionView::FileSystemResolver:0x00007fe74d6c3bd0 @unbound_templates=#<Concurrent::Map:0x00007fe74d6c3b30 entries=0 default_proc=nil>, @path_parser=#<ActionView::Resolver::PathParser:0x00007fe74d6c3a18>, @path="/var/www/3DX/app/views">
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8]
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] config/initializers/10-patches.rb:55:in `find_all'
[3e6f0cbf-67de-466c-93a9-557b57fcd3b8] lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Best regards

Actions #3

Updated by Pavel Rosický 10 months ago

Redmine 5.0.5 isn't compatible with Rails 7 yet. It is planned for Redmine 6 https://redmine.org/issues/36320 and supporting the new version may require more changes than just changing the version in a Gemfile... please try the official version without your modifications first.

Actions #4

Updated by phil vel 10 months ago

Ok Thx.
Rails has been downgraded.
It works now after a work on ruby environment stuff (vendor/bundle, Gemfile.lock, bundle config ...)

Actions #5

Updated by Go MAEDA 9 months ago

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

Also available in: Atom PDF