Trying to upgrade a CA 2017 version

edited January 12 in General Support

Hi everybody.

Santa brought me a huge present: 2017 version Collective Access. It's components are very deprecated (mySQL 5.6, Providence 1.7, ElasticSearch 2.4 and Pawtucket I don't even want to know). So, I decided to take all data from the database and mount my own updated version.

I installed the very least version of ElasticSearch 5.x, Providence 1.7.13, mySQL 8.0.27 in an ubuntu 20.04 VM.

First problem, mySQL 5.6 dumped database wasn't compatible with mySQL 8.0.

So I made the same installation but mySQL 5.6. It worked. The dump was successful.

I upgraded mySQL to 5.7 and later to 8.0.27. Everything correct.

At this moment I have ubuntu 20.04 (Providence 1.7.13, mySQL 8.0 but outdated database). Okay, I have to upgrade the database.

When I try to upgrade the database, I am getting an error with migration #157. What does the log say? ERROR --> DatabaseException: Duplicate key name 'i_prefetch'

I look for i_prefetch in the db.sql dump and there are (i_prefetch, i_prefetch2, i_prefetch3).

OK, let's try again. Oh, i_prefetch disappeared but there is a new one:

ERROR --> DatabaseException: Duplicate key name 'i_log_plus' but this key isn't even in the db.sql

So I am stucked now and I don't know what to do. Any suggestion? Kill myself? It would work

Comments

  • It sounds like it was partially updated at some point, but the update process died in the middle for some reason. What I would do is reload the database from the dump file, then drop the i_prefetch index and re-run it. If it dies again contact me at support@collectiveaccess.org and I'll help you with the update.


    Seth

  • Thank you for your reply!

    Yeah, I started the process of upgrade and after 5 minutes, it threw the first error i've mentioned.

    Okay, I'll try later and I'll tell you how does it go.

  • If you have a large data set some of those indices in #157 may take a few minutes to create. Performance depends upon how MySQL is set up and the hardware you're using, as index creation is very I/O heavy. Let me know if the result is success or failure.

    Seth

  • Hi seth,

    I deleted the lines i_prefetch, i_prefetch2 and i_prefetch3 and it worked! The database is up to date!

    I'm going to try updating ElasticSearch to 5.x. I'll post how it goes!

    Thank you!

  • edited January 27

    I've been doing some tests and I've seen that when I want to edit an object, there is some kind of error.

    Maybe an old interface or metadata isn't compatible with the new version?

    705 x 136 - 17K
  • Something is crashing, but it looks like error display is turned off. Either check your logs (syslog or web server log) for the error, or set "display_errors" = "On" in your php.ini server configuration. If you can't or don't want to edit php.ini, you can also add this line in setup.php to enable on-screen errors:

    ini_set("display_errors", "On");

  • Hi seth,

    I've been doing some tests with the metadata elements and the issue happens with a list type metadata element that has "Horizontal hierarchy browser with search" in the option "render list as". But if I change to "Horizontal hierarchy browser", it works perfectly.

    487 x 440 - 36K
  • Can you try enabling error messages so we can see what the underlying issue is?

  • edited January 27

    I've put the code you said above in the setup.php and it doesn't show any error. It shows the same: Save Cancel and Delete buttons. There aren't any log either.

  • Can you try editing php.ini?

  • edited 8:03AM

    Even if I write display_errors = On in the php.ini file and reboot the machine, the value is still Off. So I tried something different.

    I wrote:

    ini_set('display_startup_errors', 1);

    error_reporting(E_ALL);

    those two lines in the setup.php file and shows an error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/providence/app/lib/BaseModel.php on line 7148

Sign In or Register to comment.