按照docs中提供的说明,我成功设置了集群的第一个节点。在继续关注下一个节点的文档时,我遇到了这个:
[17:44:41 INFO] Continuing cluster setup on node B.
Cluster setup on node B has failed
System.InvalidOperationException: Cluster setup on node B has failed
---> System.InvalidOperationException: Validation failed.
---> System.InvalidOperationException: Failed to simulate running the server with the supplied settings using: https://b.otis.ravendb.community
---> System.InvalidOperationException: Failed to start WebHost on node 'B'. The specified ip address might not be reachable due to network issues.
It can happen if the ip is external (behind a firewall, docker). If this is the case, try going back to the previous screen and add the same ip as an external ip.
Settings file:E:\Hackathon\DevWeek\RavenDB\Cluster Parent\Node B\Server\settings.json.
IP addresses: 192.168.124.2:443.
---> System.Net.Sockets.SocketException (10049): The requested address is not valid in its context.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
这是里面提到的settings.json文件:
{
"ServerUrl": "http://192.168.124.2:443",
"Setup.Mode": "Initial",
"DataDir": "RavenData",
"License.Eula.Accepted": true
}
第一次发生错误时,“ServerUrl”最初是“http://127.0.0.1:0”,但它仍然存在。
让我们从确定集群地址的 IP 开始:
$ dig b.otis.ravendb.community| grep 192
b.otis.ravendb.community. 1800 IN A 192.168.124.2
$ dig a.otis.ravendb.community| grep 192
a.otis.ravendb.community. 1800 IN A 192.168.124.1
错误
Failed to start WebHost on node 'B'. The specified ip address might not be reachable due to network issues.
表示您尝试在 IP 与配置中设置的 IP 不同的计算机上设置节点 B - 192.168.124.2.
在服务器运行模拟期间
Socket.Bind()
调用失败,因为主机不是 192.168.124.2。