Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Error 500 if I create a forum

Error 500 if I create a forum

Added by Gustav Gans over 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)

RE: Error 500 if I create a forum - Added by Niels Lindenthal over 5 years ago

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

RE: Error 500 if I create a forum - Added by Oliver Günther over 5 years ago

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:

# Spawn a postgresql command line (requires postgresql-client installed!)
psql $(openproject config:get DATABASE_URL)

# Run the following SQL query to correct the forums sequence
SELECT setval('forums_id_seq', max(id)) FROM forums;

Could you elaborate on what your installation looks like? Did you migrate from an older version or anything special?

Best,

Oliver

RE: Error 500 if I create a forum - Added by Gustav Gans over 5 years ago

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:

root@projects:~$ psql $(openproject config:get DATABASE_URL)
psql (11.6 (Debian 11.6-0+deb10u1))
SSL-Verbindung (Protokoll: TLSv1.3, Verschlüsselungsmethode: TLS_AES_256_GCM_SHA384, Bits: 256, Komprimierung: aus)
Geben Sie »help« für Hilfe ein.

openproject=> SELECT setval('forums_id_seq', max(id)) FROM forums;
 setval
--------
    168
(1 Zeile)

openproject=> \q
root@projects:~$

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.

RE: Error 500 if I create a forum - Added by Oliver Günther over 5 years ago

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

  • (1 - 4/4)
Loading...