[NCBC-426] Memory leak and application pool shutdown after Impersonation error Created: 28/Mar/14  Updated: 28/Mar/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.3.4
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Alain Quirion Assignee: Jeff Morris
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Windows 2008 Server R2

Attachments: Text File error-log Bug 14h 13min 31sec.txt    

 Description   
I'm using client version 1.3.4 and server version 2.1.1

After several investigation and some help from a community member, here is the conclusions I have.

My application pool running my web app inside the windows process (w3wp) has a memory leak of some kind only when I use couchbase. Without couchbase, the process is really stable (private memory around 400Mb, CPU rarely over 75, most of the times around 10). But when I do use couchbase, private memory doesn't stop growing up to 900Mb and the CPU is almost always over 75 (some from sigar and erl process, and some from w3wp).

I have 3 web server in a farm and I installed couchbase server on all of them so the 3 web servers can make calls to all 3 couchbase server which in my case are the same servers. Maybe this is the problem but I tried using only 1 server for couchbase and 2 web servers with the exact same result so I guess this was not the problem.

After a while, even with a really small load on the server (couple users), the application pool process throws an error.

An unhandled exception occurred and the process was terminated. Exception: System.TypeInitializationException Message: The type initializer for 'Enyim.Caching.MemcachedClient' threw an exception. StackTrace: at Enyim.Caching.MemcachedClient.Finalize() InnerException: System.Web.HttpException Message: An error occurred while attempting to impersonate. Execution of this request cannot continue.

I also receive a system warning in my event viewer saying this :

A process serving application pool 'my application pool name' suffered a fatal communication error with the Windows Process Activation Service. The process id was '6944'. The data field contains the error number.

The application pool process restarts at the same time.

This happens every 20-30 minutes with a small load. But with a big load, this happens every 2-3 minutes and cause my application pool to stop. I can disable the rapid fail protection to be sure my application pool never stops but this doesn't solve my problem.

My web app only does Get, Store, Remove calls. My CouchBaseClient is a static member of a singleton object and is used by the data access layer before and after calls to the database (if needed). When i go check the couchbase console, I see that the couchbase server does not have a lot of data. Around 2000 objects and only 3-4Mb under a big load. I also have around 500-900 Page faults (no minor no major).

I do not use impersonation anywhere. I even tested it to see which user is running my app before calling a couchbaseclient method and the user is "IIS APPPool\My Application Name" which is normal with IIS7.

Does Couchbase/memcached use impersonation somewhere and this user should have specific privileges ? The community member who helped me think that for some reason a problem could occur inside memcached during impersonation (why ? I dont know) and this would cause all TCP connection to close...which could lead to a severe exception because my application pool user doesn't have the rights to do this.

Which privileges should I give to my user or why there's an impersonation problem inside MemcachedClient.Finalize.

The community member also told me that the Finalize method should not be called if .Dipose() is called before. So I added the call to .Dipose() inside the Application_End method but that didn't change anything. Why and when would .Finalize be called in the first place ? With a better anwser to that, I could add .Dispose somewhere else.

Finally, I added Log4Net and was able to log the error.

Also, I did increase the number of ephemeral ports allowed on the server to 60 000. In fact, I answered Yes when ask during installation process and restart the server. I don't know where to check if it was done properly or not.

In the attached log file, the error happens at 14h 13mins 31secs




[NCBC-458] check terse bucket info URI automatically before checking full bucket URI Created: 07/May/14  Updated: 23/Jun/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: backlog-1.0

Type: Improvement Priority: Critical
Reporter: Matt Ingenthron Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Starting in Couchbase Server there is a separate URI "/b/streaming" that is private (to couchbase) interface and much more efficient for the cluster. We should, as a feature, automatically check that URI first before checking the other URI.

 Comments   
Comment by Matt Ingenthron [ 07/May/14 ]
Jeff: I filed this against 1.3.6 but will work with you on the roadmap/planning. This would be very valuable if a simple update for 1.3.x.




[NCBC-401] Client crashes during observe, in an event of a node failure. Created: 21/Feb/14  Updated: 22/Feb/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.3.3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Haik Nazlian Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Win


 Description   
For the past week, I'm benchmarking 2.5.0 with .NET Client and the things are not looking good.
First, there is bug causing the client to crash. This happens during Observe operation, in an event of node failure simulation. This is caused by poor coding of the Couchbase.ObserveHandler.CheckNodesForKey() method, that does not implement Try/Catch and retry functionality.
Here is the full info:
http://www.couchbase.com/communities/q-and-a/client-crashes-during-observe-event-node-failure#comment-1556
---------------------
The second problem is that even with the above bug fixed(I fixed and recompiled the client), I'm still losing newly written data in an event of node restart, no matter what the PersistTo ReplicateTo values are set to.
-------------------
The third problem is that the .NET client is SUPER SLOW compared to the C client. I have tested both in the same environment and the C client is about 100 times faster.


 Comments   
Comment by Jeff Morris [ 21/Feb/14 ]
Hi Haik -

I am exactly which bug this ticket is for, but it looks like you have #1 resolved - this is an open source project so please submit a pull request if you have found and fixed a bug :)

For the second issue, this should probably be a separate ticket: https://www.couchbase.com/issues/browse/NCBC-402

The third issue is a little more difficult...it's hard to compare these things, but I don't doubt the libcouchbase is faster than the client. There are several reasons for this, noticeably that the uses .NET client synchronous I/O and the 1.X client has been around for several years and has "morphed" into it's current form. The good news is that we are working on a new version dubbed 2.X. You can read more about it here: http://blog.couchbase.com/introducing-couchbase-net-sdk-20-development-blog-series

Thanks,

Jeff



Comment by Haik Nazlian [ 22/Feb/14 ]
You have a typo in the ticket link, it should go to https://www.couchbase.com/issues/browse/NCBC-402
Thanks for opening it!

About the 2.X Client: After examining all the clients, I wonder if wouldn't it be more sensible to use the libcouchbase so that it will be the core of the .NET client?
In this way all the clients will share the same unified core and will only have to provide an API.




Comment by Jeff Morris [ 22/Feb/14 ]
No problem and thanks for mentioning the typo :)

 As for using libcouchbase as the core, it's something that certainly been discussed. Actually the Java and the .NET clients are the two SDK's that don't use libcouchbase as a core. There are a couple reasons for this: a) history - both were developed before libcouchbase, b) capable platforms - java and .net are platforms that provide rich libraries for IO, threading etc c) since we are community driven, we want to provide SDK's that support community involvement, contributions - providing an SDK written 100% in the communities native platform helps to achieve these goals. d) some of those performance gains you see with C client will be mitigated marshaling between the managed/unmanaged worlds.




[NCBC-497] Compression Support Created: 02/Jun/14  Updated: 04/Dec/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 2.0 DP1
Fix Version/s: backlog-2.0

Type: Story Priority: Critical
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Datatype support - need to create subtasks for the following:
    Hello command
    Set a bit if compressed with snappy
    Set a bit if the client believes it’s JSON





[NCBC-491] Getting "Failed to initialize pool." on Windows Server R2 Created: 28/May/14  Updated: 04/Jul/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.3.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: samal Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: MS Windows Server R2

Issue Links:
Dependency

 Description   
Submitted bug as per request in Community discussion here: http://www.couchbase.com/communities/q-and-a/failed-initialize-pool

Recap:
Failing to establish connection between Nancy/ASP.NET webservice, using .net client 1.3.5 from nuget and Couchbase 2.2.0-837-rel. Tried with published build of service on the same machine as the Couchbase server, without firewall, anti-virus/malware, and debugger. Server Node Name on the server is 0.0.0.0.

No issue when trying against fresh Couchbase install on development machine running Windows 7.

Log from server:
2014-05-27 11:06:44.6021|WARN|Enyim.Caching.MemcachedClient|Creating new client. CID: f41d0d09-399e-4399-ba24-d4ed4902865e CouchbaseClient
2014-05-27 11:06:45.2091|WARN|Couchbase.CouchbasePool|Starting Couchbase.CouchbasePool
2014-05-27 11:06:45.3351|WARN|Couchbase.MessageStreamListener|Started working.
2014-05-27 11:06:45.3491|WARN|Couchbase.MessageStreamListener|Looking for the first working node.
2014-05-27 11:06:45.3731|WARN|Couchbase.MessageStreamListener|Starting the listener. Queue=True
2014-05-27 11:06:45.4031|WARN|Couchbase.MessageStreamListener|Resolved pool url http://127.0.0.1:8091/pools/ to http://127.0.0.1:8091/pools/default/bucketsStreaming/name_of_our_bucket?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8
2014-05-27 11:06:45.4031|WARN|Couchbase.MessageStreamListener|Start receiving messages.
2014-05-27 11:06:45.4581|ERROR|Couchbase.CouchbasePool|Failed to initialize the pool.
2014-05-27 11:06:45.4581|WARN|Couchbase.MessageStreamListener|Processing message: {"name":"name_of_our_bucket","bucketType":"membase","authType":"sasl","saslPassword":"xxxxxxxxxxx","proxyPort":0,"replicaIndex":false,"uri":"/pools/default/buckets/name_of_our_bucket?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8","streamingUri":"/pools/default/bucketsStreaming/name_of_our_bucket?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8","localRandomKeyUri":"/pools/default/buckets/name_of_our_bucket/localRandomKey","controllers":{"compactAll":"/pools/default/buckets/name_of_our_bucket/controller/compactBucket","compactDB":"/pools/default/buckets/default/controller/compactDatabases","purgeDeletes":"/pools/default/buckets/name_of_our_bucket/controller/unsafePurgeBucket","startRecovery":"/pools/default/buckets/name_of_our_bucket/controller/startRecovery"},"nodes":[{"couchApiBase":"http://0.0.0.0:8092/name_of_our_bucket","replication":0.0,"clusterMembership":"active","status":"healthy","otpNode":"ns_1@0.0.0.0","thisNode":true,"hostname":"0.0.0.0:8091","clusterCompatibility":131072,"version":"2.2.0-837-rel-community","os":"windows","ports":{"proxy":11211,"direct":11210}}],"stats":{"uri":"/pools/default/buckets/name_of_our_bucket/stats","directoryURI":"/pools/default/buckets/name_of_our_bucket/statsDirectory","nodeStatsListURI":"/pools/default/buckets/name_of_our_bucket/nodes"},"ddocs":{"uri":"/pools/default/buckets/name_of_our_bucket/ddocs"},"nodeLocator":"vbucket","fastWarmupSettings":false,"autoCompactionSettings":false,"uuid":"88ecde59b0e41d255e7a845583d3c2c8","vBucketServerMap":{"hashAlgorithm":"CRC","numReplicas":1,"serverList":["0.0.0.0:11210"],"vBucketMap":[[0,-1],

 Comments   
Comment by Jeff Morris [ 03/Jul/14 ]
Hi Samal -

Are you still running into the issue or have you resolved it?

- Jeff
Comment by samal [ 04/Jul/14 ]
Hi Jeff,

Yeah changing the server listen ip from 0.0.0.0 to 127.0.0.1 did the trick.




[NCBC-405] add discussion of timeout accuracy and implementation Created: 27/Feb/14  Updated: 27/Feb/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Matt Ingenthron Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Since our timeouts are only as accurate as the underlying APIs/subsystems we use, we should document this for our users so they can plan accordingly. For instance, if processes aren't scheduled for a long period of time owing to CPU or memory contention... or in some cases IO doesn't happen for a long time and our timeout is IO event driven, we may not timeout to the application until later.


 Comments   
Comment by Jeff Morris [ 27/Feb/14 ]
We also may want to discuss specific timeouts...since there are several "timeouts" at the SDK level: socket recv timeout, operation timeout, queue timeout (waiting for a socket to become available), send timeout, etc. Not all are equal.




[NCBC-388] Improve Nunit tests Created: 11/Feb/14  Updated: 02/Jun/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.3.3
Fix Version/s: backlog-1.0

Type: Improvement Priority: Major
Reporter: Saakshi Manocha Assignee: Saakshi Manocha
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency

 Description   
Some Nunit tests require special set up and tear down phases and not all of them run in one go.
So we need to improve them and get better coverage and test reports through Jenkins.

 Comments   
Comment by Jeff Morris [ 03/Mar/14 ]
Hi Saakshi -

Do you have pending check-ins for this ticket? If not close it or if it's revolving, let's move it to 1.3.5 ok?

Thanks,

Jeff
Comment by Saakshi Manocha [ 04/Mar/14 ]
No pending check-ins as of now, moving it to 1.3.5
Comment by Saakshi Manocha [ 20/Mar/14 ]
Change set:
http://review.couchbase.org/#/c/34736/

In test case: When_Deleting_Bucket_Bucket_Is_No_Longer_Listed, the method DeleteBucket() should be called before checking whether the bucket is deleted and is no longer listed. This missing statement was causing the test case to fail.




[NCBC-385] Multi get and touch Created: 05/Feb/14  Updated: 05/Feb/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: nvargas Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
One can get several keys in one round trip. Also one can do get-and-touch in a single round trip. But currently is not possible to do several get-and-touch in one round trip. Something like:

IDictionary<string, object> CouchbaseClient.Get(IEnumerable<string> keys, IEnumerable<TimeSpan> newExpirations);

Please add such an operation in a future version

Thanks.

- See more at: http://www.couchbase.com/communities/comment/1493#comment-1493




[NCBC-286] Accessing key data when using strongly-typed views Created: 07/Aug/13  Updated: 02/Jun/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.2.6
Fix Version/s: backlog-1.0

Type: Improvement Priority: Major
Reporter: David Haikney Assignee: Jeff Morris
Resolution: Unresolved Votes: 1
Labels: customer, views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Directly lifted from forum post here and copied and pasted below:
http://www.couchbase.com/forums/thread/net-client-accessing-key-data-when-using-strongly-typed-views


====Forum Post 1 (Simon, Requester) ====
I have a Couchbase 2.0 View that returns a projection of the underlying objects - e.g.
{
    Count: 100,
    SumPrices: 1231231.02
}
if I use a strongly typed view - e.g.
_client.GetView<MyDto>("my__dd", "my_view")
the projection is automatically deserialised to my DTO class, which is nice and easy. However, I'd also like to retrieve info from the key, which doesn't seem to be possible with this approach.
I can use the more general IView syntax, but now I have to deserialize the DTO myself which is not simple since the data is exposed as a dictionary, not a JSON string.
Perhaps I'm missing something, but it would be useful to be able to use both strong-typing and still have access to the key meta data.
The alternative would be to include the values from the key in the projection data, but this seems wrong in that the data will be repeated twice in the index?

====Forum Post 2 (John)====
As I understand your view returns.
 { Count: 100, SumPrices: 1231231.02 }
If this is correct you use reduce function that counts and summs multiple keys. And it returns 1 key-value pair where key is null and value is an object mentioned before.
So I don't understand which one key's metadata your want to see and where? If you want to see all keys metadata you can store it in reduce function into array or something:
{ Count: 100, SumPrices: 1231231.02, Keys: [key1, key2 ...] }.

====Forum Post 3 (John)====
If your DTO includes an "Id" property, it will be populated a bit magically by the generic view method. It's a little trickier than that, and I describe a solution here - http://www.couchbase.com/docs/couchbase-sdk-net-1.2/brewerycrud.html. I'm going to work on improving the JSON extensions to make this easier to use - https://www.couchbase.com/docs/couchbase-sdk-net-1.2/jsonextensions.html.

====Forum Post 4 (Simon, Requester)====
Hi yes, you are correct that this is a map-reduce scenario.
However I am using the group feature so each row returned should have a distinct key associated with it as per the IViewRow.ViewKey property (of type object[]) in the .NET Client API. I can make this work with the loosely typed version but the mapping code for the returned projection is a bit icky - e.g.
((IDictionary)(vr.Info["value"]))["Count"]
to get the Count value!

====Forum Post 5 (Simon, Requester)====
HI John - Thanks for the pointers. To clarify, this is a map-reduce view scenario. My client code is like this:
            return _client.GetView<WebsiteBrowseQuoteSummary>("browse", "ret_by_route_dow")
                .StartKey(new object[] { from, to, (int)departureDate.DayOfWeek, (int)returnDate.DayOfWeek })
                .EndKey(new object[] { from, to, (int)departureDate.DayOfWeek, (int)returnDate.DayOfWeek + 1 })
                .Group(true)
                .Reduce(true)
                .ToList();
I think the issue is that in the strongly typed approach (e.g. GetView<T>) the return type is IView<T> which is an IEnumerable<T> where T is the DTO. If there was an IViewRow<T> with a Value property of type T and a ViewKey property, I think that would do it as I could add the additional work to populate the missing params from the ViewKey.

====Forum Post 6 (John)====
Ah, didn't catch the reduce part... In the beer sample, I used the non-generic view for such queries:
https://github.com/couchbaselabs/beer-sample-net/blob/master/src/Couchba...
The limitation with the generic query is that it either a) expects to get the document JSON by its ID, where reduce won't obviously have the id, or b) it expects the value to be a JSON projection to deserialize into an instance of T.
I'd like to support generic reduce queries, so I'll give it some thought...
====End of Forum Posts====





[NCBC-287] workaround bad REST responses from bucket statistics Created: 07/Aug/13  Updated: 18/Sep/13

Status: In Progress
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Saakshi Manocha Assignee: Saran Kumar (Inactive)
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency

 Description   
Cluster version 1.8.1 may send back bytes in a decimal format (i.e. 1000.0 instead of 1000). We can work around this at the client by turning it into an integer.

 Comments   
Comment by Saakshi Manocha [ 23/Aug/13 ]
@Saran:
Please see the change done for this issue at : https://github.com/saakshimanocha/couchbase-net-client/commit/24930aab58f574009cb842bfd267b21d992fc4a2

I have committed the changes in my forked repository https://github.com/saakshimanocha/couchbase-net-client/
Please use the Couchbase-net-client code from here and use it in the customer application. If it works fine for you, I will commit the changes in main repository.

Change done:
Changed data types from long to double for Swap_total, MemoryFree and MemoryTotal. This will solve the problem for 1.8.1 and later builds.
Converting to Int will not help as it cannot parse the trailing decimal because value is too large for int.
Comment by Saakshi Manocha [ 18/Sep/13 ]
@Saran: Any update on this?




[NCBC-314] Runaway worker process when cluster node shutdown - SessionState provider Created: 18/Oct/13  Updated: 18/Oct/13

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jeff Morris Assignee: Saakshi Manocha
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://www.couchbase.com/communities/q-and-a/runaway-worker-process-when-cluster-node-shutdown-sessionstate-provider

>>Hi All,

I am experiencing a problem that has multiple symptoms and all in all seems very strange.

I have a single Windows Server 2012, IIS8 EC2 instance hosting an ASP .Net WebForms site using .Net Fx 4.0. This is configured to use a Couchbase 2.1.1 community edition (build-764-rel) cluster of 2 nodes.

The Client components are: CouchBaseNetClient 1.2.9 and CouchBaseAspNet 1.2.1 both installed from NuGet.

The Problem:

If I shutdown one of the nodes (either one, same problem) to simulate failure; then the following are observed.

The connected browser clients get redirected to a 404 page when they try to postback.

If I re-enter the home page url in the browser and navigate there, the server does not repsond to the get request and the server's w3wp process jumps to 50% and just sits there. If I browse to the site from another client, the w3wp processor usage jumps to 100% - eventually these requests timeout on the browser but the processor use remains the same on the server.

Stopping and starting the app pool seems to have no effect, a full iisreset is required. When I then access the site again after an iisreset, any pages that use session state timeout.

The system cannot be restored to working condition until the dropped Couchbase node is returned to the cluster.

This problem happens when exclusiveAccess is set to true or false.

The web.confg entries are included below:

Web.config:

<sessionState customProvider="Couchbase" mode="Custom" timeout="10">
<providers>
<add name="Couchbase" type="Couchbase.AspNet.SessionState.CouchbaseSessionStateProvider, Couchbase.AspNet"
exclusiveAccess="false" />
</providers>
</sessionState>
</system.web>
<couchbase>
<servers bucket="default" bucketPassword="passwd">
<add uri="http://cache1.domain.com:8091/pools" />
<add uri="http://cache2.domain.com:8091/pools" />
</servers>
</couchbase>
<code>

- See more at: http://www.couchbase.com/communities/q-and-a/runaway-worker-process-when-cluster-node-shutdown-sessionstate-provider#sthash.6cTgPjM3.dpuf

 Comments   
Comment by Jeff Morris [ 18/Oct/13 ]
Saakshi -

Can you try to replicate this?

-Jeff




[NCBC-302] "Failed to initialize the pool" errors in MVC Application Created: 24/Sep/13  Updated: 13/Jan/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: backlog-1.0

Type: Bug Priority: Major
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
From the forums post: http://www.couchbase.com/communities/q-and-a/getting-intermittent-error-failed-initialize-pool

We're using version 1.2.6 of the .NET client and version 2.0.1 community version of the server.

We will occasionally get a flood of the following errors. We are seeing this error in an MVC application. I've done quite a bit of google'fu and haven't seen anything about this couchbase issue. Also note that this seems to happen randomly, although I'm still investigating.

message: Failed to initialize the pool.
level: Error
stacktrace: at System.Web.AspNetSynchronizationContext.OperationStarted() at System.Net.WebClient.DownloadStringAsync(Uri address, Object userToken) at Couchbase.DefaultHttpClient..ctor(Uri baseUri, String username, String password, TimeSpan timeout, Boolean shouldInitConnection) at Couchbase.DefaultHttpClientFactory.Create(Uri baseUri, String username, String password, TimeSpan timeout, Boolean shouldInitializeConnection) at Couchbase.Configuration.CouchbaseClientSection.Couchbase.Configuration.ICouchbaseClientConfiguration.CreateHttpClient(Uri baseUri) at Couchbase.CouchbaseNode..ctor(IPEndPoint endpoint, Uri couchApiBase, ICouchbaseClientConfiguration config, ISaslAuthenticationProvider authenticationProvider) at Couchbase.CouchbasePool.CreateNode(IPEndPoint endpoint, ISaslAuthenticationProvider auth, Dictionary`2 nodeInfo) at Couchbase.CouchbasePool.InitVBucket(ClusterConfig config, ISaslAuthenticationProvider auth) at Couchbase.CouchbasePool.ReconfigurePool(ClusterConfig config)

message: An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>.
- See more at: http://www.couchbase.com/communities/q-and-a/getting-intermittent-error-failed-initialize-pool#sthash.5M7ARZk9.dpuf




Move .NET API documentation from docs repo to auto-doc (NCBC-309)

[NCBC-322] Setup Sandcastle and generate documentation Created: 29/Oct/13  Updated: 13/Jan/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: backlog-1.0

Type: Technical task Priority: Major
Reporter: Jeff Morris Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://shfb.codeplex.com/




[NCBC-267] should retry count be allowed to be 0, or should it be forced higher Created: 29/May/13  Updated: 29/May/13

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Matt Ingenthron Assignee: Matt Ingenthron
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[NCBC-738] unnecesary boxing added in NCBC-722 Created: 10/Dec/14  Updated: 14/Dec/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 2.0 Beta 2, 2.0.0
Fix Version/s: 2.0.1

Type: Improvement Priority: Major
Reporter: Lennartos Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
in NCBC-722 changed the result of a view so it is returned as ViewRow<T>, which is fine - BUT
the Key here is returned as object instead of dynamic - making it a hassle to first unbox to dynamic/Jarray to be able to deserialize it / cast it to JValue and then convert. ( which make this unnecessary verbose and cluttered solution )

A better solution is to keep it as dynamic like ID.

 Comments   
Comment by Lennartos [ 12/Dec/14 ]
Added a pull request for one click implementation:

https://github.com/couchbase/couchbase-net-client/pull/29
Comment by Jeff Morris [ 12/Dec/14 ]
@Lennartos -

Thanks for the submission. The change that was made for GA is similar to the 1.X interface and was done that way to support the largest range of the key types/structures that can be returned. For example, if the key can be converted to a string, it will be wrapped/boxed as an object{string}...I think this is expected.

I am guessing that your keys are a more complex JSON structure, hence the JSON serializer will substitute it's API types (JArray/JValue) for the structure? I can see where that can be a hassle. I am a bit hesitant to change the interface, though, since it's published as of GA; the reason being it will be a breaking change. That being said, we want 2.0 to use the latest .NET features.
Comment by Lennartos [ 13/Dec/14 ]
Made a long post here no one would want to read anyway, and deleted it.
Long story short:
if your code was expecting to be casting from object now, it should be able to cast the same way from the dynamic container - should be no breaking change.
My largest issue here is that you are essentially exposing internal implementation specific classes instead of regular types or at least types you can control - any nuget update could break our code at any time as it stands. ( we need to cast to a external class called JArray and depend on its currennt implementation to use the key )
Using Dynamic at least gives you control over the implementation, and we can make our code non implementationm specific since one can index the JArray as if you had returned List<object> instead.
If at any point you change the JSON parser, or they break their API - you can thus replace the class hidden by dynamic with your own controlled solution and thus provide a non breaking upgrade path.
Comment by Jeff Morris [ 13/Dec/14 ]
Good points; in fact we are planning to add a feature which will allow you to plug in your JSON parser of choice. Given that object leaks the underlying API would cause bigger problems for consumers.
Comment by Lennartos [ 13/Dec/14 ]
I forgot to mention that the issue happens when using reduce functions in the view.
As long as the key is a array of any sort, the JArray will be provided instead of something more platform neutral.
Comment by Jeff Morris [ 13/Dec/14 ]
@Lennartos -

If you haven't already done so, can you create a gerrit account (our code review system) and accept the CLA? It should just take a few minutes: http://review.couchbase.org

Towards the bottom of this page, there are directions: http://docs.couchbase.com/developer/dotnet-2.0/overview.html

Thanks!

-Jeff
Comment by Lennartos [ 14/Dec/14 ]
Done




[NCBC-742] .NET Client Issue with Inheritance Created: 11/Dec/14  Updated: 15/Dec/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 1.3.9
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jeff Dillon Assignee: Jeff Dillon
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File ncbc-742-nested-classes.PNG    
Issue Links:
Duplicate

 Description   
Our classes use inheritance. We write strong types to Couchbase but when we retrieve objects we only know the base type. The GetJson extension fails even when we set

CouchbaseClientExtensions.JsonSerializerSettings.TypeNameHandling

to

TypeNameHandling.All

We had to write a custom version of GetJson that parses the document to get the $type property to help with deserialization. This seems a bit excessive. Do you recommend a better way of doing this?

Ex.

public abstract class BaseClass
{
}

public class ChildClass : Base Class
{
}

using (var client = new CouchbaseClient())
{
var obj = new ChildClass();
client.StoreJson(StoreMode.Set, “myKey”, obj);

//Stores { “$type”: “MyAssembly.ChildClass, MyAssembly” }

var obj2 = client.GetJson<BaseClass>(“myKey”)
}

Issue with some child objects

We are experiencing an issue where certain nested types do not deserialize. We ended up writing a custom converter but this is not ideal. I realize this is probably an issue with Newtonsoft.Json but we are hoping you can provide some guidance.

public class ParentClass
{
public ChildClass<bool> Child { get; set; }
}

public class ChildClass<T>
{

[Newtonsoft.Json.JsonConstructor]
public ChildClass(T value, DateTime updatedTime)
{
this.Value = value;
this.UpdatedTime = updatedTime; }

public T Value { get; private set; }

public DateTime UpdatedTime { get; private set; }
}

using (var client = new CouchbaseClient())
{
var obj = new ParentClass ()
{
Child = new ChildClass<bool>(true, DateTime.UtcNow),
};
client.StoreJson(StoreMode.Set, “myKey”, obj);

//Stores { “$type”: “MyAssembly.ParentClass, MyAssembly”, “child”: { “$type”: “MyAssembly.ChildClass`1[System.Boolean, mscorlib]”, “value”: true, “updatedTime”: “2017-12-01T00:00:00.0000000Z” } }

var obj2 = client.GetJson< ParentClass>(“myKey”)
}



 Comments   
Comment by Jeff Morris [ 11/Dec/14 ]
I am a bit confused here, for the first question, take the following classes:

        private class Town : City
        {
            [JsonProperty]
            public bool HasWishingWell { get; set; }
        }

        private class City
        {
            [JsonProperty("name")]
            public string Name { get; set; }

            [JsonProperty("state")]
            public string State { get; set; }

            [JsonProperty("type")]
            public string Type { get; set; }

            [JsonProperty("lastUpdated")]
            public DateTime LastUpdated { get; set; }
        }

And the following code to insert and retrieve:

            var city = new Town { Name = "Cambridge", State = "MA", Type = "city", HasWishingWell = true};
            var result = Client.StoreJson(StoreMode.Set, "city_Cambridge_MA", city);
            Assert.That(result, Is.True);

            var savedCity = Client.GetJson<City>("city_Cambridge_MA");
            Assert.That(savedCity, Is.InstanceOf<City>());
            Assert.That(savedCity.Name, Is.StringMatching("Cambridge"));
            Assert.That(savedCity.Type, Is.StringMatching("city"));
            Assert.That(savedCity.State, Is.StringMatching("MA"));

This seems to work as expected less the HasWishingWell property that's not defined by the Type City. Maybe I am misunderstanding the question?

Comment by Jeff Morris [ 11/Dec/14 ]
For the second issue regarding the child classes, the code included this ticket works as expected (see screenshot) as well. I am not sure I understand what the issue that being reported is, can you provide more context to the ticket and perhaps attach and example with the unexpected behavior as a VS project?




[NCBC-580] not able to openBucket after certificate uninstalled/regenerated when ClientConfiguration uses SSL, BucketConfig doesn't Created: 12/Aug/14  Updated: 14/Aug/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: 2.0 DP3
Fix Version/s: backlog-2.0

Type: Bug Priority: Minor
Reporter: Andrei Baranouski Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File log.txt    

 Description   
test
https://github.com/couchbase/sdkd-net/blob/client-2.0/src/FTests/SSLFeatures.cs#L342
https://github.com/couchbase/sdkd-net/blob/client-2.0/src/FTests/SSLFeatures.cs#L364

code

 ClientConfiguration extConfig = new ClientConfiguration
           {
               UseSsl = true,
               Servers = new List<Uri>
            {
                new Uri("http://testenv:8091/pools")
            }
           };

extConfig.BucketConfigs[bucketName].UseSsl = false;


[Test]
        public void Test_NotSSL_reOpenBucket_When_Cert_Removed()
        {
            installCert(certPath);
            using (var cluster = new CouchbaseCluster(extConfig))
            {
                using (var bucket = cluster.OpenBucket(bucketName))
                {

                    var result = bucket.Upsert(Path.GetRandomFileName(), Path.GetRandomFileName());
                    Assert.IsTrue(result.Success);
                    cluster.CloseBucket(bucket);
                }
                removeCert(certPath);

                var bucketRefreshed = cluster.OpenBucket(bucketName);//FAILED
                bucketRefreshed.Upsert(Path.GetRandomFileName(), Path.GetRandomFileName());
            }
        }


FTests.SSLFeatures.Test_NotSSL_reOpenBucket_When_Cert_Removed:
Couchbase.Configuration.ConfigException : Could not bootstrap default. See log for details.
at Couchbase.Core.ClusterManager.CreateBucket(String bucketName, String password) at d:\couchbase_src\couchbase-net-client\Src\Couchbase\Core\ClusterManager.cs:line 206
at Couchbase.Core.ClusterManager.CreateBucket(String bucketName) в d:\couchbase_src\couchbase-net-client\Src\Couchbase\Core\ClusterManager.cs:line 137
at Couchbase.CouchbaseCluster.OpenBucket(String bucketname) в d:\couchbase_src\couchbase-net-client\Src\Couchbase\CouchbaseCluster.cs:line 103
at FTests.SSLFeatures.Test_NotSSL_reOpenBucket_When_Cert_Removed() в d:\couchbase_src\sdkd-net\src\FTests\SSLFeatures.cs:line 341


so, we try to openBucket when CouchbaseCluster is still "active" but initial certificate doesn't exist anymore


 Comments   
Comment by Jeff Morris [ 12/Aug/14 ]
>>See log for details.

No logs, so hard to say what the problem is here.
Comment by Andrei Baranouski [ 13/Aug/14 ]
client logs
Comment by Jeff Morris [ 13/Aug/14 ]
I can't read the actual reason why the ssl connection is failing, because of some encoding issue (probably because your localization settings?):

2014-08-13 11:29:46,830 [TestRunnerThread] WARN Couchbase.IO.ConnectionBase - Starting SSL encryption on 10.3.121.134
2014-08-13 11:29:47,385 [TestRunnerThread] ERROR Couchbase.IO.ConnectionBase - System.Security.Authentication.AuthenticationException: ��������� ���������� �������������� �������� ����������� �������� �����������.
   � System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
   � System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)

The problem could be somewhere with your installation/reinstallation of the client certificate. The client itself cannot make the connection with the newly installed cert.

As a feature installing/removing SSL certificates isn't something we have talked about supporting from the client. In most cases the cert would be installed and managed by itops outside of the application layer. That being said, it's an important test and will help automation later on - I do think we should lower the priority though to perhapa minor?
Comment by Andrei Baranouski [ 13/Aug/14 ]
I agree that it is a rare negative case and we can set lower priority

"As a feature installing/removing SSL certificates isn't something we have talked about supporting from the client" I remove/reinstall/regenerate certificate inside the tests to check client behaviour for different ssl feature scenarios we described in https://docs.google.com/document/d/1J3vWQnYxCtbD4WJbcSP4OqYiePAlUdCCKMSj7jtbzxs/edit#heading=h.o6lvbcwhi5gc

i've uploaded new client logs, the error says: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the results of authentication.
Comment by Don Pinto [ 13/Aug/14 ]
For beta 2 might be OK, but for GA we should address this issue - I would see this scenario hit when you do cert refreshes or if there is a breach and you need to roll out a new certificate.

In any case, we might need to document this as well if there are any particular cases users should think about.

Thanks
Comment by Jeff Morris [ 13/Aug/14 ]
Agreed, but perhaps we add the functionality as a feature to the Management API?




[NCBC-433] Doc: Troubleshooting guide is lacking. Created: 07/Apr/14  Updated: 07/Apr/14

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Patrick Varley Assignee: Jeff Morris
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: http://docs.couchbase.com/couchbase-sdk-net-1.3/#troubleshooting





Fix invalid tests in NUnit project. (NCBC-174)

[NCBC-296] Fix the test: When_Observing_A_Removed_Key_Operation_Is_Successful_With_Master_And_Replication_Persistence Created: 03/Sep/13  Updated: 03/Sep/13

Status: In Progress
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Technical task Priority: Minor
Reporter: Saakshi Manocha Assignee: Saakshi Manocha
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency

 Description   
The test:
When_Observing_A_Removed_Key_Operation_Is_Successful_With_Master_And_Replication_Persistence
requires creating a bucket that has replication index two.
so remove this dependency from the test and rather let the test create such a bucket for itself.

 Comments   
Comment by Saakshi Manocha [ 03/Sep/13 ]
code changes submitted at:
http://review.couchbase.org/#/c/28758/

pending for review




[NCBC-305] Improve setup and tear down phases of unit tests Created: 01/Oct/13  Updated: 01/Oct/13

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Saakshi Manocha Assignee: Saakshi Manocha
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
In many bucket admin tests in particular, the test should clear the bucket that it creates and also improve the wait condition




[NCBC-264] document the release process Created: 17/May/13  Updated: 31/Jul/14

Status: In Progress
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Matt Ingenthron Assignee: Saakshi Manocha
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Microsoft Word Release_Process_.Net_SDK.doc    
Issue Links:
Dependency

 Description   
Somewhere in the source repository, please document the release process.

 Comments   
Comment by Saakshi Manocha [ 23/May/13 ]
@Matt/John: Attached herewith is a layman version of the release process of .Net SDK.
Please review and suggest the changes as required.
Thanks!
Comment by Saakshi Manocha [ 10/Jun/13 ]
created sub-task to review the document




[NCBC-276] /opt/couchbase/bin/cbstats Created: 27/Jun/13  Updated: 01/Jul/13

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Trivial
Reporter: trace Assignee: Matt Ingenthron
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: couchbase 1.8.1. Red Hat Enterprise Linux Server release 5.8 (Tikanga)

Attachments: PNG File cmd_get.png    

 Description   
Подскажите, почему cmd_get и cmd_set всё время возрастает.
Хотя график должен быть ввиде синусойды.

п.с.
данные в zabbix пишутся правильно.

 Comments   
Comment by trace [ 01/Jul/13 ]
Please transfer the task to a project Cochbase Server (MB)




[NCBC-297] Documentation problem Created: 25/Jul/13  Updated: 03/Sep/13

Status: Open
Project: Couchbase .NET client library
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Saakshi Manocha Assignee: Matt Ingenthron
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
I was just reading about the observe method implemented in .Net client library, found two things problematic:

1. Here in the wiki page : http://www.couchbase.com/wiki/display/couchbase/Observe
there is a statement that says : "In the examples above, the ReplicateTo and PersistTo are enums with values from 1 to 4." which is incorrect as we know that replication is only allowed till 3 nodes and the enum ReplicateTo has values = 0,1,2,3. For PersistTo, the values are from 0 to 4.

2. No information about Observe is found in sdk documentation (may be i couldn't locate it) : http://www.couchbase.com/docs/couchbase-sdk-net-1.2/




Generated at Wed Dec 17 22:49:12 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.