Open link in a new tab

Content

Expand project menu

Migrating from 4.0.5 to 5.0.9

Hi all,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

This is what I did:

  • On 4.0.5 wheezy

    mysqldump --single-transaction --add-drop-table --add-locks --host=localhost --user=openproject --result-file=backup.sql openproject

  • On 5.0.9 jessie:

    mysql -uroot -p
    mysql> CREATE DATABASE openproject CHARACTER SET utf8;
    mysql> CREATE USER 'openproject'@'localhost' IDENTIFIED BY 'supersecretpasswd';
    mysql> GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'@'localhost';
    mysql> \q

    mysql -h localhost -p openproject < backup.sql

    apt-get install openproject
    openproject configure # reusing existing database

    scp <old4.0.5>:/var/db/openproject/files/* /var/db/openproject/files/
    chown openproject.openproject /var/db/openproject/files/*

    service openproject restart
    service apache restart

Images are not displayed within wiki pages.
I decided to redo the well known rake tasks:

openproject run rake db:migrate --trace
openproject run rake db:seed --trace
openproject run rake assets:precompile --trace

There are no obvious errors, at least I can’t see them!
Please find the respective logs attached.

Here is a short excerpt from the main log files:

  • 4.0.5

    Started GET "/openproject/attachments/386/download" for XXX.XX.XX.XX at 2016-01-19 15:04:14 +0100
    Processing by AttachmentsController#download as HTML
    Parameters: {"id"=>"386"}
    Sent file /var/db/openproject/files/150923142638_gis_overview_small.png (0.1ms)
    Completed 200 OK in 32.1ms (ActiveRecord: 2.2ms)

  • 5.0.9

    I, [2016-01-19T15:02:02.616658 #14300] INFO -- : Started GET "/openproject/attachments/386" for XXX.XX.XX.XX at 2016-01-19 15:02:02 +0100
    I, [2016-01-19T15:02:02.618179 #14300] INFO -- : Processing by AttachmentsController#download as HTML
    I, [2016-01-19T15:02:02.618248 #14300] INFO -- : Parameters: {"id"=>"386"}
    I, [2016-01-19T15:02:02.644354 #14300] INFO -- : Completed 500 Internal Server Error in 26ms (ActiveRecord: 1.1ms)
    F, [2016-01-19T15:02:02.646077 #14300] FATAL -- :
    TypeError (no implicit conversion of nil into String):
    app/uploaders/file_uploader.rb:47:in readable?' app/uploaders/file_uploader.rb:47:in readable?'
    app/models/attachment.rb:118:in readable?' app/controllers/attachments_controller.rb:68:in file_readable'
    app/middleware/params_parser_with_exclusion.rb:40:in `call'

Thanks for support!
All the best,

Frank

Message actions

Hello again,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

solved this issue, and thought it might be a good idea to let you know!

The trick is to have the images/attachments in place (i.e. /var/db/openproject/files) before running openproject configure.

Best,

Frank

Message actions

Hello once again,

despite the risk of a monologue,
here is another issue I am curious about …

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),

The howtos provide upgrade and migration instructions from 4.0 to 4.1, 4.1 to 4.2 and 4.2 to 5.0.
Does that mean I have to follow this sequence?
Is the one step upgrade process possibly causing some (not yet recognized) problems?

Frank

Message actions

F Z wrote:

Hello again,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

solved this issue, and thought it might be a good idea to let you know!

The trick is to have the images/attachments in place (i.e. /var/db/openproject/files) before running openproject configure.

Best,

Frank

I have the problem too.

Installed Version 6.0.5.

Copied files in /var/db/openproject/files and changed the rights.

After reading this post do a

openproject reconfigure

but still the same problem.

Any ideas?

Message actions

Solution:

Upgrade to Version 5 and copied before the attachments.

Again upgrade to Version 6 successful.

Message actions

Hey Christian,

great to hear the upgrade eventually worked. Do you have suggestions for improvements on the upgrade guide regarding your issue?

Best,
Oliver