Just getting it working

Help!

I’m just getting started, and I so confused.
I have the couchbase server running on my mac.
Both sample buckets are present, as is the default bucket.
The admin portal comes up just fine.

I can put urls into my browser like:
localhost:8091/pools/default/buckets
and I see the json response just fine.

Yet I cannot get any of the java clients to connect, nor the curl commands.

./cbworkloadgen -n localhost:8091
2015-03-26 10:40:11,101: mt skipping bucket that is not a couchbase-bucket: default
error: missing bucket-destination: default at destination: localhost:8091; perhaps your username/password is missing or incorrect

cbworkloadgen -n localhost:8091 -u Administrator -p password
2015-03-26 10:40:47,631: mt skipping bucket that is not a couchbase-bucket: default
error: missing bucket-destination: default at destination: localhost:8091; perhaps your username/password is missing or incorrect

And using the java Couchbase client does this:

ArrayList nodes = new ArrayList();
nodes.add(URI.create(“http://localhost:8091/pools”));
CouchbaseClient client = new CouchbaseClient(nodes, “default”, “”);

2015-03-26 10:19:29.298 INFO com.couchbase.client.CouchbaseMemcachedConnection: Added {QA sa=/127.0.0.1:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2015-03-26 10:19:29.303 INFO com.couchbase.client.CouchbaseClient: CouchbaseConnectionFactory{bucket=‘default’, nodes=[http://localhost:8091/pools], order=RANDOM, opTimeout=2500, opQueue=16384, opQueueBlockTime=10000, obsPollInt=10, obsPollMax=500, obsTimeout=5000, viewConns=10, viewTimeout=75000, viewWorkers=1, configCheck=10, reconnectInt=1100, failureMode=Redistribute, hashAlgo=NATIVE_HASH, authWaitTime=2500}
2015-03-26 10:19:29.303 INFO com.couchbase.client.CouchbaseMemcachedConnection: Reconnecting due to failure to connect to {QA sa=/127.0.0.1:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
2015-03-26 10:19:29.303 INFO com.couchbase.client.CouchbaseClient: viewmode property isn’t defined. Setting viewmode to production mode
java.net.ConnectException: Connection refused

I don’t have a firewall running.

What am I missing?
(I had to remove the “http://” bits from above in order to make this post.)

hi @jwindberg,
did you set a password on the bucket default and/or check memcached when creating it?
can you please provide the output of http://localhost:8091/pools/default/ and http://localhost:8091/pools/default/buckets ?

I did not intentionally set a bucket password. Not even sure how.

this is default:

{
storageTotals: {
ram: {
total: 6521278464,
quotaTotal: 2862612480,
quotaUsed: 2862612480,
used: 5396516864,
usedByData: 0,
quotaUsedPerNode: 2862612480,
quotaTotalPerNode: 2862612480
},
hdd: {
total: 749812400128,
quotaTotal: 749812400128,
used: 74981240012,
usedByData: 0,
free: 674831160116
}
},
serverGroupsUri: “/pools/default/serverGroups?v=52184775”,
name: “default”,
alerts: [ ],
alertsSilenceURL: “/controller/resetAlerts?token=0&uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
nodes: [
{
systemStats: {
cpu_utilization_rate: 8.930817610062894,
swap_total: 1073741824,
swap_used: 2621440,
mem_total: 8589934592,
mem_free: 2519445504
},
interestingStats: { },
uptime: “3589”,
memoryTotal: 8589934592,
memoryFree: 2519445504,
mcdMemoryReserved: 6553,
mcdMemoryAllocated: 6553,
couchApiBase: “http://127.0.0.1:8092/”,
otpCookie: “fxpejhrzpiedojvj”,
clusterMembership: “active”,
recoveryType: “none”,
status: “warmup”,
otpNode: "ns_1@127.0.0.1",
thisNode: true,
hostname: “127.0.0.1:8091”,
clusterCompatibility: 196608,
version: “3.0.2-1603-rel-enterprise”,
os: “x86_64-apple-darwin10.8.0”,
ports: {
sslProxy: 11214,
httpsMgmt: 18091,
httpsCAPI: 18092,
proxy: 11211,
direct: 11210
}
}
],
buckets: {
uri: “/pools/default/buckets?v=93166089&uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
terseBucketsBase: “/pools/default/b/”,
terseStreamingBucketsBase: “/pools/default/bs/”
},
remoteClusters: {
uri: “/pools/default/remoteClusters?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
validateURI: “/pools/default/remoteClusters?just_validate=1”
},
controllers: {
addNode: {
uri: “/controller/addNode?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
rebalance: {
uri: “/controller/rebalance?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
failOver: {
uri: “/controller/failOver?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
startGracefulFailover: {
uri: “/controller/startGracefulFailover?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
reAddNode: {
uri: “/controller/reAddNode?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
reFailOver: {
uri: “/controller/reFailOver?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
ejectNode: {
uri: “/controller/ejectNode?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
setRecoveryType: {
uri: “/controller/setRecoveryType?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
setAutoCompaction: {
uri: “/controller/setAutoCompaction?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
validateURI: “/controller/setAutoCompaction?just_validate=1”
},
clusterLogsCollection: {
startURI: “/controller/startLogsCollection?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
cancelURI: “/controller/cancelLogsCollection?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”
},
replication: {
createURI: “/controller/createReplication?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
validateURI: “/controller/createReplication?just_validate=1”
},
setFastWarmup: {
uri: “/controller/setFastWarmup?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
validateURI: “/controller/setFastWarmup?just_validate=1”
}
},
rebalanceStatus: “none”,
rebalanceProgressUri: “/pools/default/rebalanceProgress”,
stopRebalanceUri: “/controller/stopRebalance?uuid=915ee968d3ec9ca78fc9f8862ec75f6e”,
nodeStatusesUri: “/nodeStatuses”,
maxBucketCount: 20,
autoCompactionSettings: {
parallelDBAndViewCompaction: false,
databaseFragmentationThreshold: {
percentage: 30,
size: “undefined”
},
viewFragmentationThreshold: {
percentage: 30,
size: “undefined”
}
},
fastWarmupSettings: {
fastWarmupEnabled: true,
minMemoryThreshold: 10,
minItemsThreshold: 10
},
tasks: {
uri: “/pools/default/tasks?v=50267926”
},
visualSettingsUri: “/internalSettings/visual?v=7111573”,
counters: {
rebalance_fail: 1,
rebalance_start: 1
}
}

Here is buckets:
[
{
“name”: “beer-sample”,
“bucketType”: “membase”,
“authType”: “sasl”,
“saslPassword”: “”,
“proxyPort”: 0,
“replicaIndex”: false,
“uri”: “/pools/default/buckets/beer-sample?bucket_uuid=0b67648d8ec4ec9dec52e7ed3a007a9b”,
“streamingUri”: “/pools/default/bucketsStreaming/beer-sample?bucket_uuid=0b67648d8ec4ec9dec52e7ed3a007a9b”,
“localRandomKeyUri”: “/pools/default/buckets/beer-sample/localRandomKey”,
“controllers”: {
“compactAll”: “/pools/default/buckets/beer-sample/controller/compactBucket”,
“compactDB”: “/pools/default/buckets/default/controller/compactDatabases”,
“purgeDeletes”: “/pools/default/buckets/beer-sample/controller/unsafePurgeBucket”,
“startRecovery”: “/pools/default/buckets/beer-sample/controller/startRecovery”
},
“nodes”: [
{
“systemStats”: {
“cpu_utilization_rate”: 8.646616541353383,
“swap_total”: 1073741824,
“swap_used”: 2621440,
“mem_total”: 8589934592,
“mem_free”: 2568482816
},
“interestingStats”: {},
“uptime”: “3618”,
“memoryTotal”: 8589934592,
“memoryFree”: 2568482816,
“mcdMemoryReserved”: 6553,
“mcdMemoryAllocated”: 6553,
“replication”: 0,
“clusterMembership”: “active”,
“recoveryType”: “none”,
“status”: “warmup”,
“otpNode”: "ns_1@127.0.0.1",
“thisNode”: true,
“hostname”: “127.0.0.1:8091”,
“clusterCompatibility”: 196608,
“version”: “3.0.2-1603-rel-enterprise”,
“os”: “x86_64-apple-darwin10.8.0”,
“ports”: {
“sslProxy”: 11214,
“httpsMgmt”: 18091,
“httpsCAPI”: 18092,
“proxy”: 11211,
“direct”: 11210
}
}
],
“stats”: {
“uri”: “/pools/default/buckets/beer-sample/stats”,
“directoryURI”: “/pools/default/buckets/beer-sample/statsDirectory”,
“nodeStatsListURI”: “/pools/default/buckets/beer-sample/nodes”
},
“ddocs”: {
“uri”: “/pools/default/buckets/beer-sample/ddocs”
},
“nodeLocator”: “vbucket”,
“fastWarmupSettings”: false,
“autoCompactionSettings”: false,
“uuid”: “0b67648d8ec4ec9dec52e7ed3a007a9b”,
“vBucketServerMap”: {
“hashAlgorithm”: “CRC”,
“numReplicas”: 1,
“serverList”: [
“127.0.0.1:11210”
],
“vBucketMap”: []
},
“replicaNumber”: 1,
“threadsNumber”: 3,
“quota”: {
“ram”: 104857600,
“rawRAM”: 104857600
},
“basicStats”: {
“quotaPercentUsed”: 0,
“opsPerSec”: 0,
“diskFetches”: 0,
“itemCount”: 0,
“diskUsed”: 0,
“dataUsed”: 0,
“memUsed”: 0
},
“evictionPolicy”: “valueOnly”,
“bucketCapabilitiesVer”: “”,
“bucketCapabilities”: [
“cbhello”,
“touch”,
“couchapi”,
“cccp”,
“xdcrCheckpointing”,
“nodesExt”
]
},
{
“name”: “default”,
“bucketType”: “memcached”,
“authType”: “sasl”,
“saslPassword”: “”,
“proxyPort”: 0,
“replicaIndex”: true,
“uri”: “/pools/default/buckets/default?bucket_uuid=c410c5a08062169697e9bb10f5bf645e”,
“streamingUri”: “/pools/default/bucketsStreaming/default?bucket_uuid=c410c5a08062169697e9bb10f5bf645e”,
“localRandomKeyUri”: “/pools/default/buckets/default/localRandomKey”,
“controllers”: {
“flush”: “/pools/default/buckets/default/controller/doFlush”,
“compactAll”: “/pools/default/buckets/default/controller/compactBucket”,
“compactDB”: “/pools/default/buckets/default/controller/compactDatabases”,
“purgeDeletes”: “/pools/default/buckets/default/controller/unsafePurgeBucket”,
“startRecovery”: “/pools/default/buckets/default/controller/startRecovery”
},
“nodes”: [
{
“systemStats”: {
“cpu_utilization_rate”: 8.646616541353383,
“swap_total”: 1073741824,
“swap_used”: 2621440,
“mem_total”: 8589934592,
“mem_free”: 2568482816
},
“interestingStats”: {},
“uptime”: “3618”,
“memoryTotal”: 8589934592,
“memoryFree”: 2568482816,
“mcdMemoryReserved”: 6553,
“mcdMemoryAllocated”: 6553,
“replication”: 0,
“clusterMembership”: “active”,
“recoveryType”: “none”,
“status”: “warmup”,
“otpNode”: "ns_1@127.0.0.1",
“thisNode”: true,
“hostname”: “127.0.0.1:8091”,
“clusterCompatibility”: 196608,
“version”: “3.0.2-1603-rel-enterprise”,
“os”: “x86_64-apple-darwin10.8.0”,
“ports”: {
“sslProxy”: 11214,
“httpsMgmt”: 18091,
“httpsCAPI”: 18092,
“proxy”: 11211,
“direct”: 11210
}
}
],
“stats”: {
“uri”: “/pools/default/buckets/default/stats”,
“directoryURI”: “/pools/default/buckets/default/statsDirectory”,
“nodeStatsListURI”: “/pools/default/buckets/default/nodes”
},
“ddocs”: {
“uri”: “/pools/default/buckets/default/ddocs”
},
“nodeLocator”: “ketama”,
“fastWarmupSettings”: false,
“autoCompactionSettings”: false,
“uuid”: “c410c5a08062169697e9bb10f5bf645e”,
“replicaNumber”: 0,
“threadsNumber”: 3,
“quota”: {
“ram”: 2652897280,
“rawRAM”: 2652897280
},
“basicStats”: {
“quotaPercentUsed”: 0,
“opsPerSec”: 0,
“hitRatio”: 0,
“itemCount”: 0,
“memUsed”: 0
},
“evictionPolicy”: “valueOnly”,
“bucketCapabilitiesVer”: “”,
“bucketCapabilities”: [
“cbhello”,
“nodesExt”
]
},
{
“name”: “gamesim-sample”,
“bucketType”: “membase”,
“authType”: “sasl”,
“saslPassword”: “”,
“proxyPort”: 0,
“replicaIndex”: false,
“uri”: “/pools/default/buckets/gamesim-sample?bucket_uuid=b78b7267f6d9bcbef5f2b14a6c0a7f62”,
“streamingUri”: “/pools/default/bucketsStreaming/gamesim-sample?bucket_uuid=b78b7267f6d9bcbef5f2b14a6c0a7f62”,
“localRandomKeyUri”: “/pools/default/buckets/gamesim-sample/localRandomKey”,
“controllers”: {
“compactAll”: “/pools/default/buckets/gamesim-sample/controller/compactBucket”,
“compactDB”: “/pools/default/buckets/default/controller/compactDatabases”,
“purgeDeletes”: “/pools/default/buckets/gamesim-sample/controller/unsafePurgeBucket”,
“startRecovery”: “/pools/default/buckets/gamesim-sample/controller/startRecovery”
},
“nodes”: [
{
“systemStats”: {
“cpu_utilization_rate”: 8.646616541353383,
“swap_total”: 1073741824,
“swap_used”: 2621440,
“mem_total”: 8589934592,
“mem_free”: 2568482816
},
“interestingStats”: {},
“uptime”: “3618”,
“memoryTotal”: 8589934592,
“memoryFree”: 2568482816,
“mcdMemoryReserved”: 6553,
“mcdMemoryAllocated”: 6553,
“replication”: 0,
“clusterMembership”: “active”,
“recoveryType”: “none”,
“status”: “warmup”,
“otpNode”: "ns_1@127.0.0.1",
“thisNode”: true,
“hostname”: “127.0.0.1:8091”,
“clusterCompatibility”: 196608,
“version”: “3.0.2-1603-rel-enterprise”,
“os”: “x86_64-apple-darwin10.8.0”,
“ports”: {
“sslProxy”: 11214,
“httpsMgmt”: 18091,
“httpsCAPI”: 18092,
“proxy”: 11211,
“direct”: 11210
}
}
],
“stats”: {
“uri”: “/pools/default/buckets/gamesim-sample/stats”,
“directoryURI”: “/pools/default/buckets/gamesim-sample/statsDirectory”,
“nodeStatsListURI”: “/pools/default/buckets/gamesim-sample/nodes”
},
“ddocs”: {
“uri”: “/pools/default/buckets/gamesim-sample/ddocs”
},
“nodeLocator”: “vbucket”,
“fastWarmupSettings”: false,
“autoCompactionSettings”: false,
“uuid”: “b78b7267f6d9bcbef5f2b14a6c0a7f62”,
“vBucketServerMap”: {
“hashAlgorithm”: “CRC”,
“numReplicas”: 1,
“serverList”: [
“127.0.0.1:11210”
],
“vBucketMap”: []
},
“replicaNumber”: 1,
“threadsNumber”: 3,
“quota”: {
“ram”: 104857600,
“rawRAM”: 104857600
},
“basicStats”: {
“quotaPercentUsed”: 0,
“opsPerSec”: 0,
“diskFetches”: 0,
“itemCount”: 0,
“diskUsed”: 0,
“dataUsed”: 0,
“memUsed”: 0
},
“evictionPolicy”: “valueOnly”,
“bucketCapabilitiesVer”: “”,
“bucketCapabilities”: [
“cbhello”,
“touch”,
“couchapi”,
“cccp”,
“xdcrCheckpointing”,
“nodesExt”
]
}
]

Oh, and yes, I did check memcache.
When I bring up buckets in the admin console I get two zones.
Couchbase Buckets - with two buckets
beer-sample
gamesim-sample

and

Memcahced Buckets - with one bucket
default

in the json the buckets are still in a warmup status… do you see anything in the web admin console, on server nodes tab? (unless you had just restarted the server/service prior to copying the json output?)

(there may be a red warning mentioning that at least two servers are needed for failover but since you’re on your development machine you can ignore that).

I see the red triangle and fail over warning: At least two servers are required to provide replication!

And then I see
120.0.0.1 PEND (yellow square) Group 1

Not really much more than that.
I do see that status:warmup in the json, but nothing meaningful on the servers tab.

Active Servers
Pending Rebalance
Server Node Name Group RAM Usage Swap Usage CPU Usage Data/Disk Usage Items (Active / Replica)
127.0.0.1
Group 1
67.8%
0.244%
8.25% N/A 0/
0

I have stopped and started the thing a few times.
But after an hour or so, it ought get out of warmup mode should it not?

yeah it should get out of warmup mode even in a few seconds/couple of minutes tops, that’s pretty strange…

Well that’s interesting.
I deleted my local ~/Library/Application Support/Couchbase folder
restarted the server, which meant doing through its setup again.
Selected both sample buckets, switching the default bucket to membased

The server went into healthy mode right away, and the client work just fine.
The circle next to the buckets shows as green instead of yellow.
Guess that was the one sign in the UI that I did not know to look for to tell me the server wasn’t happy.

Thanks for the diagnostic assistance!

@jwindberg glad this is resolved :sunny: , this was just what I was going to suggest, some mishap during installation :smile: