Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't access existing project: No such key

James Dyke January 10, 2019

Upgraded from 4.x to 5.x. 

My mistake was probably following that guide. Good lord is it lacking. 

I am unable to open a few projects as BitBucket complains there is no such key (despite being able to display the correct key on the landing page).

I can create projects with the same key, which seems stupid to me.

I can't open the projects to delete them so I can't just recreate them (not that I am willing to accept that answer, but it was worth a try for the smaller projects).

How do I go about resolving this?

 

----

EDIT: select * from projects shows the projects... So what the hell then?

 

2 answers

1 accepted

0 votes
Answer accepted
James Dyke January 13, 2019

Resolved by trawling the postgresdb and recreating the projects via the rest api and pushing the existing repo from ${bitbucket.home}/shared/data/repositories up to the new instance.

Ridiculous workaround but it works. Happy to post the code (in golang) should anyone need, just reply to this comment

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2019

Hello James and welcome to the Community!

After you upgraded Bitbucket, did you go through the plugins to ensure they’re also updated to the latest versions? You may find out how to update said plugins at How to update your add-on.

The issue you’re reporting seems to be very similar to the following KB: Projects disappear on upgrade due to an incompatibility with the Bitbucket Server Project Categories plugin.

Please let us know if updating the plugins helped to resolve the issue.

Regards,
Stephen Sifers

James Dyke January 13, 2019

Hi Stephen.

Thanks for the reply. 

There are 0 plugins for the bitbucket repo. 

I disagree that it's related to the linked issue. The projects are visible to the instance, however the instance throws a 404 complaining there is no key. Postgres disagrees. Also, this only happened for certain projects and some would come and go.

I solved the issue by hacking my way through the API and postgres db.

My resolution was to create a whole new instance of bitbucket on the new version, download the bare git repo from /shared/data/repositories to my local machine, pull the metadata from the postgres db, create the project and repo via the REST apis and upload the git project. 

Can you help me understand what went wrong? I followed the upgrade guide to a tee. I went from 4.14.6 to 5.15.1. It looks like a consistency issue to me, with the DAL being unable to properly traverse the database. 

Sadly I did not think to keep the logs. This was quite the serious issue as I'm sure you can understand so I just ploughed on to a resolution. 

Regards,
James

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events