Project

General

Profile

Problems for Automating repository creation after upgrade to 2.4.1

Added by Juan Manuel Moreno-Rivera over 10 years ago

I had a redmine 1.3.x version with automatic creation of repositories working based on a SSL communication. I have updated to version 2.4.1 following these indications:

http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

After that I modified the symbolic link to point to the new version folder and made everything work again. I have gone back to make the automatic repository creation available in the new version. I followed for the previous installation the following instructions:

http://www.redmine.org/projects/redmine/wiki/HowTo_Automate_repository_creation

I only changed the path in the crontab instruction for executing reposman.rb to point to the new version folder. I tried the instruction in the new directory and it throws the following error:

querying Redmine for projects...
Unable to connect to http://redmine.juanmayelmundo.es/sys/: Failed with 500 Internal Server Error

The logs from Apache, the SSL connection and redmine do not show anything. I don't know how to search deeper to find the problem. I have tested the execution of reposman.rb in the previous directory (folder of version 1.3.X) and it throws the same error. I didn't change anything from the files or settings of this version, but updated the database when updating to the new version. The only thing I can imagine is that there is something in the database model that changes from one version to another that is making reposman.rb failing.

For a while I was thrown an error for the my.virtual.host/sys URL. I imagine this "sys" comes from the REST API, as this folder doesn't exist in the public folder of redmine. I guess it is trying to get the list of prohjects based on the REST API. I have tried to request this list of projects, or use the REST API in my browser and the same error occurs. I have checked it and the REST aIP is available. The option for enabling repository management is also enables.

If someone could just give me some indications where this error could come from it would be very helpful. I have no more ideas. My instalation is the following:

# RAILS_ENV=production script/about
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.

sh: darcs: command not found
sh: bzr: command not found
Environment:
  Redmine version                2.4.1.stable
  Ruby version                   1.8.7-p352 (2011-06-30) [x86_64-linux]
  Rails version                  3.2.15
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.17
  Mercurial                      2.0.2
  Cvs                            1.12.13
  Git                            1.7.9.5
  Filesystem
Redmine plugins:
  no plugin installed

The only difference from the previous version, is the database adapter. I read it should be changed. I have tested also with the mysql adapter, and the same message. Any idea?

Replies (5)

RE: Problems for Automating repository creation after upgrade to 2.4.1 - Added by Juan Manuel Moreno-Rivera over 10 years ago

I have reread the post. The REST API is enabled but is not working in my new installation. I think this is the problem, that the REST aPI is failing. If anyone has any sugestion about how to debug more this failure it would be very helpful.

RE: Problems for Automating repository creation after upgrade to 2.4.1 - Added by Juan Manuel Moreno-Rivera over 10 years ago

Ok, here I go again. Some steps forward ...

After spending a lot of time trying to guess wher ethe problem came I did some changes and some errors araised. They were related to ruby versions conflict. I finally install RVM as I could not manage to sort it out and now I have ruby 2.0.0 running on my server.

# RAILS_ENV=production script/about
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.

sh: darcs: command not found
sh: bzr: command not found
Environment:
  Redmine version                2.4.1.stable
  Ruby version                   2.0.0-p353 (2013-11-22) [x86_64-linux]
  Rails version                  3.2.15
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.17
  Mercurial                      2.0.2
  Cvs                            1.12.13
  Git                            1.7.9.5
  Filesystem
Redmine plugins:
  redmine_timesheet_plugin       0.7.0

If I restart apache server or whenever I try to access redmine through my subdomain name (redmine.mydomain.es) I get the following error:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- phusion_passenger/utils (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/phusion_passenger/passenger-spawn-server:53:in `<main>'
[ pid=23031 file=ext/apache2/Hooks.cpp:727 time=2013-12-11 20:44:19.873 ]:
  Unexpected error in mod_passenger: Cannot spawn application '/usr/share/redmine-2.4.1': The spawn server has exited unexpectedly.
  Backtrace:
     in 'virtual Passenger::Application::SessionPtr Passenger::ApplicationPoolServer::Client::get(const Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
     in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:523)

This is the kind of error that pushed me towards the ruby versions conflict. It seems to be using a ruby 1.9.1 path. However, when I execute:

ruby -v

I get:

ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]

I even removed with RVM the version 1.9.1 which is no more in my server but it still fails. I reach a situation in which ruby is loaded but redmine fails (see redmine_screenshot.png). However, when I execute:

ruby script/rails server webrick -e production

Webrick loads with ruby version 2.0.0 and redmine works included the rest API, but when loading redmine in the webbrowser it seems to be looking for 1.8 gem path (see redmine_screenshot.png), where mysql2 gem is not installed. I have hardcoded in environment.rb the GEM_PATH (or I though I did):

ENV['GEM_PATH'] = '/usr/local/rvm/gems/ruby-2.0.0-p353/gems/'

But the error remains the same. Could anyone help me on configuring the gem_path to make redmine normal execution work in the same way that webrick's one? Thanks!

RE: Problems for Automating repository creation after upgrade to 2.4.1 - Added by Pavel Potcheptsov over 10 years ago

Just a wild guess, what is your phusion_passenger version?

RE: Problems for Automating repository creation after upgrade to 2.4.1 - Added by Juan Manuel Moreno-Rivera over 10 years ago

I have updated it to Phusion_Passenger/4.0.29. However installation seems not to be ok. I am working on it ... I will report any new.

    (1-5/5)