Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Failed to execute operation

4 replies [Last post]
  • Login or register to post comments
Wed, 12/12/2012 - 11:41
Vishal Batghare
Offline
Joined: 12/11/2012
Groups: None

 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.

Top
  • Login or register to post comments
Wed, 12/12/2012 - 15:46
Vishal Batghare
Offline
Joined: 12/11/2012
Groups: None

 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"); }

 

Top
  • Login or register to post comments
Mon, 12/24/2012 - 01:55
ingenthr
Offline
Joined: 03/16/2010
Groups:

Generally speaking, the result returned should give you some more info about the failure. Do you not see anything else in that result object?

Top
  • Login or register to post comments
Mon, 01/28/2013 - 11:28
Vishal Batghare
Offline
Joined: 12/11/2012
Groups: None

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.

Top
  • Login or register to post comments
Mon, 01/28/2013 - 12:17
john
Offline
Joined: 01/05/2012
Groups: None

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

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker