Es una experiencia común encontrarse con errores de conexión de red cuando está desarrollando una aplicación - particularmente si se está conectando desde el SDK de su ordenador local a un cluster remoto.
¿Su SDK no está conectado? Es probable que te encuentres con situaciones en las que tu aplicación pueda conectarse al servidor pero te aparezcan errores relacionados con la conexión de red o las direcciones IP entre los nodos o tu app y el SDK de Couchbase.
En este artículo se explica cómo solucionar y corregir estos errores. El ejemplo que veremos a continuación crea un clúster en Azure para demostrar las condiciones iniciales, pero también debería ser aplicable a otras instalaciones.
Repasaremos cada paso para reproducir el error. En primer lugar, instalaremos Couchbase en Azure, luego ejecute SDK Doctor para ver cómo se manifiesta el error, luego actualice las direcciones alternativas y, por último, vuelva a ejecutar SDK Doctor para ver la respuesta satisfactoria.
Bueno, vamos a sumergirnos.
Instale su clúster Couchbase en Azure
Estos son los pasos para instalar un clúster de Couchbase en Azure.
- Entrar en Microsoft Azure Marketplace
- Buscar Couchbase
- Elija Couchbase Server y Sync Gateway
- Haga clic en Obtener ahora
- Elija BYOL
- Haga clic en Continuar
- Haga clic en Crear
- Rellenar formulario
- Admin:
asdf88495< Actualizar esto según proceda - Contraseña:
Contraseña1 @#$< Actualizar esto según proceda - Cumplimentar los formularios de configuración según proceda
- Haga clic en Crear
El proceso se ejecuta y se ve así una vez que hayas completado todos los pasos:

Actualizar las reglas del cortafuegos
Es probable que necesite actualizar las reglas del cortafuegos para permitir que su equipo local se conecte al clúster Azure remoto. Estos son los pasos:
1. Ir al grupo de recursos
2. Haga clic en Conjunto de escalas de máquinas virtuales

3. Haga clic en Red

4. Haga clic en Añadir regla de puerto de entrada

5. Actualiza la configuración para utilizar la información de tu red local. Advertencia: Esto es muy abierto para los propósitos de esta demostración, usted debe seguir sus directrices de seguridad al configurar el firewall.

Confirmar que Couchbase está en funcionamiento
El siguiente paso importante es confirmar que Couchbase está funcionando. He aquí cómo hacerlo:
1. Ve a instancias para obtener una dirección IP y conéctate al panel de control de Couchbase.

2. Obtenga la dirección IP de uno de sus servidores.

3. En este ejemplo, el nombre de usuario es https://40.80.151.197:8091/ui/index.html.
4. Inicia sesión con la información utilizada para crear la cuenta de administrador de la sección "Instala tu clúster Couchbase en Azure" anterior. Aquí es donde creaste el clúster en Azure y completaste el formulario.
5. En Couchbase, añada los datos de muestra que utilizará para esta demostración. Siga las instrucciones instrucciones en la documentación de Couchbase para añadir datos de buckets de muestra.
Presentación del SDK Doctor
El doctor del SDK de Couchbase es una herramienta para diagnosticar problemas de conectividad del lado del servidor de la aplicación con tu cluster de Couchbase. Realiza las mismas conexiones al Servidor Couchbase que los SDKs de Couchbase hacen durante el bootstrapping, y luego informa sobre el estado de las conexiones realizadas - dando información de diagnóstico que ayuda a resolver problemas de red desconcertantes.
Aquí está el conjunto completo de instrucciones para utilizar el SDK Doctor con Couchbase Server.
1. Ejecutar el SDK Doctor para detectar errores
Siguiendo las instrucciones anteriores - donde recogiste la dirección IP de tu cluster Couchbase - obtén también las direcciones IP de cada uno de los otros nodos de tu cluster. Utilizarás las direcciones IP en la cadena de conexión para el SDK Doctor.
El siguiente comando utiliza las direcciones IP de los nodos de su clúster además del nombre del bucket de datos de muestra. Deberá actualizar esta información en función de las IP de su propio clúster y del bucket de muestra específico que haya instalado.
Ahora, ejecute el SDK Doctor.
Probablemente obtendrá un montón de mensajes de error - como puede ver a continuación - especialmente si está ejecutando SDK Doctor desde un ordenador local y no en la misma red que los nodos/cluster/VMs. Verá el mensaje ERROR y Error de conexión mensajes. Observe que las direcciones IP son las 10 internas, no las 40 ni las 13.
Es posible que tenga que hacer doble clic en el código de ejemplo para ver el resultado completo (dependiendo de su dispositivo).
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
.\sdk-doctor-windows.exe diagnose couchbase://40.80.151.197,40.80.146.52,13.82.230.238/beer-sample -u asdf88495 -p Password1!@#$ |====================================================================| | ___ ___ _ __ ___ ___ ___ _____ ___ ___ | | / __| \| |/ /__| \ / _ \ / __|_ _/ _ \| _ \ | | \__ \ |) | ' <___| |) | (_) | (__ | || (_) | / | | |___/___/|_|\_\ |___/ \___/ \___| |_| \___/|_|_\ | | | |====================================================================| Note: Diagnostics can only provide accurate results when your cluster is in a stable state. Active rebalancing and other cluster configuration changes can cause the output of the doctor to be inconsistent or in the worst cases, completely incorrect. 13:52:58.412 INFO ▶ Parsing connection string `couchbase://40.80.151.197,40.80.146.52,13.82.230.238/beer-sample` 13:52:58.413 INFO ▶ Connection string identifies the following CCCP endpoints: 13:52:58.413 INFO ▶ 1. 40.80.151.197:11210 13:52:58.414 INFO ▶ 2. 40.80.146.52:11210 13:52:58.414 INFO ▶ 3. 13.82.230.238:11210 13:52:58.414 INFO ▶ Connection string identifies the following HTTP endpoints: 13:52:58.414 INFO ▶ 1. 40.80.151.197:8091 13:52:58.414 INFO ▶ 2. 40.80.146.52:8091 13:52:58.414 INFO ▶ 3. 13.82.230.238:8091 13:52:58.415 INFO ▶ Connection string specifies bucket `beer-sample` 13:52:58.415 INFO ▶ Performing DNS lookup for host `40.80.151.197` 13:52:58.415 INFO ▶ Performing DNS lookup for host `40.80.146.52` 13:52:58.415 INFO ▶ Performing DNS lookup for host `13.82.230.238` 13:52:58.415 INFO ▶ Attempting to connect to cluster via CCCP 13:52:58.416 INFO ▶ Attempting to fetch config via cccp from `40.80.151.197:11210` 13:52:58.631 INFO ▶ Attempting to fetch config via cccp from `40.80.146.52:11210` 13:52:58.846 INFO ▶ Attempting to fetch config via cccp from `13.82.230.238:11210` 13:52:59.076 WARN ▶ Bootstrap host `40.80.151.197` is not using the canonical node hostname of `10.0.0.4`. This is not necessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:52:59.077 WARN ▶ Bootstrap host `40.80.146.52` is not using the canonical node hostname of `10.0.0.5`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:52:59.079 WARN ▶ Bootstrap host `13.82.230.238` is not using the canonical node hostname of `10.0.0.6`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:52:59.080 INFO ▶ Selected the following network type: default 13:52:59.080 INFO ▶ Identified the following nodes: 13:52:59.081 INFO ▶ [0] 10.0.0.4 13:52:59.081 INFO ▶ indexScan: 9101, indexStreamInit: 9103, indexStreamCatchup: 9104 13:52:59.081 INFO ▶ kvSSL: 11207, projector: 9999, mgmt: 8091 13:52:59.082 INFO ▶ mgmtSSL: 18091, indexAdmin: 9100, n1ql: 8093 13:52:59.082 INFO ▶ indexHttp: 9102, indexHttps: 19102, kv: 11210 13:52:59.083 INFO ▶ cbas: 8095, eventingSSL: 18096, ftsGRPCSSL: 19130 13:52:59.083 INFO ▶ ftsSSL: 18094, ftsGRPC: 9130, indexStreamMaint: 9105 13:52:59.084 INFO ▶ capi: 8092, n1qlSSL: 18093, cbasSSL: 18095 13:52:59.084 INFO ▶ eventingDebug: 9140, fts: 8094, eventingAdminPort: 8096 13:52:59.085 INFO ▶ capiSSL: 18092 13:52:59.085 INFO ▶ [1] 10.0.0.5 13:52:59.086 INFO ▶ ftsGRPCSSL: 19130, indexHttps: 19102, cbas: 8095 13:52:59.086 INFO ▶ eventingAdminPort: 8096, eventingDebug: 9140, indexAdmin: 9100 13:52:59.087 INFO ▶ indexStreamInit: 9103, indexStreamMaint: 9105, mgmtSSL: 18091 13:52:59.087 INFO ▶ cbasSSL: 18095, ftsSSL: 18094, n1ql: 8093 13:52:59.088 INFO ▶ kv: 11210, capi: 8092, capiSSL: 18092 13:52:59.088 INFO ▶ ftsGRPC: 9130, indexScan: 9101, indexHttp: 9102 13:52:59.089 INFO ▶ indexStreamCatchup: 9104, kvSSL: 11207, mgmt: 8091 13:52:59.089 INFO ▶ eventingSSL: 18096, fts: 8094, projector: 9999 13:52:59.089 INFO ▶ n1qlSSL: 18093 13:52:59.090 INFO ▶ [2] 10.0.0.6 13:52:59.090 INFO ▶ mgmtSSL: 18091, cbas: 8095, cbasSSL: 18095 13:52:59.091 INFO ▶ eventingAdminPort: 8096, ftsSSL: 18094, indexAdmin: 9100 13:52:59.091 INFO ▶ indexStreamCatchup: 9104, capi: 8092, ftsGRPC: 9130 13:52:59.092 INFO ▶ indexHttp: 9102, indexStreamMaint: 9105, kvSSL: 11207 13:52:59.092 INFO ▶ projector: 9999, eventingDebug: 9140, fts: 8094 13:52:59.093 INFO ▶ ftsGRPCSSL: 19130, indexStreamInit: 9103, mgmt: 8091 13:52:59.093 INFO ▶ eventingSSL: 18096, indexScan: 9101, indexHttps: 19102 13:52:59.093 INFO ▶ kv: 11210, capiSSL: 18092, n1ql: 8093 13:52:59.094 INFO ▶ n1qlSSL: 18093 13:52:59.095 INFO ▶ Fetching config from `https://10.0.0.4:8091` 13:53:01.096 INFO ▶ Failed to retreive cluster information (error: Get "https://10.0.0.4:8091/pools/default": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:03.097 ERRO ▶ Failed to connect to Key Value service at `10.0.0.4:11210` (error: dial tcp 10.0.0.4:11210: i/o timeout) 13:53:05.098 ERRO ▶ Failed to connect to Management service at `10.0.0.4:8091` (error: Get "https://10.0.0.4:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:07.099 ERRO ▶ Failed to connect to Views service at `10.0.0.4:8092` (error: Get "https://10.0.0.4:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:09.101 ERRO ▶ Failed to connect to Query service at `10.0.0.4:8093` (error: Get "https://10.0.0.4:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:11.109 ERRO ▶ Failed to connect to Search service at `10.0.0.4:8094` (error: Get "https://10.0.0.4:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:13.110 ERRO ▶ Failed to connect to Analytics service at `10.0.0.4:8095` (error: Get "https://10.0.0.4:8095/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:15.110 ERRO ▶ Failed to connect to Key Value service at `10.0.0.5:11210` (error: dial tcp 10.0.0.5:11210: i/o timeout) 13:53:17.119 ERRO ▶ Failed to connect to Management service at `10.0.0.5:8091` (error: Get "https://10.0.0.5:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:19.119 ERRO ▶ Failed to connect to Views service at `10.0.0.5:8092` (error: Get "https://10.0.0.5:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:21.120 ERRO ▶ Failed to connect to Query service at `10.0.0.5:8093` (error: Get "https://10.0.0.5:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:23.120 ERRO ▶ Failed to connect to Search service at `10.0.0.5:8094` (error: Get "https://10.0.0.5:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:25.121 ERRO ▶ Failed to connect to Analytics service at `10.0.0.5:8095` (error: Get "https://10.0.0.5:8095/": dial tcp 10.0.0.5:8095: i/o timeout (Client.Timeout exceeded while awaiting headers)) 13:53:27.121 ERRO ▶ Failed to connect to Key Value service at `10.0.0.6:11210` (error: dial tcp 10.0.0.6:11210: i/o timeout) 13:53:29.122 ERRO ▶ Failed to connect to Management service at `10.0.0.6:8091` (error: Get "https://10.0.0.6:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:31.123 ERRO ▶ Failed to connect to Views service at `10.0.0.6:8092` (error: Get "https://10.0.0.6:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:33.124 ERRO ▶ Failed to connect to Query service at `10.0.0.6:8093` (error: Get "https://10.0.0.6:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:35.124 ERRO ▶ Failed to connect to Search service at `10.0.0.6:8094` (error: Get "https://10.0.0.6:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:37.125 ERRO ▶ Failed to connect to Analytics service at `10.0.0.6:8095` (error: Get "https://10.0.0.6:8095/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) 13:53:39.126 WARN ▶ Failed to perform KV connection performance analysis on `10.0.0.4:11210` (error: %!d(string=dial tcp 10.0.0.4:11210: i/o timeout)) 13:53:41.127 WARN ▶ Failed to perform KV connection performance analysis on `10.0.0.5:11210` (error: %!d(string=dial tcp 10.0.0.5:11210: i/o timeout)) 13:53:43.128 WARN ▶ Failed to perform KV connection performance analysis on `10.0.0.6:11210` (error: %!d(string=dial tcp 10.0.0.6:11210: i/o timeout)) 13:53:43.128 INFO ▶ Diagnostics completed Summary: [WARN] Bootstrap host `40.80.151.197` is not using the canonical node hostname of `10.0.0.4`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Bootstrap host `40.80.146.52` is not using the canonical node hostname of `10.0.0.5`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Bootstrap host `13.82.230.238` is not using the canonical node hostname of `10.0.0.6`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Failed to perform KV connection performance analysis on `10.0.0.4:11210` (error: %!d(string=dial tcp 10.0.0.4:11210: i/o timeout)) [WARN] Failed to perform KV connection performance analysis on `10.0.0.5:11210` (error: %!d(string=dial tcp 10.0.0.5:11210: i/o timeout)) [WARN] Failed to perform KV connection performance analysis on `10.0.0.6:11210` (error: %!d(string=dial tcp 10.0.0.6:11210: i/o timeout)) [ERRO] Failed to connect to Key Value service at `10.0.0.4:11210` (error: dial tcp 10.0.0.4:11210: i/o timeout) [ERRO] Failed to connect to Management service at `10.0.0.4:8091` (error: Get "https://10.0.0.4:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Views service at `10.0.0.4:8092` (error: Get "https://10.0.0.4:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Query service at `10.0.0.4:8093` (error: Get "https://10.0.0.4:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Search service at `10.0.0.4:8094` (error: Get "https://10.0.0.4:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Analytics service at `10.0.0.4:8095` (error: Get "https://10.0.0.4:8095/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Key Value service at `10.0.0.5:11210` (error: dial tcp 10.0.0.5:11210: i/o timeout) [ERRO] Failed to connect to Management service at `10.0.0.5:8091` (error: Get "https://10.0.0.5:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Views service at `10.0.0.5:8092` (error: Get "https://10.0.0.5:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Query service at `10.0.0.5:8093` (error: Get "https://10.0.0.5:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Search service at `10.0.0.5:8094` (error: Get "https://10.0.0.5:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Analytics service at `10.0.0.5:8095` (error: Get "https://10.0.0.5:8095/": dial tcp 10.0.0.5:8095: i/o timeout (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Key Value service at `10.0.0.6:11210` (error: dial tcp 10.0.0.6:11210: i/o timeout) [ERRO] Failed to connect to Management service at `10.0.0.6:8091` (error: Get "https://10.0.0.6:8091/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Views service at `10.0.0.6:8092` (error: Get "https://10.0.0.6:8092/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Query service at `10.0.0.6:8093` (error: Get "https://10.0.0.6:8093/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Search service at `10.0.0.6:8094` (error: Get "https://10.0.0.6:8094/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) [ERRO] Failed to connect to Analytics service at `10.0.0.6:8095` (error: Get "https://10.0.0.6:8095/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) Found multiple issues, see listing above. |
Uso de la dirección alternativa de Couchbase
Couchbase Server permite asignar una dirección alternativa a cualquier nodo individual del cluster, y un número de puerto alternativo a cualquier servicio que se ejecute en ese nodo.
La asignación de direcciones y números de puerto alternativos -que puede realizarse mediante la CLI y la API REST- puede facilitar la comunicación con aplicaciones externas que no tienen permiso para contactar directamente con los nodos de un clúster. Sin embargo, pueden tener acceso a un enrutador u otra entidad en red que proporcione direcciones visibles externamente en nombre de los nodos.
Sumérgete en la documentación de Couchbase sobre el uso de direcciones alternativas para obtener más información..
Añadir la dirección alternativa de Couchbase
Existe una llamada REST para actualizar la dirección alternativa de tu clúster Couchbase. (Para más información, consulte la documentación de Couchbase sobre la gestión de direcciones alternativas con la API REST.)
A continuación, deberá actualizar la dirección alternativa de cada dirección IP del clúster. Esto asigna la interna a la dirección IP que usted especifique.
|
1 |
curl -v -X PUT -u asdf88495:Password1!@#$ https://40.80.151.197:8091/node/controller/setupAlternateAddresses/external -d hostname=40.80.151.197 |
Deberías obtener una respuesta 200, como puedes ver a continuación.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
* Trying 13.82.230.238... * TCP_NODELAY set * Connected to 13.82.230.238 (13.82.230.238) port 8091 (#0) * Server auth using Basic with user 'asdf88495' > PUT /node/controller/setupAlternateAddresses/external HTTP/1.1 > Host: 13.82.230.238:8091 > Authorization: Basic YXNkZjg4NDk1OlBhc3N3b3JkMSFAIyQ= > User-Agent: curl/7.55.1 > Accept: */* > Content-Length: 22 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 22 out of 22 bytes < HTTP/1.1 200 OK < X-XSS-Protection: 1; mode=block < X-Permitted-Cross-Domain-Policies: none < X-Frame-Options: DENY < X-Content-Type-Options: nosniff < Server: Couchbase Server < Pragma: no-cache < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Date: Mon, 28 Jun 2021 18:59:31 GMT < Content-Length: 0 < Cache-Control: no-cache,no-store,must-revalidate |
Repita el comando para los otros hosts también, así:
|
1 |
curl -v -X PUT -u asdf88495:Password1!@#$ https://40.80.146.52:8091/node/controller/setupAlternateAddresses/external -d hostname=40.80.146.52 |
|
1 |
curl -v -X PUT -u asdf88495:Password1!@#$ https://13.82.230.238:8091/node/controller/setupAlternateAddresses/external -d hostname=13.82.230.238 |
2. Ejecutar el SDK Doctor para confirmar el éxito
Ahora, ejecute el SDK Doctor de nuevo para confirmar el éxito. Debería obtener algo como lo siguiente:
Es posible que tenga que hacer doble clic en el código de ejemplo para ver el resultado completo (dependiendo de su dispositivo).
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
C:\david\bin\Couchbase> .\sdk-doctor-windows.exe diagnose couchbase://40.80.151.197,40.80.146.52,13.82.230.238/beer-sample -u asdf88495 -p Password1!@#$ |====================================================================| | ___ ___ _ __ ___ ___ ___ _____ ___ ___ | | / __| \| |/ /__| \ / _ \ / __|_ _/ _ \| _ \ | | \__ \ |) | ' <___| |) | (_) | (__ | || (_) | / | | |___/___/|_|\_\ |___/ \___/ \___| |_| \___/|_|_\ | | | |====================================================================| Note: Diagnostics can only provide accurate results when your cluster is in a stable state. Active rebalancing and other cluster configuration changes can cause the output of the doctor to be inconsistent or in the worst cases, completely incorrect. 13:59:33.729 INFO ▶ Parsing connection string `couchbase://40.80.151.197,40.80.146.52,13.82.230.238/beer-sample` 13:59:33.730 INFO ▶ Connection string identifies the following CCCP endpoints: 13:59:33.730 INFO ▶ 1. 40.80.151.197:11210 13:59:33.730 INFO ▶ 2. 40.80.146.52:11210 13:59:33.730 INFO ▶ 3. 13.82.230.238:11210 13:59:33.730 INFO ▶ Connection string identifies the following HTTP endpoints: 13:59:33.731 INFO ▶ 1. 40.80.151.197:8091 13:59:33.731 INFO ▶ 2. 40.80.146.52:8091 13:59:33.731 INFO ▶ 3. 13.82.230.238:8091 13:59:33.731 INFO ▶ Connection string specifies bucket `beer-sample` 13:59:33.731 INFO ▶ Performing DNS lookup for host `40.80.151.197` 13:59:33.731 INFO ▶ Performing DNS lookup for host `40.80.146.52` 13:59:33.731 INFO ▶ Performing DNS lookup for host `13.82.230.238` 13:59:33.731 INFO ▶ Attempting to connect to cluster via CCCP 13:59:33.732 INFO ▶ Attempting to fetch config via cccp from `40.80.151.197:11210` 13:59:33.947 INFO ▶ Attempting to fetch config via cccp from `40.80.146.52:11210` 13:59:34.171 INFO ▶ Attempting to fetch config via cccp from `13.82.230.238:11210` 13:59:34.391 WARN ▶ Bootstrap host `40.80.151.197` is not using the canonical node hostname of `10.0.0.4`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:59:34.392 WARN ▶ Bootstrap host `40.80.146.52` is not using the canonical node hostname of `10.0.0.5`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:59:34.393 WARN ▶ Bootstrap host `13.82.230.238` is not using the canonical node hostname of `10.0.0.6`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. 13:59:34.394 INFO ▶ Selected the following network type: external 13:59:34.394 INFO ▶ Identified the following nodes: 13:59:34.394 INFO ▶ [0] 40.80.151.197 13:59:34.395 INFO ▶ projector: 9999, n1ql: 8093, n1qlSSL: 18093 13:59:34.395 INFO ▶ cbasSSL: 18095, indexAdmin: 9100, kvSSL: 11207 13:59:34.396 INFO ▶ capi: 8092, capiSSL: 18092, indexStreamCatchup: 9104 13:59:34.396 INFO ▶ mgmtSSL: 18091, eventingAdminPort: 8096, eventingSSL: 18096 13:59:34.397 INFO ▶ fts: 8094, ftsGRPC: 9130, eventingDebug: 9140 13:59:34.397 INFO ▶ indexHttp: 9102, indexStreamMaint: 9105, indexStreamInit: 9103 13:59:34.398 INFO ▶ indexHttps: 19102, kv: 11210, mgmt: 8091 13:59:34.398 INFO ▶ cbas: 8095, ftsSSL: 18094, ftsGRPCSSL: 19130 13:59:34.399 INFO ▶ indexScan: 9101 13:59:34.399 INFO ▶ [1] 40.80.146.52 13:59:34.400 INFO ▶ capiSSL: 18092, mgmtSSL: 18091, indexStreamInit: 9103 13:59:34.400 INFO ▶ indexStreamCatchup: 9104, indexStreamMaint: 9105, indexHttps: 19102 13:59:34.400 INFO ▶ n1ql: 8093, n1qlSSL: 18093, cbasSSL: 18095 13:59:34.401 INFO ▶ eventingDebug: 9140, eventingSSL: 18096, fts: 8094 13:59:34.401 INFO ▶ ftsGRPC: 9130, mgmt: 8091, cbas: 8095 13:59:34.402 INFO ▶ eventingAdminPort: 8096, indexScan: 9101, kvSSL: 11207 13:59:34.402 INFO ▶ capi: 8092, projector: 9999, ftsSSL: 18094 13:59:34.403 INFO ▶ ftsGRPCSSL: 19130, indexAdmin: 9100, indexHttp: 9102 13:59:34.403 INFO ▶ kv: 11210 13:59:34.403 INFO ▶ [2] 13.82.230.238 13:59:34.404 INFO ▶ kv: 11210, projector: 9999, eventingSSL: 18096 13:59:34.404 INFO ▶ indexStreamInit: 9103, indexHttps: 19102, indexStreamMaint: 9105 13:59:34.405 INFO ▶ kvSSL: 11207, capiSSL: 18092, eventingAdminPort: 8096 13:59:34.406 INFO ▶ ftsGRPC: 9130, indexScan: 9101, ftsGRPCSSL: 19130 13:59:34.406 INFO ▶ indexStreamCatchup: 9104, n1ql: 8093, n1qlSSL: 18093 13:59:34.407 INFO ▶ mgmt: 8091, mgmtSSL: 18091, ftsSSL: 18094 13:59:34.407 INFO ▶ fts: 8094, indexAdmin: 9100, indexHttp: 9102 13:59:34.407 INFO ▶ capi: 8092, cbas: 8095, cbasSSL: 18095 13:59:34.408 INFO ▶ eventingDebug: 9140 13:59:34.408 INFO ▶ Fetching config from `https://40.80.151.197:8091` 13:59:34.511 INFO ▶ Received cluster configuration, nodes list: [ { "addressFamily": "inet", "alternateAddresses": { "external": { "hostname": "40.80.151.197", "ports": { "capi": 8092, "capiSSL": 18092, "kv": 11210, "mgmt": 8091, "mgmtSSL": 18091 } } }, "clusterCompatibility": 393222, "clusterMembership": "active", "configuredHostname": "10.0.0.4:8091", "couchApiBase": "https://10.0.0.4:8092/", "couchApiBaseHTTPS": "https://10.0.0.4:18092/", "cpuCount": 4, "externalListeners": [ { "afamily": "inet", "nodeEncryption": false }, { "afamily": "inet6", "nodeEncryption": false } ], "hostname": "10.0.0.4:8091", "interestingStats": { "cmd_get": 0, "couch_docs_actual_disk_size": 17689291, "couch_docs_data_size": 11756324, "couch_spatial_data_size": 0, "couch_spatial_disk_size": 0, "couch_views_actual_disk_size": 22774, "couch_views_data_size": 11416, "curr_items": 2475, "curr_items_tot": 4897, "ep_bg_fetched": 0, "get_hits": 0, "mem_used": 22484624, "ops": 0, "vb_active_num_non_resident": 0, "vb_replica_curr_items": 2422 }, "mcdMemoryAllocated": 22468, "mcdMemoryReserved": 22468, "memoryFree": 27792080896, "memoryTotal": 29450268672, "nodeEncryption": false, "nodeUUID": "616c0853d0e7cbacab9cbdd6ec7a51f7", "os": "x86_64-unknown-linux-gnu", "otpNode": "ns_1@10.0.0.4", "ports": { "direct": 11210, "distTCP": 21100, "distTLS": 21150, "httpsCAPI": 18092, "httpsMgmt": 18091 }, "recoveryType": "none", "services": [ "cbas", "eventing", "fts", "index", "kv", "n1ql" ], "status": "healthy", "systemStats": { "allocstall": 0, "cpu_cores_available": 4, "cpu_stolen_rate": 0, "cpu_utilization_rate": 3.282828282828283, "mem_free": 27792080896, "mem_limit": 29450268672, "mem_total": 29450268672, "swap_total": 0, "swap_used": 0 }, "thisNode": true, "uptime": "1122", "version": "6.6.2-9588-enterprise" }, { "addressFamily": "inet", "alternateAddresses": { "external": { "hostname": "40.80.146.52", "ports": { "capi": 8092, "capiSSL": 18092, "kv": 11210, "mgmt": 8091, "mgmtSSL": 18091 } } }, "clusterCompatibility": 393222, "clusterMembership": "active", "configuredHostname": "10.0.0.5:8091", "couchApiBase": "https://10.0.0.5:8092/", "couchApiBaseHTTPS": "https://10.0.0.5:18092/", "cpuCount": 4, "externalListeners": [ { "afamily": "inet", "nodeEncryption": false }, { "afamily": "inet6", "nodeEncryption": false } ], "hostname": "10.0.0.5:8091", "interestingStats": { "cmd_get": 0, "couch_docs_actual_disk_size": 17275589, "couch_docs_data_size": 11350638, "couch_spatial_data_size": 0, "couch_spatial_disk_size": 0, "couch_views_actual_disk_size": 22737, "couch_views_data_size": 11408, "curr_items": 2415, "curr_items_tot": 4862, "ep_bg_fetched": 0, "get_hits": 0, "mem_used": 22640944, "ops": 0, "vb_active_num_non_resident": 0, "vb_replica_curr_items": 2447 }, "mcdMemoryAllocated": 22468, "mcdMemoryReserved": 22468, "memoryFree": 28102778880, "memoryTotal": 29450268672, "nodeEncryption": false, "nodeUUID": "94565e32208f2d93915124d49842258c", "os": "x86_64-unknown-linux-gnu", "otpNode": "ns_1@10.0.0.5", "ports": { "direct": 11210, "distTCP": 21100, "distTLS": 21150, "httpsCAPI": 18092, "httpsMgmt": 18091 }, "recoveryType": "none", "services": [ "cbas", "eventing", "fts", "index", "kv", "n1ql" ], "status": "healthy", "systemStats": { "allocstall": 0, "cpu_cores_available": 4, "cpu_stolen_rate": 0, "cpu_utilization_rate": 2.763819095477387, "mem_free": 28102778880, "mem_limit": 29450268672, "mem_total": 29450268672, "swap_total": 0, "swap_used": 0 }, "uptime": "1367", "version": "6.6.2-9588-enterprise" }, { "addressFamily": "inet", "alternateAddresses": { "external": { "hostname": "13.82.230.238", "ports": { "capi": 8092, "capiSSL": 18092, "kv": 11210, "mgmt": 8091, "mgmtSSL": 18091 } } }, "clusterCompatibility": 393222, "clusterMembership": "active", "configuredHostname": "10.0.0.6:8091", "couchApiBase": "https://10.0.0.6:8092/", "couchApiBaseHTTPS": "https://10.0.0.6:18092/", "cpuCount": 4, "externalListeners": [ { "afamily": "inet", "nodeEncryption": false }, { "afamily": "inet6", "nodeEncryption": false } ], "hostname": "10.0.0.6:8091", "interestingStats": { "cmd_get": 0, "couch_docs_actual_disk_size": 17363691, "couch_docs_data_size": 11432558, "couch_spatial_data_size": 0, "couch_spatial_disk_size": 0, "couch_views_actual_disk_size": 22756, "couch_views_data_size": 11415, "curr_items": 2413, "curr_items_tot": 4847, "ep_bg_fetched": 0, "get_hits": 0, "mem_used": 22550192, "ops": 0, "vb_active_num_non_resident": 0, "vb_replica_curr_items": 2434 }, "mcdMemoryAllocated": 22468, "mcdMemoryReserved": 22468, "memoryFree": 28038606848, "memoryTotal": 29450268672, "nodeEncryption": false, "nodeUUID": "d66d1a929cde564fa27cec0d3ef56520", "os": "x86_64-unknown-linux-gnu", "otpNode": "ns_1@10.0.0.6", "ports": { "direct": 11210, "distTCP": 21100, "distTLS": 21150, "httpsCAPI": 18092, "httpsMgmt": 18091 }, "recoveryType": "none", "services": [ "cbas", "eventing", "fts", "index", "kv", "n1ql" ], "status": "healthy", "systemStats": { "allocstall": 0, "cpu_cores_available": 4, "cpu_stolen_rate": 0, "cpu_utilization_rate": 1.754385964912281, "mem_free": 28038606848, "mem_limit": 29450268672, "mem_total": 29450268672, "swap_total": 0, "swap_used": 0 }, "uptime": "1136", "version": "6.6.2-9588-enterprise" } ] 13:59:34.706 INFO ▶ Successfully connected to Key Value service at `40.80.151.197:11210` 13:59:34.845 INFO ▶ Successfully connected to Management service at `40.80.151.197:8091` 13:59:34.933 INFO ▶ Successfully connected to Views service at `40.80.151.197:8092` 13:59:35.020 INFO ▶ Successfully connected to Query service at `40.80.151.197:8093` 13:59:35.108 INFO ▶ Successfully connected to Search service at `40.80.151.197:8094` 13:59:35.200 INFO ▶ Successfully connected to Analytics service at `40.80.151.197:8095` 13:59:35.377 INFO ▶ Successfully connected to Key Value service at `40.80.146.52:11210` 13:59:35.515 INFO ▶ Successfully connected to Management service at `40.80.146.52:8091` 13:59:35.619 INFO ▶ Successfully connected to Views service at `40.80.146.52:8092` 13:59:35.713 INFO ▶ Successfully connected to Query service at `40.80.146.52:8093` 13:59:35.803 INFO ▶ Successfully connected to Search service at `40.80.146.52:8094` 13:59:35.903 INFO ▶ Successfully connected to Analytics service at `40.80.146.52:8095` 13:59:36.074 INFO ▶ Successfully connected to Key Value service at `13.82.230.238:11210` 13:59:36.206 INFO ▶ Successfully connected to Management service at `13.82.230.238:8091` 13:59:36.308 INFO ▶ Successfully connected to Views service at `13.82.230.238:8092` 13:59:36.397 INFO ▶ Successfully connected to Query service at `13.82.230.238:8093` 13:59:36.487 INFO ▶ Successfully connected to Search service at `13.82.230.238:8094` 13:59:36.591 INFO ▶ Successfully connected to Analytics service at `13.82.230.238:8095` 13:59:37.207 INFO ▶ Memd Nop Pinged `40.80.151.197:11210` 10 times, 0 errors, 42ms min, 45ms max, 43ms mean 13:59:37.208 WARN ▶ Memcached service on `40.80.151.197:11210` on average took longer than 10ms (was: 43ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:37.209 WARN ▶ Memcached service on `40.80.151.197:11210` maximally took longer than 20ms (was: 45ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:37.803 INFO ▶ Memd Nop Pinged `40.80.146.52:11210` 10 times, 0 errors, 42ms min, 42ms max, 42ms mean 13:59:37.804 WARN ▶ Memcached service on `40.80.146.52:11210` on average took longer than 10ms (was: 42ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:37.804 WARN ▶ Memcached service on `40.80.146.52:11210` maximally took longer than 20ms (was: 42ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:38.423 INFO ▶ Memd Nop Pinged `13.82.230.238:11210` 10 times, 0 errors, 43ms min, 44ms max, 44ms mean 13:59:38.423 WARN ▶ Memcached service on `13.82.230.238:11210` on average took longer than 10ms (was: 44ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:38.423 WARN ▶ Memcached service on `13.82.230.238:11210` maximally took longer than 20ms (was: 44ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. 13:59:38.424 INFO ▶ Diagnostics completed Summary: [WARN] Bootstrap host `40.80.151.197` is not using the canonical node hostname of `10.0.0.4`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Bootstrap host `40.80.146.52` is not using the canonical node hostname of `10.0.0.5`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Bootstrap host `13.82.230.238` is not using the canonical node hostname of `10.0.0.6`. This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured. [WARN] Memcached service on `40.80.151.197:11210` on average took longer than 10ms (was: 43ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. [WARN] Memcached service on `40.80.151.197:11210` maximally took longer than 20ms (was: 45ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. [WARN] Memcached service on `40.80.146.52:11210` on average took longer than 10ms (was: 42ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. [WARN] Memcached service on `40.80.146.52:11210` maximally took longer than 20ms (was: 42ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. [WARN] Memcached service on `13.82.230.238:11210` on average took longer than 10ms (was: 44ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. [WARN] Memcached service on `13.82.230.238:11210` maximally took longer than 20ms (was: 44ms) to reply. This is usually due to network-related issues, and could significantly affect application performance. Found multiple issues, see listing above. |
¡Éxito!
Conclusión
Conectarse a clusters de Couchbase en la nube ofrece muchas ventajas. Pero a veces -debido a diversos requisitos de red y seguridad- la naturaleza remota y distribuida de los sistemas puede causar complicaciones entre el SDK de tu app y el clúster de Couchbase.
Mediante el uso de las direcciones Doctor y Alternate del SDK de Couchbase, puede solucionar fácilmente cualquier complicación que surja y solucionar los problemas de conexión de inmediato.