These are chat archives for akkadotnet/akka.net

28th
Feb 2017
thakursagar
@thakursagar
Feb 28 2017 01:51
Hello everyone, I am new to Akka.Cluster world and I was trying to deploy this project on Azure Cloud Services after being able to successfully run it locally. I changed the public-hostname to my name.cloudapp.net in the configs but the worker roles keep recycling when i try to publish. Am I missing any basic thing for this?
Aaron Stannard
@Aaronontheweb
Feb 28 2017 01:54
@akshay123 yeah we should just put a page up that links to all of the default HOCONs
they're all inside the Config folders of each main module as an embedded assembly
@thakursagar I wrote that solution originally and also tried getting it up and running as an Azure cloud service
I ran into the same issue with the worker roles
honestly cloud services is a terrible platform to run anything that's not a stateless CRUD ASP.NET application
it's too stupid for anything more sophisticated
I was able to get everything working beautifully on the Azure emulator locally
modifying that sample with some small changes
but ran into issues with my worker roles hanging themselves on something about 10 minutes into deployment
never had that issue on Azure ARM
or EC2
thakursagar
@thakursagar
Feb 28 2017 03:09
@Aaronontheweb thanks aaron. I would try it with Azure ARM then.
Nick Cuthbert
@ncthbrt
Feb 28 2017 14:37
We've been using $10 AzureVMs, VM tags, Topshelf and powershell to better effect than cloud services
Nick Cuthbert
@ncthbrt
Feb 28 2017 14:46
@thakursagar Scripts in question if that helps: https://gist.github.com/ncthbrt/cc8848b7fb93b1438b70bf9ad7ca8602
Also cheated a little for deployment. Used the prebuilt AzureFileCopy vsts task to copy the code to the correct machine and enable remote powershell:
blob
Aaron Stannard
@Aaronontheweb
Feb 28 2017 17:12
@nvivo just occurred to me
your issue with the IIS restarts affecting the cluster
you mentioned the overlapped AppPool recycling being the problem
this is a bit of a hack, but one thing we could do to resolve this
the new CoordinatedShutdown that we're adding in 1.2 (I'm literally working on it right now) has the ability to trigger clean cluster shutdown on process exit, including terminating the underlying actor system
I'm assuming that IIS' AppPool recycling involves killing off the old worker process
while simultaneously starting a new one
hence the overlap, right?
when the old process is killed and the CoordinatedShutdown runs
it will kill the socket too
as part of the shutdown process
in the new process that is starting up
we can do a spin-retry-loop while we wait for the socket to become available, and that would kill / recreate the ActorSystem
Aaron Stannard
@Aaronontheweb
Feb 28 2017 17:17
the other approach that you mentioned in your github issue was just using a dynamic port
the problem with those is that it becomes difficult for the cluster to distinguish what's a brand new node joining versus an old node restarting
but if you're running everything on one host anyway
then that might be less of a problem
technologyblogger
@technologyblogger
Feb 28 2017 18:32
Hi everyone.. I am trying to setup akka.net cluster sharding by creating a very simple project. Even after excluding (if i am doing it correctly) lighthouse from sharding role..the coordinator doesnt seem to be getting intialized..and messages sent through sharded proxy region are not getting delivered. Can someone pls. help and point me in the right direction.. I have asked the question on stackoverflow..it contains the images of output that i am seeing... http://stackoverflow.com/questions/42498504/akka-net-cluster-sharding-unable-to-register-coordinator
Bartosz Sypytkowski
@Horusiath
Feb 28 2017 18:41
@technologyblogger do you have any errors?
technologyblogger
@technologyblogger
Feb 28 2017 18:50
@Horusiath the outputs are uploaded in form of images at https://imgur.com/a/VvZS4
1) The coordinator is shown as unitialized
2) EmptyLocalActorRef: Message RegisterProxy from /user/sharding/processoractor to /user/sharding/ProcessorActorCoordinator/singleton/coordinator was not delivered
Bartosz Sypytkowski
@Horusiath
Feb 28 2017 18:54
unregistered coordinator is enough. Cluster sharding won't work without it
technologyblogger
@technologyblogger
Feb 28 2017 18:56
Am i missing any setting or doing something incorrectly here ?
Bartosz Sypytkowski
@Horusiath
Feb 28 2017 19:17
@technologyblogger two things:
  1. You've configured role name for cluster sharding to shardnode, yet when trying to create proxy with StartProxy method, you've set role: null. You need to use shardnode
  2. SampleMessageExtractor.EntityMessage is used to extract a message from envelope to be passed to an actor. In your code it returns a SampleMessage.Message property of type string. But in ProcessorActor you are using Receive<SampleMessage> - it will never be called as extractor will pass that string property as a message itself.
technologyblogger
@technologyblogger
Feb 28 2017 19:21
@Horusiath thanks..made those changes.. still the coordinator uninitialized problem not resolved
Bartosz Sypytkowski
@Horusiath
Feb 28 2017 19:27
the uninitialized log line itself was not a problem
I've downloaded your sample, after those changes I've run Lighthouse, then Inbound, then MessageProducer and it worked
technologyblogger
@technologyblogger
Feb 28 2017 19:32
@Horusiath thanks a lot.. i was assuming uninitialized to be an issue.. ran the message producer and it worked...
Sean Farrow
@SeanFarrow
Feb 28 2017 21:38
Is there a way to create an actor under the TestActor. I've got an actor that assumes it can communicate with it's parent and am wondering how to test this using the TestKit? Using ActorOf, just seems to call Sys.ActorOf. Any advice apreciated.
Aaron Stannard
@Aaronontheweb
Feb 28 2017 21:52
@SeanFarrow TestActorOf<TActor> I think