Credentials not working on copy of db.

Hi all.

I just had something annoying happen.

I copied all files in the db directory. Try to connect to the copy, and the credentials don’t work anymore.
The original db didn’t change password. To be sure I changed the password from the UI in the original db, restarted my services that connects to it, no proble. Logging in through UI no problem.
But the copy of the db do not accept the credentials.

I’ve done this many times. Only difference this time is that I did a scavenge before, and I had some faulting projection. Couldn’t disable projections, so I paused them.

What can I do?

ooh… relief…

I tried stopping projections again, they were already at -1, so I guess they eventually stopped from last try.
I did a scavenge again.

Then I could log in to copy.

The credentials are stored in the db itself

I’m not sure what you are trying to say, I copied the whole db. So I don’t know how this could happen.

It happens every now and ten, like every third time I copy a db and then try to connect to it.
This is the error log:

[PID:09300:016 2016.03.12 09:20:21.350 FATAL StorageChaser ] Error in StorageChaser. Terminating…
EventStore.Core.TransactionLog.Chunks.TFChunk.InvalidReadException: Log record at actual pos 46284202 has non-positive length: 0. in chunk.
at EventStore.Core.TransactionLog.Chunks.TFChunk.TFChunk.TFChunkReadSide.TryReadForwardInternal(ReaderWorkItem workItem, Int64 actualPosition, Int32& length, LogRecord& record) in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\TransactionLog\Chunks\TFChunk\TFChunkReadSide.cs:line 465
at EventStore.Core.TransactionLog.Chunks.TFChunk.TFChunk.TFChunkReadSideUnscavenged.TryReadClosestForward(Int64 logicalPosition) in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\TransactionLog\Chunks\TFChunk\TFChunkReadSide.cs:line 82
at EventStore.Core.TransactionLog.Chunks.TFChunkReader.TryReadNextInternal(Int32 retries) in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\TransactionLog\Chunks\TFChunkReader.cs:line 57
at EventStore.Core.TransactionLog.Chunks.TFChunkChaser.TryReadNext() in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\TransactionLog\Chunks\TFChunkChaser.cs:line 39
at EventStore.Core.Services.Storage.StorageChaser.ChaserIteration() in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\Services\Storage\StorageChaser.cs:line 135
at EventStore.Core.Services.Storage.StorageChaser.ChaseTransactionLog() in c:\buildAgent\work\47590a33512c319d\src\EventStore.Core\Services\Storage\StorageChaser.cs:line 107
[PID:09300:016 2016.03.12 09:20:21.694 ERROR Application ] Exiting with exit code: 1.
Exit reason: Error in StorageChaser. Terminating…
Error: Log record at actual pos 46284202 has non-positive length: 0. in chunk.
[PID:09692:015 2016.03.12 09:20:25.930 FATAL StorageChaser ] Error in StorageChaser. Terminating…

So, if doing a very ordinary ctrl + c and then a ctrl + v only succeeds some times, what is preferred way to copy the files?
This happens on several machines. EventStore-OSS-Win-v3.3.0

… and, can I repair this, or is that copy of the db wasted now?

Are you copying it while its running? What is your procedure for copying it?

yes, sometimes while it’s running. I guess that’s the problem then? It takes some files first, and then the others are inconsistent if they got more data written to them in the meanwhile.

Just ctrl + c and then ctrl + v into another folder.

should be obvious really… Sorry :slight_smile:

There is a procedure for copying files while the db is running
http://docs.geteventstore.com/server/3.5.0/database-backup/

Oh, right… That’s what that procedure i for. I’ve seen it, never tried it though. It didn’t occur to me that it was for runnings dbs.
Thanks Greg.