Projet

Général

Profil

Redmine » Historique » Version 8

Mehdi Abaakouk, 16/12/2014 10:39

1 1 Laurent GUERBY
{{>toc}}
2 1 Laurent GUERBY
3 1 Laurent GUERBY
h1. Redmine
4 1 Laurent GUERBY
5 7 Mehdi Abaakouk
La machine chiliproject contient:
6 7 Mehdi Abaakouk
7 7 Mehdi Abaakouk
 - une base données postgres
8 7 Mehdi Abaakouk
 - une application installé dans /srv/http/redmine
9 7 Mehdi Abaakouk
 - le git de git.tetaneutral.net dans /srv/http/repositories
10 7 Mehdi Abaakouk
11 1 Laurent GUERBY
h2. Liens
12 1 Laurent GUERBY
13 1 Laurent GUERBY
* https://wiki.ldn-fai.net/wiki/Redmine#Par_mail ouvrir un ticket redmine par mail
14 2 Mehdi Abaakouk
15 6 Mehdi Abaakouk
h2. Upgrade
16 6 Mehdi Abaakouk
17 8 Mehdi Abaakouk
<pre>
18 6 Mehdi Abaakouk
# /etc/init.d/apache2 stop
19 6 Mehdi Abaakouk
# su - postgres
20 6 Mehdi Abaakouk
# pgdump redmine > redmine-3.X.X-20130108.sql
21 6 Mehdi Abaakouk
# exit
22 6 Mehdi Abaakouk
#
23 6 Mehdi Abaakouk
# ssh -Tf -D9999 h2 -p 2222  sleep 15m
24 6 Mehdi Abaakouk
# 
25 6 Mehdi Abaakouk
# cd /srv/http/redmine
26 6 Mehdi Abaakouk
# tsocks git fetch pull --rebase
27 6 Mehdi Abaakouk
# cd plugins/redmine_git_hosting
28 6 Mehdi Abaakouk
# git checkout v0.7.8
29 6 Mehdi Abaakouk
30 6 Mehdi Abaakouk
# cd /srv/http/redmine
31 6 Mehdi Abaakouk
32 6 Mehdi Abaakouk
# tsocks bundle update
33 6 Mehdi Abaakouk
# gem cleanup
34 6 Mehdi Abaakouk
# tsocks bundle update
35 6 Mehdi Abaakouk
# bundle exec rake generate_secret_token
36 6 Mehdi Abaakouk
# bundle exec rake db:migrate RAILS_ENV=production
37 6 Mehdi Abaakouk
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
38 6 Mehdi Abaakouk
# bundle exec rake tmp:cache:clear tmp:sessions:clear
39 8 Mehdi Abaakouk
</pre>
40 2 Mehdi Abaakouk
41 2 Mehdi Abaakouk
h2. Investigation Erreur 500
42 2 Mehdi Abaakouk
43 5 Laurent GUERBY
http://lists.tetaneutral.net/pipermail/technique/2014-May/001335.html
44 5 Laurent GUERBY
45 2 Mehdi Abaakouk
Erreur dans /srv/http/redmine/log/production.log:
46 2 Mehdi Abaakouk
47 2 Mehdi Abaakouk
<pre>
48 2 Mehdi Abaakouk
Completed 500 Internal Server Error in 23.2ms
49 2 Mehdi Abaakouk
50 2 Mehdi Abaakouk
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "wiki_content_versions_pkey"
51 2 Mehdi Abaakouk
DETAIL:  Key (id)=(164) already exists.
52 2 Mehdi Abaakouk
: 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"):
53 2 Mehdi Abaakouk
</pre>
54 2 Mehdi Abaakouk
55 2 Mehdi Abaakouk
<pre>
56 2 Mehdi Abaakouk
# su - postgres
57 2 Mehdi Abaakouk
# psql redmine
58 3 Mehdi Abaakouk
# select max(id) from wiki_content_versions;
59 4 Mehdi Abaakouk
max  
60 4 Mehdi Abaakouk
------
61 4 Mehdi Abaakouk
 6193
62 4 Mehdi Abaakouk
(1 row)
63 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq start 6194;
64 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq restart;
65 2 Mehdi Abaakouk
</pre>