Hello,
I am trying to connect to a memcached from C# and getting the exception:
is this a Memcached bucket?
2017-01-25 08:46:48,097 ERROR Control:LoadRecursive Error while processing pageWPUtils.WPException: FrontEndCacheManager:GetFrontEndCachedItem front end cache bucket name: cache, url: cacheSystem.AggregateException: Could not bootstrap - check inner exceptions for details.[ at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password)
at Couchbase.Core.ClusterController.CreateBucket(String bucketName)
at WPUtils.FrontEndCacheManager.InitializeBuckets()] , InnerException: Couchbase.Configuration.ConfigException: is this a Memcached bucket?[ at WPUtils.FrontEndCacheManager.InitializeBuckets()
at WPUtils.FrontEndCacheManager.GetFrontEndCachedItem(String url, TimeSpan expiration)
at webmobile.home.ProcessSitePage(BLMediaSite mediaSite, BLPage oPage, MSGXWWWSContext msgcontext, Dictionary`2 addParams, Guid oCurrSiteVisitGuid, FrontEndCacheTaskHandler taskHandler)
at webmobile.home.Page_Load(Object sender, EventArgs e)]
I am running on Couchbase server 4.0.0 and client SDK 2.2.5
I checked the connection from code I wrote in node.js and was successful.
I added a non default port, just to check if that works around the problem - it didn’t
I added a password, just to check if that works around the problem (like I read in another post Unable to connect to memcached bucket with .NET SDK 2.0.2) - it didn’t
Need your help - My only workaround for now, is to work with Couchbase bucket and not Memcached bucket.
The config looks ok to me; but I need you to enable client logging (use Common.Logging.Log4Net1213 v3.3.1) to find out what is causing the AggregateException to be thrown. You can send them to me via a direct message if you don’t want to post them.
One thing you may want to try, for sanities sake, creating another Memcached bucket using all default settings and seeing if you can connect to it.
Looking at the logs, here is the cause of the issue:
Bootstrapping failed from **http://172.xx.xxxx.7/pools**: System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 172.xxx.xxx.7:80
The issue seems to be that your bootstrap url lacks the proper port number, so the SDK defaults to port 80 which fails because its the wrong bootstrap port. Try changing your bootstrap port to:
I didn’t check, but I suspect a Couchbase bucket works because the SDK always starts bootstrapping over TCP using port using the default 11210 if none is provided.
Hi Jeff,
You were correct.
Problem solved
Once I set the connection to url to couchbase://hostname:8091 I was able to connect.
I wonder why the .NET Couchbase driver is not using 8091 as the default port like other drivers (such as node.js)…