master-master replicaton: Stream was not readable.

161 views
Skip to first unread message

Viktor

unread,
Mar 16, 2017, 7:21:56 AM3/16/17
to RavenDB - 2nd generation document database
Hi,
we have set up master-master  replication  (over ssl) and it has been running fine for ~3-4 weeks without any problems,
but since yesterday replication is only working one way.

ERROR:
2017-03-15 19:08:57.4341,Raven.Bundles.Replication.Tasks.ReplicationTask,Error,,46,Could not replicate to https://xxxxxxxx, "System.ArgumentException: Stream was not readable.
   at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
   at System.IO.StreamReader..ctor(Stream stream)
   at Raven.Bundles.Replication.Tasks.ReplicationTask.TryReplicationDocuments(ReplicationStrategy destination, RavenJArray jsonDocuments, String& lastError)
   at Raven.Bundles.Replication.Tasks.ReplicationTask.ReplicateDocuments(ReplicationStrategy destination, SourceReplicationInformationWithBatchInformation destinationsReplicationInformationForSource, ReplicationStatisticsRecorderScope recorder, Int32& replicatedDocuments, Etag& lastReplicatedEtag)
   at Raven.Bundles.Replication.Tasks.ReplicationTask.ReplicateTo(ReplicationStrategy destination, Etag& lastDocumentEtag, Etag& lastAttachmentEtag)
   at Raven.Bundles.Replication.Tasks.ReplicationTask.<>c__DisplayClass61_2.<ExecuteReplicationOnce>b__4(Object state)"
   
i am pretty sure it has something todo with our dns-provider (www.strato.de) since they have reported yesterday some security changes due to the latest DDoS attacks 
but maybe it is somehow possible to get more descriptive error message from raven?
"Stream was not readable" is not really helpful

Any suggestions will be much appreciated. 
Thanks!
Viktor

Michael Yarichuk

unread,
Mar 16, 2017, 7:34:43 AM3/16/17
to RavenDB - 2nd generation document database
Any exceptions/errors before or after this exception? Also, any exceptions on the other end of the replication?
Does it allow any traffic, not just replication, in the direction it is not working?

If I'm not mistaken, this exception can happen when you try to initialize StreamReader on a stream which is marked as not readable. And NetworkStream is marked as not readable after disposal.

--
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.



--
Best regards,

 

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

Michael Yarichuk l RavenDB Core Team 

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

 

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

Viktor

unread,
Mar 16, 2017, 8:20:42 AM3/16/17
to RavenDB - 2nd generation document database

Any exceptions/errors before or after this exception?

>no 


Also, any exceptions on the other end of the replication?


>yes. but just once and with the level "Warm": 
Could not notify https://nosql/databases/xxx about sibling server being up & running

and i think it happens after we have restarted the service


Does it allow any traffic, not just replication, in the direction it is not working?


>yes, i can ping and i can even open the ravendb studio (over https)


viktor
ps
i have forgotten to say => Raven-Version: 35191 (running as a windows service)

Oren Eini (Ayende Rahien)

unread,
Mar 16, 2017, 8:22:43 AM3/16/17
to ravendb
It is possible that the SSL connection is failing because of this.
Try making a call directly via .NET from that machine, see if this works?

Hibernating Rhinos Ltd  

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

On Thu, Mar 16, 2017 at 1:21 PM, Viktor <vik...@adlersoftware.de> wrote:

--

Viktor

unread,
Mar 16, 2017, 9:15:08 AM3/16/17
to RavenDB - 2nd generation document database
yes, it works.
i can read and change the data directly via .NET from that machine
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Mar 17, 2017, 8:01:59 AM3/17/17
to ravendb
What does you code looks like compared to RavenDB's?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Viktor

unread,
Mar 17, 2017, 8:39:56 AM3/17/17
to RavenDB - 2nd generation document database
something like that:

<connectionStrings>    
<add name="RavenDB" connectionString="Url=https://master1;Database=XXX;ApiKey=XXX" providerName="NoSQL.RavenDB" />    
</connectionStrings>

using (var store = new DocumentStore { ConnectionStringName = "RavenDB" }.Initialize())
{
using (var session = store.OpenSession())
{
var docs = session.Advanced.LoadStartingWith<User>("users/");
foreach (var user in docs)
{
user.UpdatedBy = "Master-Remote";
session.Store(user);
}
session.SaveChanges();

Oren Eini (Ayende Rahien)

unread,
Mar 17, 2017, 8:43:12 AM3/17/17
to ravendb
Okay, that is pretty much what is going on with ravendb as well.
I think that at this point you'll need to pull the TCP watch like WireShark to look at things
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Viktor

unread,
Mar 17, 2017, 8:58:36 AM3/17/17
to RavenDB - 2nd generation document database
okay.
i will give it a try
thanks!
viktor
PS
just an idea.
i have not specified "Raven/HostName" (on both sites).
maybe it has something todo with it?

Viktor

unread,
Mar 17, 2017, 10:42:08 AM3/17/17
to RavenDB - 2nd generation document database
sorry!
to be honest i still have no idea how can i figure out, 
what causes "System.ArgumentException: Stream was not readable." on the master2.
what should i look at?
i am on the server (master1) and i can see incomming packets from the master2 and then?
see screenshot below



Am Freitag, 17. März 2017 13:43:12 UTC+1 schrieb Oren Eini:

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2017, 2:38:12 AM3/19/17
to ravendb
Talk with the dns provider, they can probably help diagnose it. Not possible from a screen shot and a lot more information about the network
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Viktor

unread,
Mar 19, 2017, 3:27:18 AM3/19/17
to RavenDB - 2nd generation document database
hi,
thanks for you reply!
we have already tolked with the dns provider on friday and they told us that we should ask the ravendb-support since everything is fine on their side.
would it be helpful if i provide you an access to the server (where exception is occurred)?
you can consider this issue as paid-support if necessary.
thanks!
viktor

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2017, 9:08:48 AM3/19/17
to ravendb
Please send us the details to sup...@ravendb.net, including the support contract id
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Viktor

unread,
Mar 20, 2017, 9:20:20 AM3/20/17
to RavenDB - 2nd generation document database
sorry for the late response, just came back to office.
i have just checked the log and....  raven doesn't throw the error anymore!!
i am absolutely sure that our dns provider has fixed something in the meantime.
sorry for the noise!
and thanks you for  the support!
viktor
Reply all
Reply to author
Forward
0 new messages