asynkron / protoactor-dotnet

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
http://proto.actor
Apache License 2.0
1.73k stars 288 forks source link

ClusterHelloWorld Example Node1 can not reconnect to Node2 after restart. #234

Closed yindongfei closed 7 years ago

yindongfei commented 7 years ago

Hi, When I play with protoactor examples, I find two problems in ClusterHelloWorld example.

  1. Node1 can not reconnect to Node2 after restart,
  2. If I first start Node1, then Node2, connection can not established. I must start Node2 first and then Node1.

My question is: this is a bug for feature, if its feature, what is suggested way to fix 1 and 2.

rogeralsing commented 7 years ago

Problem 2 should be working in the dev branch, is your git repo up to date? If you are still seeing this with the latest code, let us know.

Regarding 1, I will look into this, restarting nodes should be possible, the node should get a new "UID" and re-join.

yindongfei commented 7 years ago

My git repo is up to date, ClusterHelloWorld example has fix this, but ClusterGrainHelloWorld example still has the same problem 2.

yindongfei commented 7 years ago

I want to use protoactor to build our mmo game server, orleans has been checked and proformance is not acceptable. protoactor seems a good choice.

yindongfei commented 7 years ago

@rogeralsing Problem 2 still there and my git repo is up to date, when I start Node1, then Node2 within 1 second, connection can establish. when the fail log shown, Node1 can not connect to Node2 forever.

dbug: Proto.Remote.EndpointManager[0]
      Started EndpointManager
dbug: Proto.Remote.Remote[0]
      Starting Proto.Actor server on 127.0.0.1:12001
dbug: Proto.Remote.EndpointWriter[0]
      Connecting to address 127.0.0.1:12000
dbug: Proto.Remote.EndpointWriter[0]
      Connected to address 127.0.0.1:12000
fail: Proto.Remote.EndpointWriter[0]
      Lost connection to address 127.0.0.1:12000, reason Status(StatusCode=Unavailable, Detail="Connect Failed")
fail: Proto.Remote.EndpointWriter[0]
      gRPC Failed to send to address 127.0.0.1:12000, reason Status(StatusCode=Unavailable, Detail="Connect Failed")

I can not start server exactly one by one in order and i can not figure this out. so please fix this and i can continue to develop our game server :)

rogeralsing commented 7 years ago

@yindongfei can you check using the latest code in Dev here if your problem is solved?

yindongfei commented 7 years ago

@rogeralsing thanks for your fix, problem solved, Example ClusterGrainHelloWorld, ClusterHelloWorld, RemoteBenchmark have been tested, all problem 1 and 2 are solved. excellent work.

rogeralsing commented 7 years ago

👍