0% found this document useful (0 votes)
139 views13 pages

Install CouchDB Server in Ubuntu 22.04

The document describes how to install Couchdb server on Ubuntu 22.04. It involves downloading the Couchdb package, installing it and resolving dependencies. Transparent huge pages and swappiness also need configuration for optimal performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views13 pages

Install CouchDB Server in Ubuntu 22.04

The document describes how to install Couchdb server on Ubuntu 22.04. It involves downloading the Couchdb package, installing it and resolving dependencies. Transparent huge pages and swappiness also need configuration for optimal performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Install Couchdb server in ubuntu 22.

04:

Download Couchdb server (via terminal):

ams@hamsathwani:/software$ curl -O https://packages.couchbase.com/releases/7.1.4/couchbase-


server-enterprise_7.1.4-ubuntu20.04_amd64.deb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 443M 100 443M 0 0 1595k 0 0:04:44 0:04:44 --:--:-- 2704k

Install Couchdb server:

ams@hamsathwani:/software$ sudo dpkg -i ./couchbase-server-enterprise_7.1.4-


ubuntu20.04_amd64.deb
[sudo] password for ams:
Selecting previously unselected package couchbase-server.
(Reading database ... 230733 files and directories currently installed.)
Preparing to unpack .../couchbase-server-enterprise_7.1.4-ubuntu20.04_amd64.deb ...
Warning: Transparent hugepages looks to be active and should not be.
Please look at https://docs.couchbase.com/server/7.1/install/thp-disable.html as for how to
PERMANENTLY alter this setting.
Warning: Swappiness is not set to 0.
Please look at https://docs.couchbase.com/server/7.1/install/install-swap-space.html as for how to
PERMANENTLY alter this setting.
Minimum RAM required : 4 GB
System RAM configured : 15.38 GB

Minimum number of processors required : 4 cores


Number of processors on the system : 4 cores
Unpacking couchbase-server (7.1.4-3601-1) ...
dpkg: dependency problems prevent configuration of couchbase-server:
couchbase-server depends on libtinfo5 (>= 6); however:
Package libtinfo5 is not installed.

dpkg: error processing package couchbase-server (--install):


dependency problems - leaving unconfigured
Errors were encountered while processing:
couchbase-server

Although libtinfo6 is already installed, Couchdb server requires only libtinfo5, it seems.
Below output confirms it.

ams@hamsathwani:/software$ sudo apt-get install libtinfo6


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libtinfo6 is already the newest version (6.3-2).
libtinfo6 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
couchbase-server : Depends: libtinfo5 (>= 6) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Install libtinfo5 dependency:

ams@hamsathwani:/software$ sudo apt-get --fix-broken install


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libtinfo5
The following NEW packages will be installed:
libtinfo5
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 99.2 kB of archives.
After this operation, 553 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libtinfo5 amd64 6.3-2 [99.2 kB]
Fetched 99.2 kB in 2s (41.2 kB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 241347 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.3-2_amd64.deb ...
Unpacking libtinfo5:amd64 (6.3-2) ...
Setting up libtinfo5:amd64 (6.3-2) ...
Setting up couchbase-server (7.1.4-3601-1) ...

You have successfully installed Couchbase Server.


Please browse to http://hamsathwani:8091/ to configure your server.
Refer to https://docs.couchbase.com for additional resources.

Please note that you have to update your firewall configuration to


allow external connections to a number of network ports for full
operation. Refer to the documentation for the current list:
https://docs.couchbase.com/server/7.1/install/install-ports.html

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

Created symlink /etc/systemd/system/multi-user.target.wants/couchbase-server.service →


/lib/systemd/system/couchbase-server.service.
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

To permanently disable Transparent hugepages (THP):

Edit the grub file and add the config ‘transparent_hugepage=never’ (highlighted in Red, below)
to the line starting with GRUB_CMDLINE_LINUX_DEFAULT= or
GRUB_CMDLINE_LINUX="".
ams@hamsathwani:~$ sudo gedit /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

GRUB_CMDLINE_LINUX_DEFAULT="transparent_hugepage=never quiet splash"


## Added 'transparent_hugepage=never' to disable Transparent Huge Pages (THP) permanently. Ref
link: https://stackoverflow.com/questions/44800633/how-to-disable-transparent-huge-pages-thp-in-
ubuntu-16-04lts

GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs


# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)


#GRUB_TERMINAL=console

# The resolution used on graphical terminal


# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux


#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries


#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start


#GRUB_INIT_TUNE="480 440 1"

Set swappiness to 0 (or, max 1):

Check the current swappiness set:


ams@hamsathwani:/software$ cat /proc/sys/vm/swappiness
60

To set the swappiness & to make it persist (even after reboot), set the value in the /etc/sysctl.conf
file.

First take a backup of the original /etc/sysctl.conf file.


ams@hamsathwani:/software$ sudo cp -p /etc/sysctl.conf /etc/sysctl.conf.`date +%Y%m%d-%H:%M`

Verify if the backup is generated.

ams@hamsathwani:/software$ sudo ls -la /etc/sysctl.conf*


-rw-r--r-- 1 root root 2355 Feb 25 2022 /etc/sysctl.conf
-rw-r--r-- 1 root root 2355 Feb 25 2022 /etc/sysctl.conf.20230329-20:35

Now add the below lines to the /etc/sysctl.conf file.

ams@hamsathwani:/software$ sudo sh -c 'echo "" >> /etc/sysctl.conf'


ams@hamsathwani:/software$ sudo sh -c 'echo "#Set swappiness to 0 to avoid swapping" >>
/etc/sysctl.conf'
ams@hamsathwani:/software$ sudo sh -c 'echo "vm.swappiness = 0" >> /etc/sysctl.conf'

Verify if the text has been added:

/etc/sysctl.conf file before adding the swappiness config:


ams@hamsathwani:/software$ cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console


#kernel.printk = 3 4 1 3

###################################################################
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies


# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4


#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6


# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438

/etc/sysctl.conf file before adding the swappiness config:


ams@hamsathwani:/software$ cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console


#kernel.printk = 3 4 1 3

###################################################################
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies


# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4


#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6


# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438

#Set swappiness to 0 to avoid swapping


vm.swappiness = 0

Install Couchdb Server again:


(Note: The THP & Swappiness warning
ams@hamsathwani:/software$ sudo dpkg -i couchbase-server-enterprise_7.1.4-
ubuntu20.04_amd64.deb
(Reading database ... 241354 files and directories currently installed.)
Preparing to unpack couchbase-server-enterprise_7.1.4-ubuntu20.04_amd64.deb ...
Warning: Transparent hugepages looks to be active and should not be.
Please look at https://docs.couchbase.com/server/7.1/install/thp-disable.html as for how to
PERMANENTLY alter this setting.
Warning: Swappiness is not set to 0.
Please look at https://docs.couchbase.com/server/7.1/install/install-swap-space.html as for how to
PERMANENTLY alter this setting.
Minimum RAM required : 4 GB
System RAM configured : 15.38 GB

Minimum number of processors required : 4 cores


Number of processors on the system : 4 cores
Upgrading previous couchbase ... (7.1.4-3601-1)
Saving previous couchbase config.dat ...
Cleaning symlinks ...
Unpacking couchbase-server (7.1.4-3601-1) over (7.1.4-3601-1) ...
Setting up couchbase-server (7.1.4-3601-1) ...
Upgrading couchbase-server ...
/opt/couchbase/bin/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes
Automatic mode: running without interactive questions or confirmations.
Analysing...
Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat.debsave

Database dir: /opt/couchbase/var/lib/couchbase/data

Buckets to upgrade: [no buckets found]

Checking disk space available for buckets in directory:


/opt/couchbase/var/lib/couchbase/data
Free disk bucket space wanted: 0.0
Free disk bucket space available: 34997456896
Free disk space factor: 2.0
Ok.
Analysis complete.

No data directories found for namespace upgrade


Copying /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
cp /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
/opt/couchbase/var/lib/couchbase/config/config.dat
Copying /opt/couchbase/var/lib/couchbase/ip.debsave
cp /opt/couchbase/var/lib/couchbase/ip.debsave /opt/couchbase/var/lib/couchbase/ip
Ensuring bucket data directories.
Ensuring dbdir and indexdir owner/group: /opt/couchbase/var/lib/couchbase/data
chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
Ensuring dbdir and indexdir owner/group: /opt/couchbase/var/lib/couchbase/data
chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
Ensuring dbdir and indexdir owner/group: /opt/couchbase/var/lib/couchbase/data
chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data

Done.

You have successfully installed Couchbase Server.


Please browse to http://hamsathwani:8091/ to configure your server.
Refer to https://docs.couchbase.com for additional resources.

Please note that you have to update your firewall configuration to


allow external connections to a number of network ports for full
operation. Refer to the documentation for the current list:
https://docs.couchbase.com/server/7.1/install/install-ports.html

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

#####

Verify the installation:

Method-1:
Visit http://localhost:8091 in the browser.
Method-2:

ams@hamsathwani:/opt/couchbase/bin$ ./cbworkloadgen -n localhost:8091 -u Administrator -p


Pink@1993 -b test
[####################] 100.0% (10527/estimated 10527 msgs)
bucket: default, msgs transferred...
: total | last | per sec
byte : 105270 | 105270 | 182844.0
done

#####

Initialize a cluster:

ams@hamsathwani:/opt/couchbase/bin$ ./couchbase-cli cluster-init -c 127.0.0.1:8091 -u


Administrator -p Pink@1993 --cluster-username=Administrator --cluster-password=Pink@1993 --
cluster-port=8091 --cluster-ramsize=8192 --cluster-index-ramsize=1000 --services=data
DEPRECATED: Specifying -u/--username is deprecated
DEPRECATED: Specifying -p/--password is deprecated
SUCCESS: Cluster initialized

Creater a new bucket:

ams@hamsathwani:/opt/couchbase/bin$ ./couchbase-cli bucket-create -c localhost:8091 -u


Administrator -p Pink@1993 --bucket test --bucket-type couchbase --bucket-ramsize 100
SUCCESS: Bucket created

Import json data into bucket:

ams@hamsathwani:/opt/couchbase/bin$ ./cbimport json -c localhost:8091 -u Administrator -p


Pink@1993 -b test -f lines -d
file:///data/entrepreneurship/freelance/via_Telegram/RavindraKhurana\(Rajasthan\)/zips.json --
generate-key key::%city%::#MONO_INCR#
JSON `file:///data/entrepreneurship/freelance/via_Telegram/RavindraKhurana(Rajasthan)/zips.json`
imported to `localhost:8091` successfully
Documents imported: 29353 Documents failed: 0

To view the pools:

ams@hamsathwani:/opt/couchbase/bin$ curl -u Administrator:Pink@1993


http://localhost:8091/pools
{"isAdminCreds":true,"isROAdminCreds":false,"isEnterprise":true,"allowedServices":
["kv","n1ql","index","fts","cbas","eventing","backup"],"isDeveloperPreview":false,"packageVariant
":"linux","pools":[{"name":"default","uri":"/pools/default?
uuid=456773ef6c4106588f933d02ea593068","streamingUri":"/poolsStreaming/default?
uuid=456773ef6c4106588f933d02ea593068"}],"settings":{"maxParallelIndexers":"/settings/
maxParallelIndexers?uuid=456773ef6c4106588f933d02ea593068","viewUpdateDaemon":"/
settings/viewUpdateDaemon?
uuid=456773ef6c4106588f933d02ea593068"},"uuid":"456773ef6c4106588f933d02ea593068","im
plementationVersion":"7.1.4-3601-enterprise","componentsVersion":
{"asn1":"5.0.18","crypto":"5.0.6.3","os_mon":"2.7.1","chronicle":"0.0.1","stdlib":"3.17.2","lhttpc":
"1.3.0","kernel":"8.3.2.1","inets":"7.5.3.1","public_key":"1.12.0.1","ns_server":"7.1.4-3601-
enterprise","sasl":"4.1.2","ssl":"10.7.3.3","ale":"0.0.0"}}

(Note: json_pp is used to beautify the json in a readable format.)


ams@hamsathwani:/opt/couchbase/bin$ curl -u Administrator:Pink@1993
http://localhost:8091/pools/default | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4800 100 4800 0 0 357k 0 --:--:-- --:--:-- --:--:-- 390k
{
"alerts" : [],
"alertsSilenceURL" : "/controller/resetAlerts?uuid=456773ef6c4106588f933d02ea593068&token=0",
"autoCompactionSettings" : {
"databaseFragmentationThreshold" : {
"percentage" : 30,
"size" : "undefined"
},
"indexCircularCompaction" : {
"daysOfWeek" : "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
"interval" : {
"abortOutside" : false,
"fromHour" : 0,
"fromMinute" : 0,
"toHour" : 0,
"toMinute" : 0
}
},
"indexCompactionMode" : "circular",
"indexFragmentationThreshold" : {
"percentage" : 30
},
"magmaFragmentationPercentage" : 50,
"parallelDBAndViewCompaction" : false,
"viewFragmentationThreshold" : {
"percentage" : 30,
"size" : "undefined"
}
},
"balanced" : true,
"bucketNames" : [
{
"bucketName" : "test",
"uuid" : "c990634355f76b04793720d8b2be5ec4"
}
],
"buckets" : {
"terseBucketsBase" : "/pools/default/b/",
"terseStreamingBucketsBase" : "/pools/default/bs/",
"uri" : "/pools/default/buckets?v=116652675&uuid=456773ef6c4106588f933d02ea593068"
},
"cbasMemoryQuota" : 2161,
"checkPermissionsURI" : "/pools/default/checkPermissions?v=cvZnRUlnJH1DYOTVsTL%2BitwL7n0%3D",
"clusterEncryptionLevel" : "none",
"clusterName" : "",
"controllers" : {
"addNode" : {
"uri" : "/controller/addNodeV2?uuid=456773ef6c4106588f933d02ea593068"
},
"clusterLogsCollection" : {
"cancelURI" : "/controller/cancelLogsCollection?uuid=456773ef6c4106588f933d02ea593068",
"startURI" : "/controller/startLogsCollection?uuid=456773ef6c4106588f933d02ea593068"
},
"ejectNode" : {
"uri" : "/controller/ejectNode?uuid=456773ef6c4106588f933d02ea593068"
},
"failOver" : {
"uri" : "/controller/failOver?uuid=456773ef6c4106588f933d02ea593068"
},
"reAddNode" : {
"uri" : "/controller/reAddNode?uuid=456773ef6c4106588f933d02ea593068"
},
"reFailOver" : {
"uri" : "/controller/reFailOver?uuid=456773ef6c4106588f933d02ea593068"
},
"rebalance" : {
"uri" : "/controller/rebalance?uuid=456773ef6c4106588f933d02ea593068"
},
"replication" : {
"createURI" : "/controller/createReplication?uuid=456773ef6c4106588f933d02ea593068",
"validateURI" : "/controller/createReplication?just_validate=1"
},
"setAutoCompaction" : {
"uri" : "/controller/setAutoCompaction?uuid=456773ef6c4106588f933d02ea593068",
"validateURI" : "/controller/setAutoCompaction?just_validate=1"
},
"setRecoveryType" : {
"uri" : "/controller/setRecoveryType?uuid=456773ef6c4106588f933d02ea593068"
},
"startGracefulFailover" : {
"uri" : "/controller/startGracefulFailover?uuid=456773ef6c4106588f933d02ea593068"
}
},
"counters" : {},
"eventingMemoryQuota" : 256,
"ftsMemoryQuota" : 512,
"indexMemoryQuota" : 1000,
"indexStatusURI" : "/indexStatus?v=21137658",
"maxBucketCount" : 30,
"maxCollectionCount" : 1200,
"maxScopeCount" : 1200,
"memoryQuota" : 8192,
"name" : "default",
"nodeServicesUri" : "/pools/default/nodeServices?v=34982885",
"nodeStatusesUri" : "/nodeStatuses",
"nodes" : [
{
"addressFamily" : "inet",
"addressFamilyOnly" : false,
"clusterCompatibility" : 458753,
"clusterMembership" : "active",
"configuredHostname" : "127.0.0.1:8091",
"couchApiBase" : "http://127.0.0.1:8092/",
"couchApiBaseHTTPS" : "https://127.0.0.1:18092/",
"cpuCount" : 4,
"externalListeners" : [
{
"afamily" : "inet",
"nodeEncryption" : false
}
],
"hostname" : "127.0.0.1:8091",
"interestingStats" : {
"cmd_get" : 0,
"couch_docs_actual_disk_size" : 8476382,
"couch_docs_data_size" : 401888,
"couch_spatial_data_size" : 0,
"couch_spatial_disk_size" : 0,
"couch_views_actual_disk_size" : 0,
"couch_views_data_size" : 0,
"curr_items" : 0,
"curr_items_tot" : 0,
"ep_bg_fetched" : 0,
"get_hits" : 0,
"mem_used" : 26386384,
"ops" : 0,
"vb_active_num_non_resident" : 0,
"vb_replica_curr_items" : 0
},
"mcdMemoryAllocated" : 12599,
"mcdMemoryReserved" : 12599,
"memoryFree" : 9329946624,
"memoryTotal" : 16514301952,
"nodeEncryption" : false,
"nodeHash" : 60861916,
"nodeUUID" : "812fcabcef34cbaf2a52800e4e58ff3a",
"os" : "x86_64-pc-linux-gnu",
"otpNode" : "[email protected]",
"ports" : {
"direct" : 11210,
"distTCP" : 21100,
"distTLS" : 21150,
"httpsCAPI" : 18092,
"httpsMgmt" : 18091
},
"recoveryType" : "none",
"serverGroup" : "Group 1",
"services" : [
"kv"
],
"status" : "healthy",
"systemStats" : {
"allocstall" : 0,
"cpu_cores_available" : 4,
"cpu_stolen_rate" : 0,
"cpu_utilization_rate" : 1.80389452951812,
"mem_free" : 9329946624,
"mem_limit" : 16514301952,
"mem_total" : 16514301952,
"swap_total" : 0,
"swap_used" : 0
},
"thisNode" : true,
"uptime" : "6581",
"version" : "7.1.4-3601-enterprise"
}
],
"rebalanceProgressUri" : "/pools/default/rebalanceProgress",
"rebalanceStatus" : "none",
"remoteClusters" : {
"uri" : "/pools/default/remoteClusters?uuid=456773ef6c4106588f933d02ea593068",
"validateURI" : "/pools/default/remoteClusters?just_validate=1"
},
"serverGroupsUri" : "/pools/default/serverGroups?v=86973393",
"stopRebalanceUri" : "/controller/stopRebalance?uuid=456773ef6c4106588f933d02ea593068",
"storageTotals" : {
"hdd" : {
"free" : 36552774165,
"quotaTotal" : 50072293376,
"total" : 50072293376,
"used" : 13519519211,
"usedByData" : 8476382
},
"ram" : {
"quotaTotal" : 8589934592,
"quotaTotalPerNode" : 8589934592,
"quotaUsed" : 104857600,
"quotaUsedPerNode" : 104857600,
"total" : 16514301952,
"used" : 16265682944,
"usedByData" : 26386384
}
},
"tasks" : {
"uri" : "/pools/default/tasks?v=79037682"
},
"trustedCAsURI" : "/pools/default/trustedCAs?v=19289121"
}

To see details of a particular bucket:


(Note: Take the bucket identifiers from the `uri` field (v=116652675&uuid=456773ef6c4106588f933d02ea593068)
under `buckets` field, from the /pools/defaults output above, and pass it to the uri in the curl
command below. You can either pass the v=<value> or uuid=<value>, to the command)

ams@hamsathwani:/opt/couchbase/bin$ curl -u Administrator:Pink@1993


http://localhost:8091/pools/default/buckets?v=116652675
(or)
ams@hamsathwani:/opt/couchbase/bin$ curl -u Administrator:Pink@1993
http://localhost:8091/pools/default/buckets?uuid=456773ef6c4106588f933d02ea593068
[{"name":"test","nodeLocator":"vbucket","bucketType":"membase","storageBackend":"couchstore","uuid":"c990634355f76b04793720d8b2be5ec4"
,"uri":"/pools/default/buckets/test?bucket_uuid=c990634355f76b04793720d8b2be5ec4","streamingUri":"/pools/default/bucketsStreaming/test?
bucket_uuid=c990634355f76b04793720d8b2be5ec4","bucketCapabilitiesVer":"","bucketCapabilities":
["collections","durableWrite","tombstonedUserXAttrs","couchapi","subdoc.ReplaceBodyWithXattr","subdoc.DocumentMacroSupport","subdoc.Revi
veDocument","dcp","cbhello","touch","cccp","xdcrCheckpointing","nodesExt","xattr"],"collectionsManifestUid":"0","ddocs":{"uri":"/pools/
default/buckets/test/ddocs"},"vBucketServerMap":{"hashAlgorithm":"CRC","numReplicas":1,"serverList":["127.0.0.1:11210"],"vBucketMap":[[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-
1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1]]},"localRandomKeyUri":"/pools/default/buckets/test/
localRandomKey","controllers":{"compactAll":"/pools/default/buckets/test/controller/compactBucket","compactDB":"/pools/default/buckets/test/
controller/compactDatabases","purgeDeletes":"/pools/default/buckets/test/controller/unsafePurgeBucket","startRecovery":"/pools/default/buckets/
test/controller/startRecovery"},"nodes":[{"couchApiBaseHTTPS":"https://127.0.0.1:18092/test
%2Bc990634355f76b04793720d8b2be5ec4","couchApiBase":"http://127.0.0.1:8092/test
%2Bc990634355f76b04793720d8b2be5ec4","clusterMembership":"active","recoveryType":"none","status":"healthy","otpNode":"[email protected]","t
hisNode":true,"hostname":"127.0.0.1:8091","nodeUUID":"812fcabcef34cbaf2a52800e4e58ff3a","clusterCompatibility":458753,"version":"7.1.4-
3601-enterprise","os":"x86_64-pc-linux-gnu","cpuCount":4,"ports":
{"direct":11210,"httpsCAPI":18092,"httpsMgmt":18091,"distTCP":21100,"distTLS":21150},"services":
["kv"],"nodeEncryption":false,"addressFamilyOnly":false,"configuredHostname":"127.0.0.1:8091","addressFamily":"inet","externalListeners":
[{"afamily":"inet","nodeEncryption":false}],"serverGroup":"Group 1","replication":0,"nodeHash":76530566,"systemStats":
{"cpu_utilization_rate":1.99005916641434,"cpu_stolen_rate":0,"swap_total":0,"swap_used":0,"mem_total":16514301952,"mem_free":1069368934
4,"mem_limit":16514301952,"cpu_cores_available":4,"allocstall":0},"interestingStats":
{"cmd_get":0,"couch_docs_actual_disk_size":25701506,"couch_docs_data_size":7413209,"couch_spatial_data_size":0,"couch_spatial_disk_size":0
,"couch_views_actual_disk_size":0,"couch_views_data_size":0,"curr_items":39353,"curr_items_tot":39353,"ep_bg_fetched":0,"get_hits":0,"mem_u
sed":34758672,"ops":0,"vb_active_num_non_resident":0,"vb_replica_curr_items":0},"uptime":"9051","memoryTotal":16514301952,"memoryFree":
10693689344,"mcdMemoryReserved":12599,"mcdMemoryAllocated":12599}],"stats":{"uri":"/pools/default/buckets/test/stats","directoryURI":"/
pools/default/buckets/test/stats/Directory","nodeStatsListURI":"/pools
/default/buckets/test/nodes"},"authType":"sasl","autoCompactionSettings":false,"replicaIndex":true,"replicaNumber":1,"threadsNumber":3,"quota":
{"ram":104857600,"rawRAM":104857600},"basicStats":
{"quotaPercentUsed":33.14845275878906,"opsPerSec":0,"diskFetches":0,"itemCount":39353,"diskUsed":25701506,"dataUsed":7413209,"memUse
d":34758672,"vbActiveNumNonResident":0},"evictionPolicy":"valueOnly","durabilityMinLevel":"none","pitrEnabled":false,"pitrGranularity":600,"
pitrMaxHistoryAge":86400,"conflictResolutionType":"seqno","maxTTL":0,"compressionMode":"passive"}]

#####
To view the Couchbase server ui:

Go to http://localhost:8091/ in the browser & login with the credentials given while creating the
cluster.
i.e.
Username: Administrator
Password: Pink@1993

#####

You might also like