[NCBC-152] Couchbase Client hangs during instantion of the Client if the request to http://xxx.xxx.xxx.xxx:8091/pools/default/bucketsStreaming/default is blocked or never returns Created: 09/Nov/12 Updated: 07/Jun/13
|Project:||Couchbase .NET client library|
|Affects Version/s:||1.2 Beta|
|Reporter:||Aaron Mell||Assignee:||Saakshi Manocha|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Windows Server 2008 VM
Coucbase C# Client Library 1.2
During instantiation of the client, a MessageStreamListener is created. Inside of the listener is a call is made to the config url
Line 376 of MessageStreamListener
this.request = this.requestFactory.GetWebRequest(configUrl, configUrl.GetHashCode().ToString());
this.response = this.request.GetResponse();
If this call never completes, for example because AVG silently blocks the request and prevents the data from being returned, then the client will wait indefinitely instead of timing out.
|Comment by Aaron Mell [ 09/Nov/12 ]|
|Comment by Matt Ingenthron [ 17/May/13 ]|
|Not a priority, but let's try to come up with a way to test if this does in fact hang forever. If so, we should fix it.|
|Comment by Saakshi Manocha [ 24/May/13 ]|
Yes it is easily reproducible. I have installed AVG on Windows7 machine and server is also installed on same machine. If AVG is enabled, client will never get instatiated, if I disable the AVG, it works perfectly.
In class Couchbase.BucketConfigListener.cs:
// subscribe to the config url
this.listener = this.GetPooledListener();
// this will be signaled by the config changed event handler
It keeps on waiting endlessly at this code statement - reset.WaitOne(). It wont even time out, the thread just keeps waiting forever.
While its waiting if we disable the AVG, then it will work absolutely fine.
The code snippet is attached herewith (i added a statement for Get() method, its not really required, but if included, code assumes we have a key '101' stored already).
another thing to notice is if in App.config, I change the server address from "http://localhost:8091/pools" to "http://10.3.121.134:8091/pools", it would work fine. (10.3.121.134 actually has server installed)
|Comment by Saakshi Manocha [ 07/Jun/13 ]|
|@Matt: Please suggest how shall we proceed with this issue.|