Failed to execute operation
We are using .net 1.1 SDK as 1.2 never worked for us :-)
And when we try to hit save data on the server through another client machine, it gives error. "Failed to Execute operation". What do we need to do? I have opened port 8091 for inbound rules also. Regards,VB.
Generally speaking, the result returned should give you some more info about the failure. Do you not see anything else in that result object?
Nope it doesn't and we are still seeing the issue. We are thinking to change the cache layer from couchbase to Mongo. As couhbase has such a poor support.
Are you able to telnet from the app server to the Couchbase server? http://www.couchbase.com/docs/couchbase-devguide-2.0/cb-basic-telnet-ops... If you're not getting a Message or StatusCode value back on the result object, then it's usually an indication that there's a networking error. Logging could also shed some light - http://www.couchbase.com/docs/couchbase-sdk-net-1.2/couchbase-sdk-net-lo... - on the internals. If you've opened port 8091, that would allow the client to get cluster information, but you would need to have ports 11210 or 11211 open for operations...
Started working with 1.2 SDK and 2.0 Server Release versions but when we try ExecuteStore, it dies not give any error but reult.Sucess = false.
can someone please help. I have this web.config section to read my couchbase connection properties in my custom class <CacheConfig>
<CacheConfigElement StoreType="Couchbase" ConnectionString="http://10.100.172.56:8091/pools/" BucketName="default" BucketPassword="Administrator" >
<TypeElementCollection>
<TypeElement Name="Rms.Platform.Cache2.Test.Contract"/>
<TypeElement Name="Rms.Platform.Cache2.Test.Portfolio"/>
</TypeElementCollection>
</CacheConfigElement>
<!--<CacheConfigElement StoreType="Couchbase" ConnectionString="http://localhost:8091/pools/" BucketName="BucketName1" BucketPassword="Administrator" >
<TypeElementCollection>
<TypeElement Name="Rms.Platform.Cache2.Test.Contract1"/>
<TypeElement Name="Rms.Platform.Cache2.Test.Contract11"/>
</TypeElementCollection>
</CacheConfigElement>-->
The in this code I am trying to create connection
var config = new CouchbaseClientConfiguration
{
Bucket = CouchConfig.BucketName,
BucketPassword = CouchConfig.BucketPassword
};
config.Urls.Add(new Uri(CouchConfig.ConnectionString));
config.SocketPool.ConnectionTimeout = new TimeSpan(0, 0, 1, 0, 0);
config.SocketPool.DeadTimeout = config.SocketPool.ConnectionTimeout;
And this the save method.
public bool SaveObject<T>(string key, T singleObject) where T : class
{
if (Logger.IsDebugEnabled) { Logger.LogDebug("Start SaveObject"); }
try
{
ValidateKeys(new List<string> { key });
if (singleObject == null)
{
if (Logger.IsErrorEnabled) { Logger.LogError("Cache object is null."); }
throw new ArgumentException("Cache object is null.");
}
var result = CouchbaseClient.ExecuteStore(StoreMode.Set, key, singleObject);
if (result.Success)
{
return true;
}
if (result.Exception == null && !string.IsNullOrWhiteSpace(result.Message))
{
throw new Exception(result.Message);
}
throw result.Exception;
}
catch (Exception ex)
{
if (Logger.IsErrorEnabled) { Logger.LogError("Exception in SaveObject", ex); }
throw;
}
finally
{
if (Logger.IsDebugEnabled) { Logger.LogDebug("End SaveObject"); }