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

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Error upgrading from 8.2.0 to 8.3.0

Error upgrading from 8.2.0 to 8.3.0

Added by stefano marty about 6 years ago

Openproject installed on Debian 8 since 8.1.0. Upgrade from 8.1.0 to 8.2.0 went smoothly. While upgrading from 8.2.0 to 8.3.0 I got the following error:

/usr/share/openproject/installer/bin/run: riga 83: cd: /usr/share/openproject/installer/addons/mysql: File o directory non esistente

I checked the /usr/share/openproject/installer/addons/mysql folder, and it's actually missing:
**ls -l /usr/share/openproject/installer/addons/**
totale 36
drwxr-xr-x 9 root root 4096 mar  7 16:39 ./
drwx------ 6 root root 4096 mar  7 16:39 ../
drwxr-xr-x 4 root root 4096 mar  7 16:39 apache2/
drwxr-xr-x 3 root root 4096 nov  5 00:36 legacy-installer/
drwxr-xr-x 3 root root 4096 mar  7 16:39 memcached/
drwxr-xr-x 3 root root 4096 nov  5 00:36 openproject/
drwxr-xr-x 3 root root 4096 mar  7 17:34 **postgres/**
drwxr-xr-x 4 root root 4096 mar  7 16:39 repositories/
drwxr-xr-x 4 root root 4096 mar  7 16:39 smtp/

Please note that Openproject is using MySQL, a choice I made when it was installed the first time. During upgrade I was asked about changing or keeping the new /etc/default/openproject: I kept the old one, as the new was using Postgres instead of MySQL. Here's my /etc/default/openproject:
# Generated by pkgr
export APP_HOME="/home/openproject"
export APP_NAME="openproject"
export APP_SAFE_NAME="openproject"
export APP_GROUP="openproject"
export APP_USER="openproject"
export APP_WIZARDS="legacy-installer,**mysql**,apache2,repositories,smtp,memcached,openproject"
export APP_RUNNER_TYPE="systemd"
export APP_RUNNER_CLI="systemctl"
export PORT=${PORT:=6000}

export HOME="/home/openproject"

I found the mysql wizard was deleted and substituted with Postgres here:

https://github.com/opf/openproject/commit/01fd9cd2e239adefa38ab94928bb2c9950d301e2#diff-910c125a21f77d24b3ef81398ce824fe

I don't know how packager works, so my question is:

Is there a quick way to recreate the /usr/share/openproject/installer/addons/mysql folder, so that I can complete the configure openproject step and the overall upgrade? Thanks for your help.

PS: as I said, i don't know how packager works, but I'm wondering if it is possible to keep both Mysql and Postgres wizard, in order to let the upgrade run for those with MySQL database.


Replies (4)

RE: Error upgrading from 8.2.0 to 8.3.0 - Added by stefano marty about 6 years ago

Well, looks like it was easier than I thought, I just copied the missing addon from:

https://github.com/pkgr/addon-mysql

into  /usr/share/openproject/installer/addons/  and re-launched openproject configure.

It's completed with no errors. Openproject itself looks fine, updated to 8.3.0.

I just hope I did not mess anything by doing these steps!

Thanks.

RE: Error upgrading from 8.2.0 to 8.3.0 - Added by Oliver Günther about 6 years ago

Hi Stefano,

The addon-mysql was indeed removed deliberately in 8.3.0, but the installer also respects previous installations so it should not (and did not in our test environments) run into this error. This only means that default new installations will be asked to install a PostgreSQL installation. All existing installations that chose or use MySQL will continue to work even without addon-mysql. We suggest all installations to use PostgreSQL because some features of OpenProject (such as full text search) will not work without it. For too long, the packaged installation was suggesting we preferred MySQL instead because an addon to install it was provided.

By reverting the file /etc/default/openproject , you caused the wizard to look for a MySQL addon that no longer exists and resulted in this error. 

In short: You can safely update the file /etc/default/openproject` to include PostgreSQL, not MySQL addon and continue as before.

 Best,

Oliver

RE: Error upgrading from 8.2.0 to 8.3.0 - Added by stefano marty about 6 years ago

Hi Oliver,
thanks for the detailed explanation, that's exactly what I did. When apt-get started the upgrade, I was prompted about /etc/default/openproject, as detailed here below (sorry for the italian locale, but I'm sure you can guess the sequence):

apt-get dist-upgrade
[...]
Configurazione di openproject (8.3.0-1551969192.89a2231f.jessie)...

File di configurazione "/etc/default/openproject"
==> Modificato (dall'utente o da uno script) dopo l'installazione.
==> Il distributore del pacchetto ha fornito una versione aggiornata.
  Come procedere? Le opzioni sono:
   Y o I   : installa la versione del responsabile del pacchetto
   N od O  : mantiene la versione attualmente installata
     D     : mostra le differenze tra le versioni
     Z     : avvia una shell per esaminare la situazione
L'azione predefinita consiste nel mantenere la versione attuale.
*** openproject (Y/I/N/O/D/Z) [predefinito=N] ? D <-- the first time I checked the differences

Here's the 'diff' output:
--- /etc/default/openproject    2018-11-05 01:22:06.278306156 +0100
+++ /etc/default/openproject.dpkg-new   2019-03-07 15:53:18.000000000 +0100
@@ -1,10 +1,10 @@
# Generated by pkgr
-export APP_HOME="/home/openproject"
+export APP_HOME="/opt/openproject"
export APP_NAME="openproject"
export APP_SAFE_NAME="openproject"
export APP_GROUP="openproject"
export APP_USER="openproject"
-export APP_WIZARDS="legacy-installer,mysql,apache2,repositories,smtp,memcached,openproject"
+export APP_WIZARDS="legacy-installer,postgres,apache2,repositories,smtp,memcached,openproject"
export APP_RUNNER_TYPE="systemd"
export APP_RUNNER_CLI="systemctl"
export PORT=${PORT:=6000}
(END)

No new parameters, and I was using MySQL, non Postgres, so I decided to keep my old conf file:
File di configurazione "/etc/default/openproject"
==> Modificato (dall'utente o da uno script) dopo l'installazione.
==> Il distributore del pacchetto ha fornito una versione aggiornata.
  Come procedere? Le opzioni sono:
   Y o I   : installa la versione del responsabile del pacchetto
   N od O  : mantiene la versione attualmente installata
     D     : mostra le differenze tra le versioni
     Z     : avvia una shell per esaminare la situazione
L'azione predefinita consiste nel mantenere la versione attuale.
*** openproject (Y/I/N/O/D/Z) [predefinito=N] ? N  <--- Here I decided to keep the old conf
==============
The openproject package provides an installer. Please run the following command to finish the installation:
sudo openproject configure
==============
Elaborazione dei trigger per libc-bin (2.19-18+deb8u10)...

Please note that the 'N' answer is the default one, so it's possible that other users will see the same error while upgrading, if they have MySQL instead of Postgres installed. I mean, I deliberatlely reverted the /etc/default/openproject, but that's also the default choice (N, to keep the old file), so it's possible other users will just press Enter when prompted, and they'll get the error when running 'openproject configure' as suggested at the end of apt-get upgrade.

Anyway, glad the little problem was solved quickly.

May I ask you another question? Is it possible to easily transfer the database from MySQL to Postgres on a running Openproject with a few user and projects? Is there a tool or should it be done manually? Would you suggest to go for it or just to keep the running thing on MySQL?

Thanks again for your help!

Kind Regards,
Stefano

RE: Error upgrading from 8.2.0 to 8.3.0 - Added by Oliver Günther about 6 years ago

Hi Stefano,

you're being asked this dialog by debian because you changed the $APP_HOME variable in there instead of setting it as openproject config:set APP_HOME="/home/openproject". I would suggest to revert the file to the upstream version and set the variable like this instead.

May I ask you another question? Is it possible to easily transfer the database from MySQL to Postgres on a running Openproject with a few user and projects? Is there a tool or should it be done manually? Would you suggest to go for it or just to keep the running thing on MySQL?

Yes, there's https://pgloader.io/ which we have been using on OpenProject databases in the past. In usual installations, it is nothing more than creating the database in postgres an running pgloader mysql://user:password@localhost/dbname postgres://pguser:pgpassword@localhost/newdbname  We will prepare a detailed guide on how to migrate in case we deprecate or reduce support for MySQL in the coming months. For now there is nothing you need to do.

Best,

Oliver

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