Content
Error 500 if I create a forum
Added by Gustav Gans almost 5 years ago
Hello,
as project admin I try to create a forum and got this error:
Feb 14 08:20:19 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:19.586719 #792] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:19 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:19.632601 #792] INFO -- : method=GET path=/ format=html controller=HomescreenController action=index status=200 duration=48.84 view=29.85 db=10.06 user=12
Feb 14 08:20:22 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:22.551764 #794] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:22 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:22.556889 #794] INFO -- : method=GET path=/projects/level_list.json format=json controller=ProjectsController action=level_list status=200 duration=8.26 view=0.64 db=2.07 user=12
Feb 14 08:20:24 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:24.205307 #790] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:24 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:24.247980 #790] INFO -- : method=GET path=/projects/open-exchange-test format=html controller=Overviews::OverviewsController action=show status=200 duration=45.62 view=28.72 db=7.41 user=12
Feb 14 08:20:26 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:26.943205 #794] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:27 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:27.048667 #794] INFO -- : method=GET path=/projects/open-exchange-test/settings format=html controller=ProjectSettingsController action=show status=200 duration=108.49 view=83.75 db=13.28 user=12
Feb 14 08:20:30 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:30.591361 #792] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:30 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:30.639606 #792] INFO -- : method=GET path=/projects/open-exchange-test/settings/forums format=html controller=ProjectSettingsController action=show status=200 duration=51.33 view=31.62 db=8.44 user=12
Feb 14 08:20:32 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:32.133783 #794] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:32 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:32.214074 #794] INFO -- : method=GET path=/projects/open-exchange-test/forums/new format=html controller=ForumsController action=new status=200 duration=84.25 view=47.26 db=11.12 user=12
Feb 14 08:20:41 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:41.658615 #794] INFO -- : OpenProject User: Vorname Nachname (45221 ID: 12 <vorname.nachname@example.org>)
Feb 14 08:20:41 projects openproject-web-1.service[376]: E, [2020-02-14T08:20:41.677035 #794] ERROR -- : [current_user=Vorname Nachname] PG::UniqueViolation: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »forums_pkey«
Feb 14 08:20:41 projects openproject-web-1.service[376]: DETAIL: Schlüssel »(id)=(3)« existiert bereits.
Feb 14 08:20:41 projects openproject-web-1.service[376]: : PG::UniqueViolation: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »forums_pkey«
Feb 14 08:20:41 projects openproject-web-1.service[376]: DETAIL: Schlüssel »(id)=(3)« existiert bereits.
Feb 14 08:20:41 projects openproject-web-1.service[376]: I, [2020-02-14T08:20:41.706826 #794] INFO -- : method=POST path=/projects/open-exchange-test/forums format=html controller=ForumsController action=create status=500 duration=51.67 view=26.33 db=6.69 user=12
I try different Names, for example "test657657", this forum does not exist. OpenProject 10.3.1 runs on a Debian Buster 64bit on PostgreSQL 9.6. Any ideas whats wrong?
Replies (4)
Hi Gustav,
in all cases you should upgrade your database. PG 9.4 is not supported.
https://docs.openproject.org/installation-and-operations/system-requirements/
Best
Niels
Hi Gustav,
your primary key sequence for forums is wrong. I'm not sure what was causing this but it might be an error in our migration script. After upgrading your postgresql value (we require 9.5. at least), please use the following database command to fix:
Could you elaborate on what your installation looks like? Did you migrate from an older version or anything special?
Best,
Oliver
Hello Niels,
thank you, you are right, I upgrade the PostgreSQL cluster to the Debian Buster Version 11, OpenProject run now with this version. But I got the same error, if I create a forum?
Thank you Oliver, I enter your commands:
And now I can create a forum without error. Thank you very much!
I upgrade this installation from the Version 8.2.1 to 10.3.1 with apt-get under Debian Stretch. After that, I upgrade Debian to Buster. There was no errors on the migration from mysql to postgresql and the update from 8 to 10.
Thanks for getting back Gustav. The migration should not have resulted in that error, I will try to reproduce it. Thanks for letting me know the command fixed your issue.
Best
Oliver