Upgrade failed (2.4.7-1 to 3.0.2)

I received this message when I ran $ php tools/upgrade.php upgrade:

ERROR: Upgrade failed: DB: Duplicate entry ‘4-4-9-1’ for key ‘review_round_files_pkey’

I’m not a database person, so I need a little help.

I had my IT folks clone the ojs server and the database to a test server. The config.inc.php was also edited to make sure everything pointed to the test instances. I did bring up the test instance and it worked.

So what do I need to do/say to our database admin?

Is there any reason to try an upgrade to 2.4.8 first?

Hi @Richard

Are you attempting to perform an upgrade on a database that was already partially upgraded? If so, you’ll need to restore from backup to the time before the upgrade was first attempted.

Regards,
Israel Cefrin
Public Knowledge Project Team

No. Our db admin copied/cloned the production db to the db for the test server.
(We have not attempted an upgrade of the production server db yet)

Could there be a problem with how the copy/cloning was done? There was an existing test db. My assumption is that it was destroyed/erased when the copy was made.

Richard

If there was a existing DB perhaps it could store a previous upgrade attempt?

Please, restore the original backup in a empty DB and try it again.
This error message is about existing fields/data.

Regards,
Israel Cefrin
Public Knowledge Project Team

When i upgrade ojs 3.0 that error display

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@atharvapub.net to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
<<<<<<<<
Please help me

Hi @PATEL_SANJAY

Please, avoid repost same question in different threads, it clutters the forum. Your original thread was already answered.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hello,

I had our db admin recopy the mysql database from the prodcution server over to the test server and ran the upgrade again. I’m seeing a lot of the messages below (warnings) during the upgrade (even though the script declares that the upgrade was successful.)

our files directory is owned by apache and the group is also apache, but on the production server this seems to be okay (it works).

PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-3-ED.docx,/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-3-7-20160331.docx): No such file or directory in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-3-ED.docx” to “/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-3-7-20160331.docx”.
PHP Warning: mkdir(): Permission denied in /webapps/ojs-3.0.2/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory “/webapps/ojs_files/journals/9//articles/31//submission/fairCopy”
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-2-ED.docx,/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-2-7-20160203.docx): No such file or directory in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-2-ED.docx” to “/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-2-7-20160203.docx”.
PHP Warning: mkdir(): Permission denied in /webapps/ojs-3.0.2/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory “/webapps/ojs_files/journals/9//articles/31//submission/fairCopy”
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-1-ED.docx,/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-1-7-20160203.docx): No such file or directory in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//submission/editor/31-266-1-ED.docx” to “/webapps/ojs_files/journals/9//articles/31//submission/fairCopy/31-1-266-1-7-20160203.docx”.
PHP Warning: mkdir(): Permission denied in /webapps/ojs-3.0.2/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory “/webapps/ojs_files/journals/9//articles/31//submission/proof”
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//public/31-370-1-PB.pdf,/webapps/ojs_files/journals/9//articles/31//submission/proof/31-1-370-1-10-20160514.pdf): No such file or directory in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//public/31-370-1-PB.pdf” to “/webapps/ojs_files/journals/9//articles/31//submission/proof/31-1-370-1-10-20160514.pdf”.
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//attachment/31-242-1-AT.docx,/webapps/ojs_files/journals/9//articles/31//attachment/31-1-242-1-13-20160104.docx): Permission denied in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//attachment/31-242-1-AT.docx” to “/webapps/ojs_files/journals/9//articles/31//attachment/31-1-242-1-13-20160104.docx”.
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//attachment/31-356-1-AT.pdf,/webapps/ojs_files/journals/9//articles/31//attachment/31-1-356-1-13-20160509.pdf): Permission denied in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//attachment/31-356-1-AT.pdf” to “/webapps/ojs_files/journals/9//articles/31//attachment/31-1-356-1-13-20160509.pdf”.
PHP Warning: mkdir(): Permission denied in /webapps/ojs-3.0.2/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory “/webapps/ojs_files/journals/9//articles/31//submission/query”
PHP Warning: rename(/webapps/ojs_files/journals/9//articles/31//submission/copyedit/31-329-2-CE.docx,/webapps/ojs_files/journals/9//articles/31//submission/query/31-1-329-2-18-20160410.docx): No such file or directory in /webapps/ojs-3.0.2/classes/install/Upgrade.inc.php on line 908
Unable to move “/webapps/ojs_files/journals/9//articles/31//submission/copyedit/31-329-2-CE.docx” to “/webapps/ojs_files/journals/9//articles/31//submission/query/31-1-329-2-18-20160410.docx”.
PHP Warning: mkdir(): Permission denied in /webapps/ojs-3.0.2/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory “/webapps/ojs_files/journals/9//articles/31//submission/query”

Hi @Richard

Your issue is exactly the same in other threads in forum. It looks like you have a permission issue in your filesystem. Link bellow describs, with a solution, how to deal with:

Regards,
Israel Cefrin
Public Knowledge Project Team