Hi,
I’m trying to use the following .net console app for testing, but it seems to take about 50 seconds to connect and the result is empty, although the view seems to work in the web console:
var config = new ClientConfiguration();
config.Servers = new List<Uri>(){new Uri("http://MY PUBLIC IP:8091/pools")};
//config.ApiPort = 8091; ??????
//config.DirectPort = 8091; ??????
using (var _cluster = new Cluster(config))
{
using (var bucket = _cluster.OpenBucket("MY BUCKET NAME", "MY PASS"))
{
var document = bucket.GetDocument<Object>("20b948ad-2807-4f0c-8b10-179f93a07b12");
Console.Write(document.ToString());
///here the document is null and I get the exception
The node MY PUBLIC IP:11210 that the key was mapped to is either down or unreachable. The SDK will continue to try to connect every 1000 seconds. Until it can connect every operation routed to it will fail with this exception
var query = bucket.CreateQuery("CataDesign", "NrInregistrareAn").Limit(50);
var result = bucket.Query<dynamic>(query);
foreach (var row in result.Rows)
{
///result.Rows = 0
Console.WriteLine(row);
}
}
_cluster.Dispose();
}
If it matters - the database on the couchbase server was created as a mean for replication between mobile clients (couchbase lite) and I’m trying now to query this database from the server. The replication works ok and I can create a new development and production (using the web consoled) view that display sample data.
- server: 3.0.1 Community Edition (build-1444)
- .net client: 2.1.1.0
My questions:
- should I change the ports (ApiPort and DirectPort) from their defaults?
- what ports should be opened in the firewall (I can already access the web console on port 8091 using my public IP)
Thank you,
Catalin