Projet

Général

Profil

Redmine » Historique » Version 9

« Précédent - Version 9/16 (diff) - Suivant » - Version actuelle
Mehdi Abaakouk, 01/09/2015 23:54


Redmine

La machine chiliproject contient:

- une base données postgres
- une application installé dans /srv/http/redmine
- le git de git.tetaneutral.net dans /srv/http/repositories

Liens

Upgrade

# /etc/init.d/apache2 stop
# su - postgres
# pgdump redmine > redmine-3.1.X-20150901.sql
# exit
#
# ssh -Tf -D9999 h2 -p 2222  sleep 15m
# 
# cd /srv/http/redmine
# tsocks git fetch pull --rebase

# # Checkout version compatible with redmine 3.1.X

# cd plugins/redmine_git_hosting
# git checkout 1.1.3
# vi Gemfile
### comment redcap gem
# cd plugins/redmine_bootstrap_kit
# git checkout 0.2.3
# cd /srv/http/redmine

# tsocks bundle update
# gem cleanup
# tsocks bundle update
# bundle exec rake generate_secret_token
# bundle exec rake db:migrate RAILS_ENV=production
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
# bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production

Investigation Erreur 500

http://lists.tetaneutral.net/pipermail/technique/2014-May/001335.html

Erreur dans /srv/http/redmine/log/production.log:

Completed 500 Internal Server Error in 23.2ms

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "wiki_content_versions_pkey" 
DETAIL:  Key (id)=(164) already exists.
: INSERT INTO "wiki_content_versions" ("author_id", "comments", "compression", "data", "page_id", "updated_on", "version", "wiki_content_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"):
# su - postgres
# psql redmine
# select max(id) from wiki_content_versions;
max  
------
 6193
(1 row)
# alter sequence wiki_content_versions_id_seq start 6194;
# alter sequence wiki_content_versions_id_seq restart;