Why do I get this when I try to connect to a cluster with .Net Client api?
[21168,07,14:27:17.675] Internal TCP connection accepted: [Normal, 127.0.0.1:116
08, L127.0.0.1:2111, {e760b858-290c-40bb-aef3-212e05d0964c}].
[21168,26,14:27:17.691] FRAMING ERROR! Data:
000000: 47 45 54 20 2F 67 6F 73 73 69 70 3F 66 6F 72 6D | GET /gossip?form
000016: 61 74 3D 6A 73 6F 6E 20 48 54 54 50 2F 31 2E 31 | at=json HTTP/1.1
000032: 0D 0A 48 6F 73 74 3A 20 31 32 37 2E 30 2E 30 2E | …Host: 127.0.0.
000048: 31 3A 32 31 31 31 0D 0A 43 6F 6E 6E 65 63 74 69 | 1:2111…Connecti
000064: 6F 6E 3A 20 4B 65 65 70 2D 41 6C 69 76 65 0D 0A | on: Keep-Alive…
000080: 0D 0A | …
[21168,07,14:27:17.691] ES TcpConnection closed [14:27:17.691: N127.0.0.1:11608,
L127.0.0.1:2111, {e760b858-290c-40bb-aef3-212e05d0964c}]:
Received bytes: 82, Sent bytes: 0
Send calls: 1, callbacks: 0
Receive calls: 2, callbacks: 2
Close reason: [Success] Socket closed
[21168,07,14:27:17.691] Connection ‘internal-normal’ [127.0.0.1:11608, {e760b858
-290c-40bb-aef3-212e05d0964c}] closed: Success.
I send in the IPEndpoints of all nodes in the cluster:
IPAddress address;
IPAddress.TryParse(“127.0.0.1”, out address);
var ep1 = new IPEndPoint(address, 1111);
var ep2 = new IPEndPoint(address, 2111);
var ep3 = new IPEndPoint(address, 3111);
return new[] { ep1, ep2, ep3 };
then
var clusterSettings = ClusterSettings.Create()
.DiscoverClusterViaGossipSeeds()
.SetGossipSeedEndPoints(_endPoints)
.SetGossipTimeout(new TimeSpan(0, 0, 30))
.SetMaxDiscoverAttempts(10)
.Build();
var connectionSettings = ConnectionSettings.Create()
.SetDefaultUserCredentials(new UserCredentials(“admin”, “changeit”))
.SetHeartbeatInterval(new TimeSpan(0, 0, 0, 0, 500))
.SetHeartbeatTimeout(new TimeSpan(0, 0, 0, 0, 1000))
.SetReconnectionDelayTo(new TimeSpan(0, 0, 10))
.WithConnectionTimeoutOf(new TimeSpan(0, 0, 15))
.KeepReconnecting()
.KeepRetrying()
.PerformOnMasterOnly()
.Build();
var connection = EventStoreConnection.Create(connectionSettings, clusterSettings);
and then connectasync, and then the GetEventStoreRepository from common domain.
I get an InvalidOperationException and my nodes show the errors above.