3.5.13 to 5.0.3 Upgrade fails on "Duplicate key name like_cid_idx"

Hello there,

I was doing an upgrade on confluence. But I stuck on a specific part.

First I show you which steps I am doing:

We have a new and an old server. On the old server runs that instance that needs to be upgraded. On the new server I am testing the upgrade

- setup a clean 3.4.8 linux standalone on the testserver
- migrate the confluence-data folder from the old server to the testserver
- full db dump of the old server (mysql)
- migrate the db to the new server
- edit settings on the new server (DB settings and confluence data)
- start 3.4.8.
- wait, see if it's ok
- shut it down

- setup a clean 3.5.13 linux standalone on the testserver
- edit the settings to work with the db and confluence-home
- start 3.5.13
- wait, see if it's ok
- shut it down

- start the 5.0.3 bin for linux
- use default settings
- install with sudo
- wait for start
- error occurs in the log

ERROR [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgr
ade.upgradetask.LikesSqlConstraintsUpgradeTask@32c6dd3d failed during the UPGRADE phase due to: StatementCallback; bad SQL grammar [create index like_cid_idx on LIKES (CONTENTID)]; nested exception is com.mysql.
jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'like_cid_idx'

1 answer

1 accepted

You should first migrate to 4.3 and after that to 5.x

I guess not, because the documentation told me to move to 3.5. then 5.0.3
See here: Upgrading Confluence

I'm not sure, where I have read it, but you have to go to 5.2 and then I think even on 5.3 to come to 5.4.

And every question here asking for your topic says, from 3.5 to 4.3 and then to 5. Take a look an this discussion: https://answers.atlassian.com/questions/234876/recommended-upgrade-path-confluence-3-4-5-3

But discussions seem to differ from the documentation. I guess a confluence supporter needs to join this conversation.

Edit: I also need to mention that I temporarly solved that problem with deleting the "LIKES" table in the db. But still I am not sure why this problem occurs. I've redone that process several times and it always occurs.

Try it with 4.3, that worked for me. And I have done this several times too ;)

I am doing what you suggest - but even here this error occurs. And again it can be resolved manually by deleting the table LIKES.

I am doing the same as mentioned on top, just 4.3.7 added in between.

So its now this way:

3.4.8 -> 3.5.13 -> 4.3.7 -> 5.0.3 -> 5.4.2

I have to drop the table LIKES at version 4.3.7

there should be no talbe called likes when migrating fom 3.5 to 4.3 because the like feature is one of confluence 4.

Can you please verify that the table is not present in 3.4 and 3.5?

I have accepted and upvoted your answer. Thank you for helping out on this bug/problem.

I can confirm that this table does not exist on 3.4.8
I did not check the 3.5.13. But I will do it and edit this post.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,353 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you