HTTP 500 error when deleting a repository.

We're running Stash 2.12.0 and while deleting a (particular) repository as admin, I got a HTTP 500 error:

/git/stash-home/data/repositories/230/null/jvermeij_test/KEEX_TEST/clone/KEEX/makefile does not exist

Please see your system administrator.

I can use the repository, even clone it, but I can't delete it. Is there somebody that has seen this before and has an idea how delete the repository anyway?

Best regards,

Jos Vermeijlen.

2 answers

1 accepted

0 votes
Answer accepted

Probably our own custom Stash plugin made a screwup.

Deleting the repository directory from the filesystem and then deleting the repository via the GUI did the trick.

0 votes

Is there an error in your log files (STASH_HOME/log/atlassian-stash.log) that provides a bit more detail about the error?

Quite a lot, actually (more than the 2000 characters I'm allowed to use in a comment block :-( ).

I got a lot of DEBUG info about cache misses for i18n and a couple of lines about the real error:


I hope it helps identifying the problem.

I'm not sure how things got into that state, the path that is listed there should definitely not exist in a repository directory. The error occurs because a file listing in the repository directory lists files that don't actually exist.

If you do a 'ls' in the git/stash-home/data/repositories/230/ directory, does that include a null directory? Does the /git/stash-home/data/repositories/230/null/jvermeij_test/KEEX_TEST/clone/KEEX/makefile file exist?

I wonder whether there's a disk issue here or a mangled filesystem? Regardless you should be able to manually delete the 230 directory and subsequently delete the repository in the UI.

Yes, there is a 'null' directory and the file exists:

stash:/git/stash-home/data/repositories/230/null/jvermeij_test/KEEX_TEST/clone/KEEX % ls
com  makefile  xvp

So should I try to

rm -rf /git/stash-home/data/repositories/230

and delete the repo administration via the GUI?

Or do you have another suggestion to delete the repository with Stash commands / GUI?

To be safe you could move the 230 directory out of the way instead of deleting it, but otherwise that's correct.

The fact that the null directory exists is strange. Do you have a custom plugin that could have created those files? Usually, the directory contents for a repository under data/repositories should be something like this:

total 120
drwxr-xr-x   4 michael  staff    136 Apr  4 14:08 refs
-rw-r--r--   1 michael  staff  42326 Apr  4 14:08 packed-refs
drwxr-xr-x   4 michael  staff    136 Apr  4 14:08 objects
drwxr-xr-x   3 michael  staff    102 Apr  4 14:08 info
drwxr-xr-x  15 michael  staff    510 Apr  4 14:08 hooks
-rw-r--r--   1 michael  staff     73 Apr  4 14:08 description
-rw-r--r--   1 michael  staff    321 Apr  4 14:08 config
drwxr-xr-x   2 michael  staff     68 Apr  4 14:08 branches
-rw-r--r--   1 michael  staff     23 Apr  4 14:08 HEAD
-rw-r--r--   1 michael  staff    117 Apr  4 14:09 FETCH_HEAD

When I look into other repositories, they look exactly how you described them.

We have a custom plugin, for the moment I assume that is the one that made a screwup.

Thanks for the help.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

274 views 0 12
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