Kopia Server failure to initialize, unable to open pack index

I have had Kopia up and running for a few months now. A few days ago I was updating my server that hosts the file share and the Kopia server instance that runs inside of docker. Today I noticed that one of my clients was unable to connect to the server it was giving an error about an authentication error. I shutdown all of the servers and clients to start looking through the logs.

ERROR unable to initialize repository: unable to initialize repository: error opening repository: unable to open repository: unable to create shared content manager: error loading indexes: unable to open pack index “xn86_67989fdb2679b9c4b7523b760c534417–c1”: mmap error: invalid argument

Looking at the maintenance log it looks like there was a “full-rewrite-contents” that failed a few days ago. It is possible that that was the same time I was updating the server that hosts the docker.

Any ideas on how to get the repository back into a working state? For things like this, is it better to post here or on Slack?

I continued to poke at this and following some of the pointers in “Verifying Validity of Snapshots/Repositories and Trying to Repair Any Corruption | Kopia”. Turns out that I must have interrupted some action as there were some zero sized files. Specifically a file with that name in indexes. Moving that out of there appears to have put everything back to a working state.

1 Like

Hi, I had a similar issue:

ERROR failed to open repository: unable to create shared content manager: error loading indexes: unable to open pack index "xn4_0372c7846be01aad0779eed709516689-saf8dde164d1cb3d811b-c1": mmap error: invalid argument
ERROR open repository: unable to open repository: unable to create shared content manager: error loading indexes: unable to open pack index "xn4_0372c7846be01aad0779eed709516689-saf8dde164d1cb3d811b-c1": mmap error: invalid argument

I assume it happened while KopiaUI was doing a backup and my laptop froze because of some hardware failure a the same time. I moved the file with the name in the error to different location, run kopia repository status and got a new file name, that had same mmap error. I repeated steps a few times, until finaly my repostiory was responsive again.

1 Like

Thanks, that helped me out.