Replication Error while accesing documnets ERROR Raven.Client.Connection.ReplicationInformer Could not persist the replication information

156 views
Skip to first unread message

Ninad Goswami

unread,
May 5, 2017, 5:44:15 AM5/5/17
to RavenDB - 2nd generation document database
Hello,
As described in last thread (https://groups.google.com/forum/#!topic/ravendb/WGXqvjUlFXE)  creating new post for this issue, we are currently facing issue with ravendb while updating documents randomly and get following error in logs,

2017-03-27    14:29:52    1    DEBUG    Raven.Client.Document.InMemoryDocumentSessionOperations    Saving 1 changes to http://10.0.0.0:portno;dbname
    PUT documentData/118790
ERROR    Raven.Client.Connection.ReplicationInformer    Could not understand the persisted replication information  
System.IO.IOException: The process cannot access the file 'RavenDB Replication Information For - 16-F4-C6-76-2A-BB-8D-80-C6-62-04-1E-AC-27-EE-CF' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath)
   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, IsolatedStorageFile isf)
   at Raven.Client.Connection.ReplicationInformer.TryLoadReplicationInformationFromLocalCache(String serverHash)

we are using version
Build Version - 960
client Version - 2.0

code we are using to create instance is

var session = ObjectFactory.GetInstance<Cch.Data.RavenDocumentStore>();
if (session != null)
{
session.Store((uint)id, data);
session.SaveChanges();
return true;
}

Replication setup- we have master-master as well as slave server for each master.

background - this is tool which keep updating documents for multiple clietDB.

Please let me know if you need any other details, i really appreciate your help on this as this is critical to our business

Thanks,
Ninad

Idan Shalom

unread,
May 5, 2017, 5:57:50 AM5/5/17
to rav...@googlegroups.com
Hi Ninad,
Like Oren replied on the last thread
Do you have multiple document store startups at the same time? 
that can cause file lockups?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ninad Goswami

unread,
May 5, 2017, 6:10:29 AM5/5/17
to RavenDB - 2nd generation document database
i don't think so we have multiple document store, will ask developers to confirm however this used to work very well earlier and we have not changed any code with respect to ravendb only change happened is developers upgraded there client from 1.0 to 2.0.

 Is there any way we can confirm if multiple document stores are used at same time?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
May 5, 2017, 6:39:11 AM5/5/17
to ravendb
Try deleting the existing replication cache (in the isolated storage).

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Idan Shalom

unread,
May 5, 2017, 6:51:52 AM5/5/17
to rav...@googlegroups.com
You will have to follow the behavior of your code.
please update us after confirm with your developers 

sincerely yours 
Idan 

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Ninad Goswami

unread,
May 5, 2017, 7:55:06 AM5/5/17
to rav...@googlegroups.com
Is there any steps or documentation which has details to delete the replication cache?

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/1HkVSAnW1Ig/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,

Ninad Goswami
sype: ninad.goswami1

Naresh Kumar

unread,
May 5, 2017, 8:31:33 AM5/5/17
to RavenDB - 2nd generation document database
Hi,

Adding some more information as requested,

We are not using Multiple document store. using Document Store inherited by IDocumentStore

ie. DocumentStore : IDocumentStore

Regards,
Naresh Kumar

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/1HkVSAnW1Ig/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,

Ninad Goswami
sype: ninad.goswami1

Idan Shalom

unread,
May 5, 2017, 11:06:41 AM5/5/17
to rav...@googlegroups.com
In general, that shouldn't be happening, but it isn't fatal.
The reason this happens is usually if you have multiple clients trying at the same time to read/update the local replication cache.
This only happen if you have multiple document stores for the same server & db.

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Ninad Goswami

unread,
May 11, 2017, 4:04:56 AM5/11/17
to rav...@googlegroups.com
Hello,

As Oren suggested earlier to delete replication cache could you please tell us how to delete this as i have gone though all the resources available but did not find any help?

is there any specific file to be deleted? We are stuck with this issue for long time and need to close this.

Your help is really appreciated.

Thanks for your time. 

To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,

Ninad Goswami

Idan Shalom

unread,
May 11, 2017, 4:10:49 AM5/11/17
to rav...@googlegroups.com
Can you please tell me your operation system?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


Ninad Goswami

unread,
May 11, 2017, 4:14:27 AM5/11/17
to rav...@googlegroups.com
Windows server 2008 R2 Standard Service Pack1

Idan Shalom

unread,
May 11, 2017, 4:26:04 AM5/11/17
to rav...@googlegroups.com
You can find the topology in the Isolated storage
In windows 10 the location is the same as windows 8.
delete only the file of the topology that you want to delete. Don't forget to close everything that can use this file.



Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


Ninad Goswami

unread,
May 11, 2017, 4:40:05 AM5/11/17
to rav...@googlegroups.com
Thanks Idan for your input , is there any particular file that ravendb exclusively uses this need to be done on ravendb master server where our application communicates right?

hope this will solve the issue. Thanks very much.

Idan Shalom

unread,
May 11, 2017, 5:38:14 AM5/11/17
to rav...@googlegroups.com
The file that you need will start in  'RavenDB Replication Information For - 
And yes

Happy to help
Idan

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Idan Haim Shalom l Core Team Developer

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811 l Skype: shalomidanhaim

RavenDB paving the way to "Data Made Simplehttp://ravendb.net


Ninad Goswami

unread,
May 12, 2017, 3:41:32 AM5/12/17
to rav...@googlegroups.com
Hi Idan,

We looked into isolated storage and there exist multiple files starting with "RavenDB Replication Information For" under multiple folder starting with "Url...",  which are not been updated from last month.

Do we need to delete this all files? should i take backup of folder isolated storage? please refer screenshots.

Thanks for your time.


IMG_12052017_123800_0.png

Oren Eini (Ayende Rahien)

unread,
May 12, 2017, 3:57:39 AM5/12/17
to ravendb
Yes, delete them all, no need for backup

Ninad Goswami

unread,
May 24, 2017, 9:33:35 AM5/24/17
to RavenDB - 2nd generation document database
Hello Oren and Idan,

We deleted files which were in logs and restarted IIS but i could see it created same file again and giving same error, strange thing we noticed is it's only giving error to this particular file only "RavenDB Replication Information For - 16-F4-C6-76-2A-BB-8D-80-C6-62-04-1E-AC-27-EE-CF" why it is giving error only on this file.

This happens randomly to any database it works with other DB correctly.

We have some tools which runs in background on same server but we have same configuration and tools on our other environment (v2.0) and we never saw error there,but we do see here in V(1.0).


The process cannot access the file 'RavenDB Replication Information For - 16-F4-C6-76-2A-BB-8D-80-C6-62-04-1E-AC-27-EE-CF' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)




Grisha Kotler

unread,
May 24, 2017, 10:29:57 AM5/24/17
to rav...@googlegroups.com
How many databases are in v1.0?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Ninad Goswami

unread,
May 24, 2017, 10:36:40 AM5/24/17
to rav...@googlegroups.com
There are close to 966 databases in V1.0 but this error comes intermittently on random databases and particularly on put request.

To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,

Ninad Goswami

Grisha Kotler

unread,
May 24, 2017, 11:07:37 AM5/24/17
to rav...@googlegroups.com
Are you using the same document store to access different databases?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


Ninad Goswami

unread,
May 24, 2017, 11:53:18 AM5/24/17
to rav...@googlegroups.com
I believe we have singleton document store so yes,we use same document store for different DBs.

cfg.For<Raven.Client.IDocumentStore>().Singleton().Use(ctx =>

{

    var settings = ctx.GetInstance<abc.Core.Interfaces.ISettings>();

    var configuration = ctx.GetInstance<IConfigurationManager>();

    Raven.Client.IDocumentStore documentStore = null;

 

  settings has credentials and server URL

public GlobalDocumentSession(ISettings settings, IDocumentStore store)

        {

            this.log.Debug("Create");

 

            this.settings = settings;

            this.store = store;

            this.Reset();

        }



            string documentDatabase = this.settings.GetSetting("document_database");

            this.store.DatabaseCommands.EnsureDatabaseExists(documentDatabase);

            this.realSession = this.store.OpenSession(documentDatabase);


then we perform operations with session

 

Ninad Goswami

unread,
May 25, 2017, 6:42:04 AM5/25/17
to rav...@googlegroups.com
Is there any update? this is really frustrating error and critical to us.

I appreciate your help on this so far. 

Grisha Kotler

unread,
May 25, 2017, 7:07:48 AM5/25/17
to rav...@googlegroups.com
RavenDB v1.0 isn't supported anymore.
If you do have a support contract, please contact our support email.

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


Reply all
Reply to author
Forward
0 new messages