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

Unable to get/set data from Couchbase 1.8.1 Enterprise on Ubuntu

3 replies [Last post]
  • Login or register to post comments
Fri, 09/07/2012 - 01:21
dangdinhquan
Offline
Joined: 09/07/2012
Groups: None

hi,

I've the following platform:

- Client side:
+ .NET Client 1.1
+ Windows 7
+ Visual Studio 2012
+ C# 4.0

- Server Side:
+ Ubuntu Server 12.04 (Godaddy Cloud)
+ Couchbase Enterprise 1.8.1

- Code (anyone could use my server to test):

var __logDBConfig = new CouchbaseClientConfiguration();
__logDBConfig.Urls.Add(new Uri(@"http://50.62.28.139:8091/pools"));
__logDBConfig.Bucket = @"default";
__logDBConfig.BucketPassword = @"";

var __dbClient = new CouchbaseClient(__logDBConfig);
var result = __dbClient.ExecuteStore(StoreMode.Set, @"Test-Key", @"Test-Value");

- Result: alway return "Operation state was invalid" or "Failed to execute operation", so, what's happening with me?

Please help me. Thanks.

Top
  • Login or register to post comments
Sat, 09/08/2012 - 14:43
bearrito
Offline
Joined: 09/08/2012
Groups: None

I'm quite sure it is a client side issue. I had a similar issue but local to my machine.

Did you make the change indicated here : http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic...

I initially had : set NS_NAME=ns_1@localhost. This did not work for me.
I switched to : set NS_NAME=ns_1@127.0.0.1 and this did work.

Client/Server

Windows 7 x64
64Bit Couch
.net 4.5
VS 2012

The following test passes for me

[Test]
public void VerifySetGetDelete()
{

var uri = new Uri(@"http://127.0.0.1:8091/pools/default");
var config = new CouchbaseClientConfiguration();
config.Bucket = @"default";
config.BucketPassword = @"";
config.Urls.Add(uri);

var couch = new CouchbaseClient(config);
var setResult = couch.ExecuteStore(StoreMode.Set, "this", "that");

Assert.IsTrue(setResult.Success);
var getResult = couch.ExecuteGet("this");
Assert.IsTrue(getResult.Success);
Assert.IsTrue(getResult.HasValue);
Assert.AreEqual("that", getResult.Value);

var deleteResult = couch.ExecuteRemove("this");
Assert.IsTrue(deleteResult.Success);

}

Top
  • Login or register to post comments
Sat, 09/08/2012 - 19:39
dangdinhquan
Offline
Joined: 09/07/2012
Groups: None

hi bearrito,

I've tried your solution in both ns_1@127.0.0.1 and ns_1@my_server_public_ip but still unable to store or get data.

bearrito wrote:
I'm quite sure it is a client side issue. I had a similar issue but local to my machine.

Did you make the change indicated here : http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic...

I initially had : set NS_NAME=ns_1@localhost. This did not work for me.
I switched to : set NS_NAME=ns_1@127.0.0.1 and this did work.

Client/Server

Windows 7 x64
64Bit Couch
.net 4.5
VS 2012

The following test passes for me

[Test]
public void VerifySetGetDelete()
{

var uri = new Uri(@"http://127.0.0.1:8091/pools/default");
var config = new CouchbaseClientConfiguration();
config.Bucket = @"default";
config.BucketPassword = @"";
config.Urls.Add(uri);

var couch = new CouchbaseClient(config);
var setResult = couch.ExecuteStore(StoreMode.Set, "this", "that");

Assert.IsTrue(setResult.Success);
var getResult = couch.ExecuteGet("this");
Assert.IsTrue(getResult.Success);
Assert.IsTrue(getResult.HasValue);
Assert.AreEqual("that", getResult.Value);

var deleteResult = couch.ExecuteRemove("this");
Assert.IsTrue(deleteResult.Success);

}

Top
  • Login or register to post comments
Sat, 09/08/2012 - 20:19
bearrito
Offline
Joined: 09/08/2012
Groups: None

I'll try setting up CouchBase on my ubuntu server and see if my .net client has any issues.

Can you contact the server at all. Are you able to telnet and issue commands?

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