首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有Azure Linux VM的Couchbase

带有Azure Linux VM的Couchbase
EN

Stack Overflow用户
提问于 2022-02-10 04:12:01
回答 2查看 105关注 0票数 2

我在Azure上安装了ubuntu服务器VM,在那里我安装了couchbase社区版本,现在我需要使用dotnet访问couchbase,但是代码给了我桶,找不到或者无法到达的错误。甚至我也尝试配置一个公共dns,并在集群创建过程中将它作为ip提供,但仍然是如此。甚至我在主机文件中添加了公共dns,比如下面的127.0.0.1公共dns,SDK日志包括以下2条语句,试图在端点"name.eastus.cloudapp.azure.com“上引导失败。(e80489ed)连接尝试失败是因为连接方在一段时间后没有正确响应,或者建立连接失败是因为连接主机没有响应。

SDK医生日志:

代码语言:javascript
复制
09:51:20.331 INFO ▶ Parsing connection string `couchbases://hsotname.eastus.cloudapp.azure.com/travel-sample`
09:51:20.334 INFO ▶ Connection string was parsed as a potential DNS SRV record
09:51:31.316 INFO ▶ Connection string specifies to use secured connections
09:51:31.316 INFO ▶ Connection string identifies the following CCCP endpoints:
09:51:31.316 INFO ▶   1. hsotname.eastus.cloudapp.azure.com:11207
09:51:31.316 INFO ▶ Connection string identifies the following HTTP endpoints:
09:51:31.316 INFO ▶   1. hsotname.eastus.cloudapp.azure.com:18091
09:51:31.316 INFO ▶ Connection string specifies bucket `travel-sample`
09:51:31.316 WARN ▶ No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
09:51:42.453 WARN ▶ Your connection string specifies only a single host.  You should consider adding additional static nodes from your cluster to this list to improve your applications fault-tolerance
09:51:42.462 INFO ▶ Performing DNS lookup for host `hsotname.eastus.cloudapp.azure.com`
09:51:42.462 INFO ▶ Bootstrap host `hsotname.eastus.cloudapp.azure.com` refers to a server with the address `13.82.80.55`
09:51:42.462 INFO ▶ Attempting to connect to cluster via CCCP
09:51:42.463 INFO ▶ Attempting to fetch config via cccp from `hsotname.eastus.cloudapp.azure.com:11207`
09:51:44.474 ERRO ▶ Failed to fetch configuration via cccp from `hsotname.eastus.cloudapp.azure.com:11207` (error: dial tcp 13.82.80.55:11207: i/o timeout)
09:51:44.474 INFO ▶ Attempting to connect to cluster via HTTP (Terse)
09:51:44.474 INFO ▶ Attempting to fetch terse config via http from `hsotname.eastus.cloudapp.azure.com:18091`
09:51:46.480 ERRO ▶ Failed to fetch terse configuration via http from `hsotname.eastus.cloudapp.azure.com:18091` (error: Get "http://hsotname.eastus.cloudapp.azure.com:18091/pools/default/b/travel-sample": context deadline exceeded (Client.Timeout exceeded while awaiting headers))
09:51:46.480 INFO ▶ Attempting to connect to cluster via HTTP (Full)
09:51:46.480 INFO ▶ Failed to connect via HTTP (Full), as it is not yet supported by the doctor
09:51:46.481 INFO ▶ Selected the following network type:
09:51:46.481 ERRO ▶ All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible
09:51:46.481 INFO ▶ Diagnostics completed

Summary:
←[33m[WARN]←[0m No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
←[33m[WARN]←[0m Your connection string specifies only a single host.  You should consider adding additional static nodes from your cluster to this list to improve your applications fault-tolerance
←[31m[ERRO]←[0m Failed to fetch configuration via cccp from `hsotname.eastus.cloudapp.azure.com:11207` (error: dial tcp 13.82.80.55:11207: i/o timeout)
←[31m[ERRO]←[0m Failed to fetch terse configuration via http from `hsotname.eastus.cloudapp.azure.com:18091` (error: Get "http://hsotname.eastus.cloudapp.azure.com:18091/pools/default/b/travel-sample": context deadline exceeded (Client.Timeout exceeded while awaiting headers))
←[31m[ERRO]←[0m All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible

Found multiple issues, see listing above.

我添加了18091和11207端口作为入站规则。我的ufw状态是不活动的,上面提到的两个端口没有监听。

couchbaseadm@couchbasedbserver:~$ sudo lsof -i -P -n \ grep侦听

代码语言:javascript
复制
systemd-r   926 systemd-resolve   13u  IPv4   18715      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd       1103            root    3u  IPv4   21086      0t0  TCP *:22 (LISTEN)
sshd       1103            root    4u  IPv6   21088      0t0  TCP *:22 (LISTEN)
beam.smp   6323       couchbase   17u  IPv4 3937812      0t0  TCP 127.0.0.1:21200 (LISTEN)
epmd       6354       couchbase    3u  IPv4 3937267      0t0  TCP *:4369 (LISTEN)
epmd       6354       couchbase    4u  IPv6 3937268      0t0  TCP *:4369 (LISTEN)
beam.smp   6465       couchbase   34u  IPv4 3943391      0t0  TCP *:21100 (LISTEN)
beam.smp   6465       couchbase   48u  IPv4 3938657      0t0  TCP *:8091 (LISTEN)
beam.smp   6514       couchbase   17u  IPv4 3938608      0t0  TCP 127.0.0.1:21300 (LISTEN)
beam.smp   6514       couchbase   27u  IPv4 3938628      0t0  TCP *:8092 (LISTEN)
prometheu  6563       couchbase    9u  IPv4 3938650      0t0  TCP 127.0.0.1:9123 (LISTEN)
goxdcr     6583       couchbase   11u  IPv4 3938705      0t0  TCP 127.0.0.1:9998 (LISTEN)
memcached  6592       couchbase    5u  IPv4 3938689      0t0  TCP 127.0.0.1:11280 (LISTEN)
memcached  6592       couchbase   12u  IPv4 3937931      0t0  TCP *:11210 (LISTEN)
memcached  6592       couchbase   13u  IPv4 3937932      0t0  TCP *:11209 (LISTEN)
memcached  6592       couchbase   14u  IPv6 3937933      0t0  TCP *:11210 (LISTEN)
memcached  6592       couchbase   15u  IPv6 3937934      0t0  TCP *:11209 (LISTEN)
indexer    6741       couchbase   16u  IPv4 3944492      0t0  TCP *:9101 (LISTEN)
indexer    6741       couchbase   19u  IPv4 3944066      0t0  TCP *:9100 (LISTEN)
indexer    6741       couchbase   20u  IPv4 3944500      0t0  TCP *:9102 (LISTEN)
indexer    6741       couchbase   69u  IPv4 3946013      0t0  TCP *:9105 (LISTEN)
projector  6762       couchbase    9u  IPv4 3944075      0t0  TCP *:9999 (LISTEN)
cbq-engin  6782       couchbase    7u  IPv6 3944534      0t0  TCP *:8093 (LISTEN)
cbq-engin  6782       couchbase    8u  IPv4 3944535      0t0  TCP *:8093 (LISTEN)
cbft       6799       couchbase    8u  IPv4 3944112      0t0  TCP *:9130 (LISTEN)
cbft       6799       couchbase    9u  IPv4 3944149      0t0  TCP *:8094 (LISTEN)
sync_gate 11950    sync_gateway    8u  IPv4 4119414      0t0  TCP 127.0.0.1:4985 (LISTEN)
sync_gate 11950    sync_gateway    9u  IPv6 4119422      0t0  TCP *:4984 (LISTEN)

这里是堆栈跟踪:

代码语言:javascript
复制
StackTrace " at Couchbase.Core.ClusterContext.d__58.MoveNext()\r\n
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Threading.Tasks.ValueTask1.get_Result()\r\n at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable1.ConfiguredValueTaskAwaiter.GetResult()\r\n
at Couchbase.Cluster.<>c__DisplayClass30_0.<b__0>d.MoveNext()\r\n
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Threading.Tasks.ValueTask1.get_Result()\r\n at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable1.ConfiguredValueTaskAwaiter.GetResult()\r\n

Dotnet日志

代码语言:javascript
复制
2022-02-09T17:28:46.3409884+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:48.8643285+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:48.8649060+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:51.3664735+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:51.3667541+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:53.8811651+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:53.8814100+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:56.3823825+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:56.3826183+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:58.8964320+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:58.8967224+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:01.4007664+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:01.4010274+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:01.7019750+05:30  [INF] Error trying to retrieve DNS SRV entries. (addddf06)
DnsClient.DnsResponseException: Query 12389 => _couchbases._tcp.hsotname.eastus.cloudapp.azure.com IN SRV on 192.168.8.1:53 timed out or is a transient error.
 ---> System.OperationCanceledException: The operation was canceled.
   at System.Threading.Tasks.TaskExtensions.WithCancellation[T](Task`1 task, CancellationToken cancellationToken, Action onCancel)
   at DnsClient.LookupClient.ResolveQueryAsync(IReadOnlyList`1 servers, DnsQuerySettings settings, DnsMessageHandler handler, DnsRequestMessage request, LookupClientAudit audit, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at DnsClient.LookupClient.ResolveQueryAsync(IReadOnlyList`1 servers, DnsQuerySettings settings, DnsMessageHandler handler, DnsRequestMessage request, LookupClientAudit audit, CancellationToken cancellationToken)
   at DnsClient.LookupClient.QueryInternalAsync(DnsQuestion question, DnsQuerySettings queryOptions, IReadOnlyCollection`1 servers, CancellationToken cancellationToken)
   at Couchbase.DnsClientDnsResolver.GetDnsSrvEntriesAsync(Uri bootstrapUri, CancellationToken cancellationToken)
   at Couchbase.Core.ClusterContext.BootstrapGlobalAsync()
2022-02-09T17:29:01.7034867+05:30  [DBG] Bootstrapping with node "hsotname.eastus.cloudapp.azure.com" (98ca0e33)
2022-02-09T17:29:03.9124149+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:03.9127285+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:06.4201295+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:06.4205385+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:08.9317820+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:08.9320832+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:11.4459313+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:11.4463142+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:12.1488979+05:30  [DBG] Attempted bootstrapping on endpoint "hsotname.eastus.cloudapp.azure.com" has failed. (e80489ed)
System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
   at Couchbase.Core.ClusterNode.InitializeAsync()
   at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
   at Couchbase.Core.ClusterContext.BootstrapGlobalAsync()
2022-02-09T17:29:33.3259787+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:33.3262710+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:35.8341848+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:35.8343993+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:36.9552318+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:36.9596725+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:37.0170984+05:30  [INF] Cannot bootstrap bucket "travel-sample" as Couchbase. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
   at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
   at Couchbase.Core.ClusterNode.InitializeAsync()
   at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
   at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
   at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)
2022-02-09T17:29:38.3360012+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:38.3361875+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:40.3244490+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:40.3507801+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:40.3525230+05:30  [INF] Cannot bootstrap bucket "travel-sample" as Memcached. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
   at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
   at Couchbase.Core.ClusterNode.InitializeAsync()
   at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
   at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
   at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)
2022-02-09T17:29:40.8385667+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:40.8387609+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:43.3380840+05:30  [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:43.3382393+05:30  [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:43.6633010+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:43.6842924+05:30  [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:43.6862758+05:30  [INF] Cannot bootstrap bucket "travel-sample" as Ephemeral. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
   at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
   at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
   at Couchbase.Core.ClusterNode.InitializeAsync()
   at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
   at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
   at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)

谢谢!!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-02-14 06:58:56

我通过更改couchbase的连接字符串来解决这个问题。

从…

代码语言:javascript
复制
couchbase:// 

代码语言:javascript
复制
http://
票数 0
EN

Stack Overflow用户

发布于 2022-02-11 17:23:34

感谢您提供如此详细的信息!我怀疑当前的问题是,您正在尝试使用TLS进行连接,Couchbase Community不支持TLS(至少在2022年2月不支持TLS)。端口11207和18091用于TLS连接;正如您在lsof输出中看到的那样,服务器没有监听这些端口。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71059720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档