ERROR Couchbase.CouchbasePool


#1

Hello!
I’m trying to connect the Couchbase Server Enterprise 3.0.1 through 1.3.9 SDK version CouchBaseNetClient.
I’ve tried the AWS (Amazon EC2) with Windows 2008 Server and also Windows 2003 server itself.

I’m using Visual Studio 2010 C#.Net with Windows Vista to develop the application.
I researched what I could on the internet and could not solve! Already I disabled A / V, Firewall, Spyware, etc. And nothing!

At the time I created another machine with Ubuntu Linux 64 bits 12:04 and installed Couchbase Server for Ubuntu Enterprise and nothing!
The only thing I did was use the Client SDK CouchBaseNet version 2.0.0 beta, it only runs on Visual Studio 2012 on Windows 7 and at least!

Can anyone help looking at my log and source code?

APP.CONFIG

<configuration>
  
  <configSections>
    <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase" />
    <sectionGroup name="enyim.com">
      <section name="log" type="Enyim.Caching.Configuration.LoggerSection, Enyim.Caching" />
    </sectionGroup>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  
  <couchbase>
    <servers bucket="nossoguia" bucketPassword="">
      <add uri="http://201.41.61.210:8091/pools" />
    </servers>
  </couchbase>

  <enyim.com>
    <log factory="Enyim.Caching.Log4NetFactory, Enyim.Caching.Log4NetAdapter" />
  </enyim.com>

  <log4net debug="false">
    <appender name="LogFileAppender" type="log4net.Appender.FileAppender,log4net">
      <param name="File" value="c:\\temp\\error-log.txt" />
      <param name="AppendToFile" value="true" />
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
      </layout>
    </appender>
    <root>
      <priority value="ALL" />
      <level value="DEBUG" />
      <appender-ref ref="LogFileAppender" />
    </root>
  </log4net>
  
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
</configuration>

CSHARP.Net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Couchbase;
using Enyim.Caching.Memcached;
using Newtonsoft.Json;
using System.Data.SqlClient;
using System.Data;
using Couchbase.Configuration;


namespace CouchBase
{
    class Program
    {


        static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            string connectionStringSql = @"Data Source=note_julio\sqlexpress,1433;Initial Catalog=guia;Persist Security Info=True;User ID=sa;Password=10602126944;Pooling=False";

            var config = new CouchbaseClientConfiguration();
            config.Urls.Add(new Uri("http://201.41.61.210:8091/pools"));
            config.Bucket = "nossoguia";
            config.BucketPassword = "";

            var client = new CouchbaseClient(config);

LOG4NET

2014-11-05 11:48:16,833 [8] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Initializing Couchbase.CouchbasePool
2014-11-05 11:48:16,903 [8] WARN  Enyim.Caching.MemcachedClient [(null)] <(null)> - Creating new client. CID: a360ecae-29df-4501-a78a-6d036bc02161 CouchbaseClient
2014-11-05 11:48:16,906 [8] WARN  Couchbase.CouchbasePool [(null)] <(null)> - Starting Couchbase.CouchbasePool
2014-11-05 11:48:16,952 [8] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Starting the listener. Queue=True
2014-11-05 11:48:16,955 [9] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Started working.
2014-11-05 11:48:16,964 [9] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Looking for the first working node.
2014-11-05 11:48:17,913 [9] DEBUG Couchbase.ConfigHelper [(null)] <(null)> - Found config for bucket nossoguia.
2014-11-05 11:48:17,914 [9] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Resolved pool url http://201.41.61.210:8091/pools to http://201.41.61.210:8091/pools/default/bucketsStreaming/nossoguia?bucket_uuid=de88c89bef403b147dff98b555054d1a
2014-11-05 11:48:17,915 [9] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Start receiving messages.
2014-11-05 11:48:18,282 [9] INFO  Couchbase.CouchbasePool [(null)] <(null)> - Received new configuration.
2014-11-05 11:48:18,316 [cbp_thread] INFO  Couchbase.CouchbasePool [(null)] <(null)> - Has vbucket. Server count: 1
2014-11-05 11:48:18,341 [cbp_thread] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Found address 192.168.1.8 for 192.168.1.8
2014-11-05 11:48:18,343 [cbp_thread] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Using address 192.168.1.8 for 192.168.1.8
2014-11-05 11:48:18,344 [cbp_thread] WARN  Couchbase.CouchbasePool [(null)] <(null)> - Creating node Couchbase.CouchbasePool
2014-11-05 11:48:18,358 [cbp_thread] DEBUG Couchbase.SocketPool [(null)] <(null)> - PreAllocating 10 sockets on 192.168.1.8:11210
2014-11-05 11:48:18,361 [cbp_thread] DEBUG Couchbase.SocketPool [(null)] <(null)> - Creating a socket on 192.168.1.8:11210
2014-11-05 11:48:28,093 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Pinging current node 'http://201.41.61.210:8091/pools' to check if it's still alive.
2014-11-05 11:48:28,093 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Trying 'http://201.41.61.210:8091/pools'
2014-11-05 11:48:28,293 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Node 'http://201.41.61.210:8091/pools' is OK
2014-11-05 11:48:38,294 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Pinging current node 'http://201.41.61.210:8091/pools' to check if it's still alive.
2014-11-05 11:48:38,295 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Trying 'http://201.41.61.210:8091/pools'
2014-11-05 11:48:38,520 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Node 'http://201.41.61.210:8091/pools' is OK
2014-11-05 11:48:39,399 [cbp_thread] ERROR Couchbase.CouchbasePool [(null)] <(null)> - Failed to initialize the pool.
System.Net.Sockets.SocketException (0x80004005): Uma tentativa de conexão falhou porque o componente conectado não respondeu
corretamente após um período de tempo ou a conexão estabelecida falhou
porque o host conectado não respondeu 192.168.1.8:11210
   em System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   em System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   em Couchbase.SocketPool.Create()
   em Couchbase.SocketPool.PreAllocate(Int32 capacity)
   em Couchbase.SocketPool..ctor(IMemcachedNode node, ISocketPoolConfiguration config, ISaslAuthenticationProvider provider)
   em Couchbase.CouchbaseNode..ctor(IPEndPoint endpoint, Uri couchApiBase, ICouchbaseClientConfiguration config, ISaslAuthenticationProvider provider)
   em Couchbase.CouchbasePool.CreateNode(IPEndPoint endpoint, ISaslAuthenticationProvider auth, Dictionary`2 nodeInfo)
   em Couchbase.CouchbasePool.InitVBucket(ClusterConfig config, ISaslAuthenticationProvider auth)
   em Couchbase.CouchbasePool.ReconfigurePool(ClusterConfig config)
2014-11-05 11:48:39,467 [cbp_thread] WARN  Couchbase.MessageStreamListener [(null)] <(null)> - Processing message: {"name":"nossoguia","bucketType":"membase","authType":"sasl","saslPassword":"","proxyPort":0,"replicaIndex":false,"uri":"/pools/default/buckets/nossoguia?bucket_uuid=de88c89bef403b147dff98b555054d1a","streamingUri":"/pools/default/bucketsStreaming/nossoguia?bucket_uuid=de88c89bef403b147dff98b555054d1a","localRandomKeyUri":"/pools/default/buckets/nossoguia/localRandomKey","controllers":{"compactAll":"/pools/default/buckets/nossoguia/controller/compactBucket","compactDB":"/pools/default/buckets/default/controller/compactDatabases","purgeDeletes":"/pools/default/buckets/nossoguia/controller/unsafePurgeBucket","startRecovery":"/pools/default/buckets/nossoguia/controller/startRecovery"},"nodes":[{"couchApiBaseHTTPS":"https://192.168.1.8:18092/nossoguia%2Bde88c89bef403b147dff98b555054d1a","couchApiBase":"http://192.168.1.8:8092/nossoguia%2Bde88c89bef403b147dff98b555054d1a","replication":1,"clusterMembership":"active","recoveryType":"none","status":"healthy","otpNode":"ns_1@127.0.0.1","thisNode":true,"hostname":"192.168.1.8:8091","clusterCompatibility":196608,"version":"3.0.1-1444-rel-enterprise","os":"x86_64-unknown-linux-gnu","ports":{"sslProxy":11214,"httpsMgmt":18091,"httpsCAPI":18092,"proxy":11211,"direct":11210}}],"stats":{"uri":"/pools/default/buckets/nossoguia/stats","directoryURI":"/pools/default/buckets/nossoguia/statsDirectory","nodeStatsListURI":"/pools/default/buckets/nossoguia/nodes"},"ddocs":{"uri":"/pools/default/buckets/nossoguia/ddocs"},"nodeLocator":"vbucket","fastWarmupSettings":false,"autoCompactionSettings":false,"uuid":"de88c89bef403b147dff98b555054d1a","vBucketServerMap":{"hashAlgorithm":"CRC","numReplicas":0,"serverList":["192.168.1.8:11210"],"vBucketMap":[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]},"bucketCapabilitiesVer":"","bucketCapabilities":["cbhello","touch","couchapi","cccp","xdcrCheckpointing","nodesExt"]}
2014-11-05 11:48:39,664 [2] INFO  Couchbase.SocketPool [(null)] <(null)> - Finalizing SocketPool
2014-11-05 11:48:39,671 [2] DEBUG Couchbase.SocketPool [(null)] <(null)> - Disposed 0 of 0 items.
2014-11-05 11:48:39,754 [8] INFO  Couchbase.CouchbaseClient [(null)] <(null)> - CID Config: a360ecae-29df-4501-a78a-6d036bc02161 {"DesignDocumentNameTransformer":{},"HttpClientFactory":{},"Bucket":"nossoguia","BucketPassword":"","Username":null,"Password":null,"Urls":["http://201.41.61.210:8091/pools"],"Credentials":null,"SocketPool":{"LingerTime":"00:00:10","LingerEnabled":false},"HeartbeatMonitor":{"Uri":"","Interval":10000,"Enabled":true},"HttpClient":{"InitializeConnection":true,"Timeout":"00:01:15"},"KeyTransformer":{},"NodeLocator":null,"NodeLocatorFactory":null,"Transcoder":{},"PerformanceMonitorFactory":null,"RetryCount":0,"RetryTimeout":"00:00:00","ObserveTimeout":"00:01:00","HttpRequestTimeout":"00:01:00","VBucketRetryCount":2,"ViewRetryCount":2}
2014-11-05 11:49:24,347 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Pinging current node 'http://201.41.61.210:8091/pools' to check if it's still alive.
2014-11-05 11:49:24,374 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Trying 'http://201.41.61.210:8091/pools'
2014-11-05 11:49:24,610 [10] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - HB: Node 'http://201.41.61.210:8091/pools' is OK

#2

Everything working!
The solution’s strange, but it worked!

I believe that is the solution to all who receive the message: Failed to initialize the pool.

My situation is that I need to access the Couchbase publicly on the web. My server is virtualized within the Citrix XenApp and has an invalid IP, but the internet has valid IP.
I set the NAT to port 8091 and apparently was working, but with the return: Failed to initialize the pool.

The solution: reinstall Couchbase with the name of my public domain server, eg office.alegrete.com.br BUT BEFORE INSERT ON FILE HOSTS THE FOLLOWING LINE: 127.0.0.1 office.alegrete.com.br

It just made everything worked!
Hopefully serve to someone!
Now just work!


#3

julio_albuquerque -

Very good to hear that you got this resolved and thanks for sharing your solution - note that the host file entry will be unique for each user/env though :wink:

Thanks,

Jeff