STS4:无法在调试模式下连接到Couchbase

时间:2019-08-16 05:51:43

标签: eclipse spring-boot couchbase spring-data-couchbase

我正在尝试在STS 4(版本:4.2.2.RELEASE)中调试我的spring boot应用程序,但是该应用程序无法在调试模式下启动。

似乎无法连接到benchbase服务器。

当我在运行模式下运行应用程序时,令我惊讶的是,它运行得很好。我尝试在运行模式下多次运行它,并且每次应用程序启动时都没有任何麻烦。

我也已经完成了telnet,并且我的系统的连接已经可以通过长沙发服务器进行了(尽管很明显,否则在运行模式下也会出现异常)

############# CouchBase Config ##############
couch.operationTimeout: 1000000
couch.connectionTimeout: 360000
couch.kvServiceEndPoints: 110
couch.ioPoolSize: 121
couch.keepAliveInterval: 1500
couch.computationPoolSize: 7
couch.cbEnvBufferPoolEnabled: false
couch.retryDelayLowerLimitInMicroSec: 1000
couch.retryDelayUpperLimitInMicroSec: 100000
couch.reconnectDelayLowerLimitInMilliSec: 132000
couch.reconnectDelayUpperLimitInMilliSec: 4096000
couch.connectionRetryCount: 5


public CacheManager cacheManager() {

        String bucketName = applicationConfig.getBucketName();
        String bucketPassword = applicationConfig.getBucketPassword();
        List<String> couchNodes = applicationConfig.getCouchNodes();
        int connectionTimeout = applicationConfig.getConnectionTimeout();
        int kvServiceEndpoints = applicationConfig.getKvServiceEndPoints();
        int ioPoolSize = applicationConfig.getIoPoolSize();
        int keepAliveInterval = applicationConfig.getKeepAliveInterval();
        int computationPoolSize = applicationConfig.getComputationPoolSize();


        DefaultCouchbaseEnvironment build = DefaultCouchbaseEnvironment.builder().kvEndpoints(kvServiceEndpoints).bufferPoolingEnabled(false)
                .ioPoolSize(ioPoolSize).computationPoolSize(computationPoolSize)
                .connectTimeout(connectionTimeout)
                .keepAliveInterval(keepAliveInterval * 1000)
                .bufferPoolingEnabled(applicationConfig.isCbEnvBufferPoolEnabled())
                .reconnectDelay(Delay.exponential(TimeUnit.MILLISECONDS,
                        applicationConfig.getReconnectDelayUpperLimitInMilliSec(),
                        applicationConfig.getReconnectDelayLowerLimitInMilliSec()))
                .retryDelay(Delay.exponential(TimeUnit.MICROSECONDS,
                        applicationConfig.getRetryDelayUpperLimitInMicroSec(),
                        applicationConfig.getRetryDelayLowerLimitInMicroSec()))
                .retryStrategy(BestEffortRetryStrategy.INSTANCE).build();



        CouchbaseCluster cluster = CouchbaseCluster.create(build, couchNodes);
        Bucket bucket = cluster.openBucket(bucketName,bucketPassword);

    }
}  

以下是我尝试以调试模式启动应用程序时的日志。

2019-08-16 10:55:55.140  INFO 21538 --- [           main] com.couchbase.client.core.CouchbaseCore  : CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile='null', sslKeystorePassword=false, sslKeystore=null, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=121, computationPoolSize=7, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=110, viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, memcachedHashingStrategy=DefaultMemcachedHashingStrategy, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-java-client/2.3.7 (git: 2.3.7, core: 1.3.7-dirty), dcpEnabled=false, retryStrategy=BestEffort, maxRequestLifetime=75000, retryDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=1000, upper=100000}, reconnectDelay=ExponentialDelay{growBy 1.0 MILLISECONDS, powers of 2; lower=132000, upper=4096000}, observeIntervalDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=10, upper=100000}, keepAliveInterval=1500000, autoreleaseAfter=2000, bufferPoolingEnabled=false, tcpNodelayEnabled=true, mutationTokensEnabled=false, socketConnectTimeout=1000, dcpConnectionBufferSize=20971520, dcpConnectionBufferAckThreshold=0.2, dcpConnectionName=dcp/core-io, callbacksOnIoPool=false, disconnectTimeout=25000, requestBufferWaitStrategy=com.couchbase.client.core.env.DefaultCoreEnvironment$2@7c089fbc, queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=360000, dnsSrvEnabled=false}
        2019-08-16 10:55:58.869  WARN 21538 --- [tionScheduler-1] c.c.client.core.endpoint.Endpoint        : [null][KeyValueEndpoint]: Socket connect took longer than specified timeout.   

2019-08-16 10:56:03.800  WARN 21538 --- [tionScheduler-6] c.c.client.core.endpoint.Endpoint        : Error during reconnect: 
        com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: Connect callback did not return, hit safeguarding timeout.
            at com.couchbase.client.core.endpoint.AbstractEndpoint$3.call(AbstractEndpoint.java:317)
            at com.couchbase.client.core.endpoint.AbstractEndpoint$3.call(AbstractEndpoint.java:310)
            at rx.internal.operators.SingleOperatorOnErrorResumeNext$2.onError(SingleOperatorOnErrorResumeNext.java:69)
            at rx.Single$18.onError(Single.java:1883)
            at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:152)
            at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
            at rx.observers.SerializedObserver.onError(SerializedObserver.java:153)
            at rx.observers.SerializedSubscriber.onError(SerializedSubscriber.java:78)
            at rx.internal.operators.OperatorTimeoutBase$TimeoutSubscriber$1.onError(OperatorTimeoutBase.java:187)
            at rx.Single$1$1.onError(Single.java:85)
            at rx.Single$3.call(Single.java:505)
            at rx.Single$3.call(Single.java:501)
            at rx.Single$1.call(Single.java:90)
            at rx.Single$1.call(Single.java:70)
            at rx.Observable.unsafeSubscribe(Observable.java:9861)
            at rx.internal.operators.OperatorTimeoutBase$TimeoutSubscriber.onTimeout(OperatorTimeoutBase.java:200)
            at rx.internal.operators.OperatorTimeout$1$1.call(OperatorTimeout.java:41)
            at rx.internal.schedulers.EventLoopsScheduler$EventLoopWorker$2.call(EventLoopsScheduler.java:189)
            at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
2019-08-16 10:56:03.814  WARN 21538 --- [tionScheduler-6] c.c.client.core.endpoint.Endpoint        : [null][KeyValueEndpoint]: Could not connect to endpoint, retrying with delay 132000 MILLISECONDS: 
        com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: Connect callback did not return, hit safeguarding timeout.
            at com.couchbase.client.core.endpoint.AbstractEndpoint$3.call(AbstractEndpoint.java:317)

0 个答案:

没有答案