Unable to get/set data from Couchbase 1.8.1 Enterprise on Ubuntu
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.
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.
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);
}
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?
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);
}