These are chat archives for akkadotnet/akka.net

7th
Jul 2016
Steven Harrap
@stevenharrap
Jul 07 2016 00:09

Hi. I'm having trouble with Dependency Injection in regard to mixing a constructors parameters. Say I have an actor system with DI and I register a class "SomeClassA" and an actor class "ActorClassB" with the DI container. ActorClassB has the following constructor "ActorClassB(SomeClassA a, int x)" where I want to provide the "x" parameter when the ActorClassB is created (probably as a child actor) somewhere in my actor system.

If ActorClassB had no "x" parameter then it would be a quick "Context.ActorOf(Context.DI().Props<ActorClassB>())". But now I need to supply the "x" parameter and the "Context.DI().Props" method provides no means of adding named parameters.

I can think of some dodgy solutions involving global containers and so forth but it feels very wrong. Is there a missing peice here or a completely different pattern to follow?

Thanks.

Aaron Stannard
@Aaronontheweb
Jul 07 2016 00:56
@/all 1.1 is now released: akkadotnet/akka.net#2145
Steven Harrap
@stevenharrap
Jul 07 2016 00:59
Excellent stuff!!!
Luis Alexander Aldazabal Gil
@berczeck
Jul 07 2016 00:59
Good job guys ;)
Aaron Stannard
@Aaronontheweb
Jul 07 2016 01:01
lol unfortunately it looks like it'll be about an hour before our build server reaches the NuGet publish stage in the queue :p
blob
although build agent 6 should start soon
Esun Kim
@veblush
Jul 07 2016 01:05
hurrah :tada:
Vagif Abilov
@object
Jul 07 2016 01:34
Congratulations!
Aaron Stannard
@Aaronontheweb
Jul 07 2016 02:00
@/all 1.1 is now live on NuGet: https://www.nuget.org/packages/Akka/
Chris G. Stevens
@cgstevens
Jul 07 2016 04:24
very nice and thank you all for your hard work!
Maciek Misztal
@mmisztal1980
Jul 07 2016 05:37
congrats!
Garrard Kitchen
@garrardkitchen
Jul 07 2016 06:11
A huge, "Thank you!" to @Aaronontheweb & Co for working on the 1.1 release.
Maciek Misztal
@mmisztal1980
Jul 07 2016 06:33
quick question, have the contrib libs like Akka.Logger.* been bumped up to v1.1 too?
Marc Piechura
@marcpiechura
Jul 07 2016 06:35
@mmisztal1980 nop, that will happen independently but they should work out if the box since afaik there aren't any breaking changes in that area
Maciek Misztal
@mmisztal1980
Jul 07 2016 06:36
right, cheers
voltcode
@voltcode
Jul 07 2016 06:50
Congrats on 1.1 !!!!!
voltcode
@voltcode
Jul 07 2016 07:06
let me know when you post on HN so we can help this wonderful piece of news go viral ;)
Aaron Stannard
@Aaronontheweb
Jul 07 2016 07:06
eh, why not now?
voltcode
@voltcode
Jul 07 2016 07:09
upvoted
Peter Bergman
@peter-bannerflow
Jul 07 2016 07:10
Awesome job! Much appreciated!
voltcode
@voltcode
Jul 07 2016 07:19
good stuff, at the top of HN right now
lets keep it there ;)
Aaron Stannard
@Aaronontheweb
Jul 07 2016 07:21
heh, wow
did not expect that
voltcode
@voltcode
Jul 07 2016 07:25
I asked a couple of friends for help (bit of a cheat but hey it's for a good cause), but we need more upvotes to keep it there ;)
Aaron Stannard
@Aaronontheweb
Jul 07 2016 07:29
I've been noticing a lot more interest in .NET on HN over the past couple of years
I remember when I first starting using it 7-8 years ago - got shit on for so much as mentioning C# :P
voltcode
@voltcode
Jul 07 2016 07:35
heh, there's "some" good work that hanselman & co have been doing over the last couple of years, Oracle and their "new" stewardship of Java also helps .NET :)
oops sorry for italics
Aaron Stannard
@Aaronontheweb
Jul 07 2016 07:36
heh. that's true
voltcode
@voltcode
Jul 07 2016 07:45
is wire now the default serializer? can I get rid of json.net dep if I dont use it ?
Esun Kim
@veblush
Jul 07 2016 07:49
@voltcode not yet. 1.5 will change default serializer to wire.
voltcode
@voltcode
Jul 07 2016 08:05
thanks
Garrard Kitchen
@garrardkitchen
Jul 07 2016 09:48

After update to 1.1 cluster wasn't being formed and I was seeing this in logs

016-07-07 10:14:02 [Error] Version=6.0 Partner=Qualtrak MachineName=GK-MBP-PC "Dispatcher [akka.cluster.default-cluster-dispatcher] not configured for path akka://coach/system/cluster/core/daemon/heartbeatSender"
Akka.Configuration.ConfigurationException: Dispatcher [akka.cluster.default-cluster-dispatcher] not configured for path akka://coach/system/cluster/core/daemon/heartbeatSender
at Akka.Actor.LocalActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Remote.RemoteActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Actor.ActorCell.MakeChild(Props props, String name, Boolean async, Boolean systemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name, Boolean isAsync, Boolean isSystemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name)
at Akka.Cluster.ClusterCoreDaemon.BecomeInitialized()
at Akka.Cluster.ClusterCoreDaemon.Join(Address address)
at Akka.Cluster.ClusterCoreDaemon.Uninitialized(Object message)
at Akka.Cluster.ClusterCoreDaemon.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)

Looked for akka.cluster.default-cluster-dispatcher in HOCON and found this:

use-dispatcher = "akka.cluster.default-cluster-dispatcher"

After commenting it out the cluster was formed. No idea what this means but just putting it up here in case anyone hits this after update to 1.1

Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 10:10
@garrardkitchen yes, you should use default dispatcher for cluster
Garrard Kitchen
@garrardkitchen
Jul 07 2016 10:11
Thanks for the confirmation @alexvaluyskiy .
Max
@maxpaj
Jul 07 2016 11:04
What's the correct way to do a graceful shutdown of a cluster node? I'm trying to same thing that's in the Lighthouse code (TopShelf OnStop()-method), but no leaving messages or anything is sent to my seed node when a cluster node is shut down.
I've set the log level to debug and enabled log-info for cluster in the HOCON config
After a node shuts down my Lighthouse node keeps spouting exceptions about not being able to connect to the node that left
Chris Ray
@chris-ray
Jul 07 2016 11:32
Congrats on 1.1 :-)
Bartosz Sypytkowski
@Horusiath
Jul 07 2016 11:49
@maxpaj you can leave the cluster gracefully by var cluster = Cluster.Get(system); cluster.Leave(cluster.SelfAddress)
there is also HOCON config key akka.cluster.auto-down-unreachable-after = <timeout>sto ensure auto downing nodes that cannot be reached, but that introduces a risk of split brain within the cluster in cases such as network partition.
Max
@maxpaj
Jul 07 2016 12:54
@Horusiath I tried adding that snippet to my application Stop-method, however I still get no 'leaving' message on any of the other nodes. On cluster.Leave(), the node is marked as UNREACHABLE, not LEAVING :(
It does say ": Marked address [akka.tcp://mysystem@127.0.0.1:5053] as [Leaving]" in the node that is leaving...
wdspider
@wdspider
Jul 07 2016 13:31
I think you have to use the Cluster.RegisterOnMemberRemoved method (https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Cluster/Cluster.cs#L259) to wait for the cluster.Leave operation to finish. Although at this point, I haven't upgraded to 1.1 yet so I'm just assuming that the method made it into the release (it didn't seem to exist in 1.0.8)
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 13:39
Yes, this method was added in 1.1
ollivogel
@ollivogel
Jul 07 2016 15:31
Hi everybody. In Akka.net 1.07 I could programatically restart an Actor by sending it a Restart.Instance Message. However, this class seems to be missing from 1.1. How can I achieve the same with v 1.1?
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:32
What are the needed changes for remoting to work in 1.1? Upgrading from 1.0.8 to 1.1 broke the simple scenario - server on localhost:10000 and client on localhost. Client now instantly fails with invalid address
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:32
@ollivogel you shouldn't programmatically restart an actor
we made all of those system messages internal going forward
actors should only restart upon throwing an exception
ollivogel
@ollivogel
Jul 07 2016 15:33
Hm, thats bad. What else can I do to tear down an Actor and restart as well as all of its child actors?
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:34
kill it and recreate it
which you can still do
@vladkosarev we test specifically for that scenario and it passes in our test suite
(because we had an issue with it when we upgraded to Helios 2 the first time)
let me check something real fast
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:38
this might be busted - hostname = 0.0.0.0
I changed that to localhost and connection was made but all sorts of other errors were thrown, investigating. This is on a project where the only change is 1.0.8 -> 1.1
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:38
crap. I know what the issue is
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:38
eek
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:38
Helios 2.1 defaults to IPv6
used to default to IPv4
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:38
crap
1.1.1!
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:39
welcome to the future :p
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:39
bam
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:41
so did you have this issue while upgrading one service at a time?
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:42
haven't tried, this is just a test with server and client and client remotes into server and calls server's actors, very simple stuff. I upgraded both to check speed improvements in 1.1 and so far no luck in connecting
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:42
try it without hostnames
for now
I'll do some poking around now
the DNS resolution in Helios 2.1 is going to include IPv6 as possible resolve targets
and will pick those
Helios 1.4.1 couldn't do anything with IPv6
Marc Piechura
@marcpiechura
Jul 07 2016 15:43
This message was deleted
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:44
if you could create an issue with some logs too that would be great
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:46
Yeah, trying localhost instead of IP does connect but both client and server crap out after spewing lots of errors, will dig in and then create a ticket
trying machine hostname fails connection instantly just like IP
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:48
are you getting NullReferenceExceptions by any chance
I logged some of these doing that on lighthouse with localhost just now
2016-07-07 08:38:05.0944 Akka.Event.DummyClassForStringSources: Associated [akka.tcp://webcrawler@127.0.0.1:4053] <- akka.tcp://webcrawler@localhost:64240 
2016-07-07 08:42:07.3222 Akka.Remote.Transport.Helios.TcpServerHandler: Error caught channel [[::1]:4053->[::1]:64241](Id=ChannelId(-421390848)) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
   at Helios.Channels.Sockets.TcpSocketChannel.DoReadBytes(IByteBuf buf)
   at Helios.Channels.Sockets.AbstractSocketByteChannel.SocketByteChannelUnsafe.FinishRead(SocketChannelAsyncOperation operation)
2016-07-07 08:42:07.4512 Akka.Remote.EndpointWriter: AssociationError [akka.tcp://webcrawler@127.0.0.1:4053] <- akka.tcp://webcrawler@localhost:64240: Error [Error while decoding incoming Akka PDU] [   at Akka.Remote.EndpointReader.TryDecodeMessageAndAck(ByteString pdu)
   at Akka.Remote.EndpointReader.<Reading>b__11_1(InboundPayload inbound)
   at lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 )
   at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`4.Handle(T value)
   at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
   at Akka.Actor.ReceiveActor.OnReceive(Object message)
   at Akka.Actor.UntypedActor.Receive(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Actor.ActorCell.ReceiveMessage(Object message)
   at Akka.Actor.ActorCell.Invoke(Envelope envelope)] 
2016-07-07 08:42:07.5572 Akka.Remote.ReliableDeliverySupervisor: Association with remote system akka.tcp://webcrawler@localhost:64240 has failed; address is now gated for 5000 ms. Reason is: [Akka.Remote.EndpointException: Error while decoding incoming Akka PDU ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Akka.Actor.ActorPath.get_ElementsWithUid()
   at Akka.Remote.RemoteActorRefProvider.ResolveActorRefWithLocalAddress(String path, Address localAddress)
   at Akka.Remote.Transport.AkkaPduProtobuffCodec.DecodeMessage(ByteString raw, RemoteActorRefProvider provider, Address localAddress)
   at Akka.Remote.EndpointReader.TryDecodeMessageAndAck(ByteString pdu)
   --- End of inner exception stack trace ---
   at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level)
   at Akka.Remote.EndpointWriter.<SupervisorStrategy>b__20_0(Exception ex)
   at Akka.Actor.LocalOnlyDecider.Decide(Exception cause)
   at Akka.Actor.OneForOneStrategy.Handle(IActorRef child, Exception x)
   at Akka.Actor.SupervisorStrategy.HandleFailure(ActorCell actorCell, Exception cause, ChildRestartStats failedChildStats, IReadOnlyCollection`1 allChildren)
   at Akka.Actor.ActorCell.HandleFailed(Failed f)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Akka.Actor.ActorCell.HandleFailed(Failed f)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)] 
2016-07-07 08:42:07.6602 Akka.Event.DummyClassForStringSources: Error while decoding incoming Akka PDU Akka.Remote.EndpointException: Error while decoding incoming Akka PDU ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Akka.Actor.ActorPath.get_ElementsWithUid()
   at Akka.Remote.RemoteActorRefProvider.ResolveActorRefWithLocalAddress(String path, Address localAddress)
   at Akka.Remote.Transport.AkkaPduProtobuffCodec.DecodeMessage(ByteString raw, RemoteActorRefProvider provider, Address localAddress)
   at Akka.Remote.EndpointReader.TryDecodeMessageAndAck(ByteString pdu)
   --- End of inner exception stack trace ---
   at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level)
   at Akka.Remote.EndpointWriter.<SupervisorStrategy>b__20_0(Exception ex)
   at Akka.Actor.LocalOn
we will do a 1.1.1 today to fix that
but I need logs
in order to make sure there isnt' a 1.1.2 today too
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:50
ah, it works with localhost, the secondary issue was mine, not akka
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:50
ok
I'm stepping out for a bit
need my coffee :package:
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:51
:)
Enjoy and thanks for 1.1
Aaron Stannard
@Aaronontheweb
Jul 07 2016 15:51
ugh, nevermind
that error was caused by lighthouse
doing a stupid thing
Vlad Kosarev
@vladkosarev
Jul 07 2016 15:51
Throughput is doing a weird thing, starts at about 3 times 1.08 and then drops to about 2 times
will take a closer look later and see if I can pinpoint the slowdown
even 2x is still great
wow, drops like a clockwork, very interesting, feels like some buffer runs out or something
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:34
hmmm
if you turn on debug mode in the logs
check to see if you see any "backoff" messages
the answer might be that the write buffer for Helios 2.1.1 is filling up too quickly and starts triggering the backoff system
and I think that buffer size can be changed via HOCON
it'll be the EndpointWriter that signals backoff
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:35
that sounds very plausible actually, if I pause the flow and then restart it goes back up again and then drops
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:36
the idea is that the actors who run the remoting system and the underlying transport work together to keep the transport as healthy as possible
so the transport can send a signal if it has too many pending writes already
and the endpoint actors will buffer
and they compute a relative time to send again shortly
awesome to see that in action already :p
Helios 1.4.1 didn't have any of that adaptive backoff stuff built into it
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:37
ha
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:37
there should be a HOCON setting to increase that buffer size
there's a chance we might have set it too low
made it too easy to back off
because if your system was working just fine earlier
no point in backing off
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:38
it's no problem actually, we'll never get those numbers in production, I was just trying to see how high I can get througput
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:38
what sort of range are you getting?
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:39
before was around 4k messages/sec, now before backoff around 14k, after backoff 8-9k
server just keeps writing into dictionary so I don't think we are hitting any bottlenecks there
it does look like akka was actually bottleneck before since now with esent writes on the server side we are getting around 8k ms/sec so disk write is finally the bottleneck, not akka throughput
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:44
yipee!
I can't tell you how embarrassed and amazed I am at Helios 1.4.1 being able to hold up as long as it did
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:44
yeah, that's pretty awesome to see
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:44
so I wrote most of that code 2.5 years ago
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:45
hey man, when you have to be in charge of everything you have to prioritize
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:45
when I took at look at it back in April when I was trying to come up with a plan for getting Akka.Cluster out of beta
so many of the practices in that codebase are things I would simply never do now; but all of that experience came from working on it
big thing I would avoid in any high performance code is events
turned out to be a dangerous source of allocations and memory leaks
don't have any of that going on in Helios 2.1.1 - it's still event-driven but it issues messages and a pipeline instead, which is a much better way of doing that
Vlad Kosarev
@vladkosarev
Jul 07 2016 16:49
that's awesome, nothing beats experience
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:56
one thing that's different now versus 2 years ago
way more tools for doing performance-sensitive programming in .NET
I use NBench in our test suites for asserting performance over time (as the code base changes,) DotMemory and DotTrace inside ReSharper to do profiling, better VS Tools, BenchmarkDotNet for microbenchmarks
I remember having to hack stuff together using PerfView and ETW when we were getting ready for Akka.NET 1.0 over a year ago
all of these tools I just listed are a million times easier than that
voltcode
@voltcode
Jul 07 2016 16:59
Is dottrace much better than profile inside VS?
Aaron Stannard
@Aaronontheweb
Jul 07 2016 16:59
from a usability point of view
waaaaaaaaaaaaay better
I can take any of my XUnit tests
ollivogel
@ollivogel
Jul 07 2016 17:00
Hello, in a cluster I do have 3 nodes. One is the seed node, one is a worker node, third there is a node with a web API interface to send commands to the worker node. Although configured the same, the web API node cannot connect to the seed node (rather than the worker node). Now It says: No seed node configured bla bla bla.
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:00
and use that to profile the code
@ollivogel can you share your HOCON?
ollivogel
@ollivogel
Jul 07 2016 17:00
Has anyone an Idea what went wrong? This part of my HOCON configuration
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:00
because that sounds like a config issue
and are you using lighthouse?
for your seed node
ollivogel
@ollivogel
Jul 07 2016 17:01
<![CDATA[
akka {
stdout-loglevel = DEBUG
loglevel = INFO
      actor {
        provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"

        serializers {
          wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
        }

        serialization-bindings {
          "System.Object" = wire
        } 

        deployment {
          /loginSupervisor {
            router = round-robin-group
            nr-of-instances = 2
            routees.paths = ["/user/loginSupervisor"]
            cluster {
              enabled = on
              allow-local-routees = off
              use-role = clientService
              }
            } 

          /mongoDbWriterCoordinator {
            router = round-robin-group
            nr-of-instances = 1
            routees.paths = ["/user/mongoDbWriterCoordinator"]
            cluster {
              enabled = on
              allow-local-routees = off
              use-role = clientService
              }
            } 

          /betfairAccess {
            router = round-robin-group
            nr-of-instances = 1
            routees.paths = ["/user/betfairAccess"]
            cluster {
              enabled = on
              allow-local-routees = off
              use-role = clientService
              }
            }                 
          } 
      remote {
        log-remote-lifecycle-events = DEBUG

        helios.tcp {
          transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
          transport-protocol = tcp
          hostname = "127.0.0.1"
          port = 0     
          maximum-frame-size = 1024000b
        }
      }

      cluster {                      
        seed-nodes = ["akka.tcp://BetfairServices@127.0.0.1:4053"] 
        roles = ["webAPI"] 
      }
    }
  ]]>
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:01
because I found a bug with lighthouse that I need to upgrade today
ollivogel
@ollivogel
Jul 07 2016 17:01
So this is the web API Node trying to connect to the client node.
Yes, I am using lighthouse.
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:02
and this is using 1.1?
I take it
ollivogel
@ollivogel
Jul 07 2016 17:03
However, the client Node (with the same configuration) is able to connect. I already checked, if there is a mismatch between my ActorSystem names, but that would be to easy. :-/
Yes, using 1.1
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:03
the client node works but the web API doesn't... mind showing me the HOCON for the client node?
ollivogel
@ollivogel
Jul 07 2016 17:04
There you go.
akka {
stdout-loglevel = DEBUG
loglevel = INFO
      actor {
        provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"             

        serializers {
          wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
        }

        serialization-bindings {
          "System.Object" = wire
        }

        deployment {
          /betfairAccess {
          router = consistent-hashing-pool
          nr-of-instances = 10
          virtual-nodes-factor = 10                  
          }  
        }   
       }
      remote {
        log-remote-lifecycle-events = DEBUG

        helios.tcp {
          transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
          transport-protocol = tcp
          hostname = "127.0.0.1"
          port = 0 
          maximum-frame-size = 1024000b
        }
      }

      cluster {                      
        seed-nodes = ["akka.tcp://BetfairServices@127.0.0.1:4053"] 
        roles = ["clientService"]      
      }
     }
Funny thing is it USED to work properly. However, after updating to 1.1 it stopped. :(
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:06
ok, last question: is there anything special that you do when bootstrapping your node
i.e. do you inject any sort of configuration?
and can you open an issue and give us a log dump from the node that can't connect?
ollivogel
@ollivogel
Jul 07 2016 17:08
Well I am not doing anything special. How can I get you a log dump?
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:09
you can try using the Akka.Logging.NLog package
and log all of the messages you're seeing from your webAPI node to a file
sample NLog.config
<?xml version="1.0" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <targets>
    <target name="eventlog" xsi:type="EventLog" layout="${logger}: ${message} ${exception:format=tostring}" source="Lighthouse" log="Application" />
    <target name="console" xsi:type="ColoredConsole" layout="${logger}: ${message} ${exception:format=tostring}"></target>
    <target name="file" xsi:type="File" layout="${longdate} ${logger}: ${message} ${exception:format=tostring}" fileName="${basedir}/logs/${shortdate}.log"
            keepFileOpen="false"
            encoding="iso-8859-2"></target>
  </targets>

  <rules>
    <logger name="*" minlevel="Warn" writeTo="eventlog" />
    <logger name="*" minlevel="Info" writeTo="console" />
    <logger name="*" minlevel="Debug" writeTo="file" />
  </rules>
</nlog>
HOCON
akka {
            loglevel = DEBUG
                        actor { 
                            provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
                        }

                        remote {
                            log-remote-lifecycle-events = DEBUG
              log-received-messages = on
              log-sent-messages = on
                            helios.tcp {
                                #will be populated with a dynamic host-name at runtime if left uncommented
                                #public-hostname = "POPULATE STATIC IP HERE"
                                hostname = "localhost"
                                port = 4053
                            }
                        }            

                        loggers = ["Akka.Logger.NLog.NLogLogger,Akka.Logger.NLog"]

                        cluster {
              debug {
                # log heartbeat events (very verbose, useful mostly when debugging heartbeating issues)
                  verbose-heartbeat-logging = on
               }

                            #will inject this node as a self-seed node at run-time
                            seed-nodes = [] #manually populate other seed nodes here, i.e. "akka.tcp://lighthouse@127.0.0.1:4053", "akka.tcp://lighthouse@127.0.0.1:4044"
                            roles = [lighthouse]
                        }
                    }
I'm using that setup on 1.1
don't need the verbose heartbeats
that was for debugging
ollivogel
@ollivogel
Jul 07 2016 17:11
ok, thanks. I will try that, get the dump and open an issue.
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:11
thanks
I'm going to be working on a 1.1.1 patch in all likelihood today - noticed something locally when trying to break one of my own applications
looks like I forgot a null check inside our serialization system :grimacing:
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 17:13
And to fix the last two cluster specs... :$
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:13
lol
I can't afford to work on that anymore this week
giving an all-day workshop on Akka.Cluster in like 4 days at .NET Fringe
voltcode
@voltcode
Jul 07 2016 17:16
Akka.net binge ;)
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:17
did the exact same thing last year
Akka.NET 1.0 shipped like a week before .NET Fringe
lol
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:36
Hello guys
Can i ask something about clustering etc
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:37
go for it
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:37
I have a problem with the DistributedPubSub mediator
My cluster is composed of three applications: A, B and C
A and B are processing things and C is monitoring
C subscribe to a topic
A and B are publishing informations to it
But nothing fire
Like if C wasn't registered
Aaron Stannard
@Aaronontheweb
Jul 07 2016 17:39
cc @alexvaluyskiy @Horusiath - they'd know better than I would. I work lower on that in the stack. We did make some improvements there in 1.1 if you haven't upgraded yet, but I'll defer to Alex and Bartosz on the particulars
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:40
Btw C is properly getting the SubscribeAck
Thx Aaron I'll check with them
Jared Lobberecht
@Jared314
Jul 07 2016 17:48
Has Akka.Persistence.SqlServer been updated to use 1.1 yet?
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 17:49
@Jared314 we will update it today, I hope
@hussein-aitlahcen is it the same as in this PR? akkadotnet/akka.net#2142
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:54
@alexvaluyskiy Nope, I'm not using lighthouse
I dont have the code here but it's with the DistributedPubSub
I have a Dispatcher that send job to Workers
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 17:56
Have you used PubSub before?
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:56
Never
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 17:56
So, it did't work before
It is weird
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:56
It's totally new ?
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 17:57
PubSub passes all MNTK tests
but doesn't work
Hussein Ait-Lahcen
@hussein-aitlahcen
Jul 07 2016 17:57
Haha
Well, I was very disappointed since initially it was working with the standard Tell
Tought it would be easier with the PubSub
Thx
Ill come back to my solution
voltcode
@voltcode
Jul 07 2016 18:11
Ah man, did pub sub go out of beta along with cluster?
Alex Valuyskiy
@alexvaluyskiy
Jul 07 2016 18:19
No
We plan it for 1.2
wdspider
@wdspider
Jul 07 2016 20:42

I got a chance to upgrade from 1.0.8 to 1.1; however, it appears that my non-seed nodes no longer like the address of my seed node:

[Warn] Akka.Event.DummyClassForStringSources: Tried to associate with unreachable remote address [akka.tcp://EmbassyActorSystem@localhost:4053]. Addre
ss is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: [Invalid address: akka.tcp://EmbassyActorSystem@l
ocalhost:4053] Caused by: [Akka.Remote.Transport.InvalidAssociationException: Association failure ---> Helios.Exceptions.HeliosConnectionException: fa
iled as a result of System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.A
ggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to [::1]:4053 ---> System.Net.Sockets.Socke
tException: No connection could be made because the target machine actively refused it

is there a new HOCON setting that I need to set for it to go back to IPv4?

qwoz
@qwoz
Jul 07 2016 20:49
@wdspider :point_up: July 7, 2016 8:38 AM
wdspider
@wdspider
Jul 07 2016 20:53
yes.... I assume that's why it's trying to connect to [::1]:4053 and is failing to (maybe my current computer doesn't support IPv6 yet shrugs) Is there a config change I can make to switch it back to IPv4?
wdspider
@wdspider
Jul 07 2016 21:02
mmm... the cluster seems to come up when I change the seed node to use 127.0.0.1 rather than localhost:
[Info] Akka.Cluster.ClusterCoreDaemon: Node [akka.tcp://EmbassyActorSystem@127.0.0.1:4053] is JOINING, roles [SeedNodeV1]
[Info] Akka.Cluster.ClusterCoreDaemon: Node [akka.tcp://EmbassyActorSystem@localhost:23461] is JOINING, roles [CoreNodeV1]
[Info] Akka.Cluster.ClusterCoreDaemon: Leader is moving node [akka.tcp://EmbassyActorSystem@127.0.0.1:4053] to [Up]
[Info] Akka.Cluster.ClusterCoreDaemon: Leader is moving node [akka.tcp://EmbassyActorSystem@localhost:23461] to [Up]
simonpetty
@simonpetty
Jul 07 2016 21:59
hey guys. congrats on getting 1.1 out
i'm trying to write a persistence plugin, but getting confused about the 2 AtomicWrite classes. is there anywhere to read up on those?
Aaron Stannard
@Aaronontheweb
Jul 07 2016 22:04
@wdspider I'll put some specs in to test for some DNS resolution stuff
akkadotnet/akka.net#1971
are you using lighthouse?
it blows up right now on localhost
I need to fix irt