OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



database error

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

database error

Postby aambesha » Sun Dec 29, 2013 2:34 pm

I am upgrading but the following error is being displaying. Please guide me what to do;

A database error has occurred: Duplicate entry '1-old_log_id' for key 'event_log_settings_pkey'
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Sun Dec 29, 2013 5:06 pm

Hi aambesha,

Is this your second attempt at running the upgrade? If so, make sure you restore your database to its state from before you first attempted the upgrade before trying again.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Sun Dec 29, 2013 10:13 pm

I have restored from the backup and tried to update again but the same error is being displayed. Please suggest.
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Mon Dec 30, 2013 5:50 am

Hi aambesha,

What do you get for the following query on your old (pre-upgrade) database?
Code: Select all
SELECT COUNT(*) FROM event_log_settings WHERE setting_name='old_log_id';
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Mon Dec 30, 2013 8:25 am

I am upgrading by using the install page and when i click on the upgrade, it displays the above mentioned error. I haven't created the backup more than once and on restoring the same error is being displayed.
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Mon Dec 30, 2013 8:28 am

Hi aambesha,

What do you get for the query quoted above?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Fri Jan 03, 2014 6:50 am

Hi

Thank you for helping me however, how to check the above query? i dont knowhow to check this?
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Fri Jan 03, 2014 7:01 am

Hi aambesha,

You'll need to use a MySQL client, typically something like phpMyAdmin (often available through CPanel) or, if you have SSH access to your server, the command-line client. This will depend on your host; ask your server administrator or look through your host's knowledge base to find out what kind of access you have.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Fri Jan 03, 2014 8:08 am

ojs.jpg
ojs.jpg (31.22 KiB) Viewed 350 times


The above result were displayed for the query mentioned above.
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Fri Jan 03, 2014 8:29 am

Hi aambesha,

That indicates that the database you're using has already run through a partial (failed) upgrade. Once this happens, your database is stuck somewhere between the two versions and the way to resolve the problem is 1) to address the error message that came from the upgrade process, then 2) restore from backup to a version of your database before the upgrade was attempted in order to try again. Do you have such a backup?

Alternately, it's possible you're not restoring from backup correctly; when you've correctly restored from backup to a version that was not run through a failed upgrade, the above query should result in zero rows.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Fri Jan 03, 2014 8:35 am

I am sorry that i dont have such backup however the following message was displayed when i was upgrading from the previous version;

Duplicate entry '1-old_log_id' for key 'event_log_settings_pkey'
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Fri Jan 03, 2014 8:48 am

Hi aambesha,

You can move past this error message by executing the following in your MySQL client, after restoring your backup but before executing the upgrade:
Code: Select all
DELETE FROM event_log_settings WHERE setting_name='old_log_id';
However, you'll probably experience other errors.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Fri Jan 03, 2014 9:54 am

I am so thankful for helping me. The upgrade was successful however, the system upgraded to the version OJS 2.4.2.0 from 2.3.1

What should i do to upgrade to OJS 2.4.3.0 that is the latest version of OJS.
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Re: database error

Postby asmecher » Fri Jan 03, 2014 10:07 am

Hi aambesha,

As always, follow the instructions in docs/UPGRADE; the process will be similar to whatever you did to upgrade from 2.3.1 to 2.4.2. I would suggest sticking with OJS 2.4.2 for a little while to ensure you've worked out any kinks from the upgrade before embarking on the next upgrade. OJS 2.4.2 is quite stable so there's no need to rush it.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: database error

Postby aambesha » Sat Jan 04, 2014 12:51 am

Thank you

Regards

Amjad Shahzad
aambesha
 
Posts: 27
Joined: Wed May 08, 2013 9:19 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests