java.lang.RuntimeException: java.util.concurrent.TimeoutException

Couchbase JIRA | Arun Gupta | 9 months ago
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Start Docker container as: {noformat} docker run -p 8091-8093:8091-8093 couchbase/server:sandbox {noformat} Use the following code to connect to the server: {code} package org.example.pipeline; import; import; import; /** * @arungupta */ public class Main { public static void main(String[] args) { Bucket bucket = Database.getBucket("travel-sample"); JsonObject jsonObject = JsonObject.create(); jsonObject.put("isbn", "978-1-4919-1889-0"); jsonObject.put("name", "Minecraft Modding with Forge"); jsonObject.put("cost", "29.99"); JsonDocument document = JsonDocument.create("minecraft", jsonObject); bucket.upsert(document); JsonDocument doc = bucket.get("minecraft"); System.out.println(doc.content()); System.out.println("Hello World!"); } } {code} is: {code} package org.example.pipeline; import; import; import; import; /** * @author arungupta */ public class Database { static CouchbaseCluster cluster; static Bucket bucket; public static final CouchbaseCluster getCluster() { if (null == cluster) { CouchbaseEnvironment env = DefaultCouchbaseEnvironment.builder() .connectTimeout(10000) //10000ms = 10s, default is 5s .build(); cluster = CouchbaseCluster.create(env, "localhost"); } return cluster; } public static Bucket getBucket(String bucketName) { if (null == bucket) { bucket = getCluster().openBucket(bucketName); } return bucket; } } {code} This is consistently throwing the following error: {noformat} Aug 26, 2016 10:57:32 PM com.couchbase.client.core.CouchbaseCore <init> INFO: CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile='null', sslKeystorePassword=false, sslKeystore=null, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=4, computationPoolSize=4, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1, viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-java-client/2.3.1 (git: 2.3.1, core: 1.3.1), dcpEnabled=false, retryStrategy=BestEffort, maxRequestLifetime=75000, retryDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=100, upper=100000}, reconnectDelay=ExponentialDelay{growBy 1.0 MILLISECONDS, powers of 2; lower=32, upper=4096}, observeIntervalDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=10, upper=100000}, keepAliveInterval=30000, autoreleaseAfter=2000, bufferPoolingEnabled=true, 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@45c8e616, queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=10000, dnsSrvEnabled=false} Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.TimeoutException at at at at at at org.example.pipeline.Database.getBucket( at org.example.pipeline.Main.main( Caused by: java.util.concurrent.TimeoutException ... 7 more {noformat} This is a basic Java sample and should work. Complete workspace is at: The error reporting is not helpful at all. This may be related to

    Couchbase JIRA | 9 months ago | Arun Gupta
    java.lang.RuntimeException: java.util.concurrent.TimeoutException
  2. 0

    Unable to connect to DB - java.util.concurrent.TimeoutException - Java SDK - Couchbase Forums | 3 months ago
    java.lang.RuntimeException: java.util.concurrent.TimeoutException
  3. 0

    Couchbase connection timeout with Java SDK

    Stack Overflow | 2 years ago | Shinline
    java.lang.RuntimeException: java.util.concurrent.TimeoutException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    couchbase connection time out with java sdk - BlogoSfera | 2 years ago
    java.lang.RuntimeException: java.util.concurrent.TimeoutException
  6. 0

    nosql - Couchbase connection timeout with Java SDK - Stack Overflow | 2 years ago
    java.lang.RuntimeException: java.util.concurrent.TimeoutException

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.util.concurrent.TimeoutException

      No message provided

    2. com.couchbase.client
      5 frames
    3. org.example.pipeline
      1. org.example.pipeline.Database.getBucket(
      2. org.example.pipeline.Main.main(
      2 frames