Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 09:19
    ismaelhamed synchronize #6109
  • 07:57
    ismaelhamed closed #6108
  • 07:57
    ismaelhamed commented #6108
  • 07:51
    ismaelhamed commented #6109
  • 07:50
    ismaelhamed synchronize #6109
  • Sep 23 19:39

    Aaronontheweb on nuget

    (compare)

  • Sep 23 19:39

    Aaronontheweb on dev

    Bump AkkaVersion from 1.4.41 to… (compare)

  • Sep 23 19:39
    Aaronontheweb closed #158
  • Sep 23 19:30
    dependabot[bot] edited #158
  • Sep 23 19:29
    dependabot[bot] synchronize #158
  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29

    dependabot[bot] on nuget

    Bump AkkaVersion from 1.4.41 to… (compare)

  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29

    Aaronontheweb on dev

    Bump Docker.DotNet from 3.125.1… (compare)

  • Sep 23 19:29

    Aaronontheweb on nuget

    (compare)

  • Sep 23 19:29
    Aaronontheweb closed #157
  • Sep 23 19:29
    Aaronontheweb auto_merge_enabled #158
  • Sep 23 19:28
    dependabot[bot] labeled #158
  • Sep 23 19:28
    dependabot[bot] opened #158
Ricardo Abreu
@codenakama
one with serializers setup
also how hocon is better than json or xml? it seems to not work properly when I have breaklines in the wrong place (sometimes added by the editor) and I have to scape parenthesis
actually that was the issue the whole time

having

serializers
{
}

doesn't work

you have to have serializers {.... }

Bartosz Sypytkowski
@Horusiath
@codenakama from what I've checked last time, serializer with Id 9 is a decicated one for a DistributedPubSub feature.
Ricardo Abreu
@codenakama
@Horusiath the error was a few breaklines. I changed packages and tried many things to realise that it was the breaklines....
Visual studio for Mac adds weird ones when you write Hocon in the appsettings json file.
The configuration is parsed without errors and the actorsystem assumes it's all OK. But then when you send messages between actors in different nodes it throws those errors
Thomas Denoréaz
@ThmX

Hi all! I have a small problem with Akka.IO, very rarely I get this error: Resource temporarily unavailable
However, no event Tcp.Closed nor Tcp.PeerClosed is sent to neither of the connection handlers.
After a bit of debugging I was also able to see that my handlers are correctly registered (stored inside the ConnectionInfo).
The error is coming from this line TcpConnection.cs#L835:

[DEBUG][10/15/17 11:56:01 PM][Thread 0006][[akka://benchmark-a/system/IO-TCP/$a#359412270]] Closing connection due to IO error System.Net.Sockets.SocketException (0x80004005): Resource temporarily unavailable
   at System.Net.Sockets.Socket.Send(IList`1 buffers)
   at Akka.IO.TcpConnection.PendingBufferWrite.<DoWrite>g__WriteToChannel7_0(ByteString data, <>c__DisplayClass7_0& )
   at Akka.IO.TcpConnection.PendingBufferWrite.DoWrite(ConnectionInfo info)
[DEBUG][10/15/17 11:56:01 PM][Thread 0003][[akka://benchmark-a/system/IO-TCP/$a/$a#757063873]] Closing connection due to IO error System.Net.Sockets.SocketException (0x80004005): Connection reset by peer
[INFO][10/15/17 11:56:01 PM][Thread 0006][akka://benchmark-a/system/IO-TCP/$a] Message SocketReceived from akka://benchmark-a/deadLetters to akka://benchmark-a/system/IO-TCP/$a was not delivered. 1 dead letters encountered.

Unfortunately, I was not able to create a reproducible example as it happens only from time to time during the launch of my benchmarks with BenchmarkDotNet.

Thomas Denoréaz
@ThmX
It is also worth mentioning, I tried adding a Context.Watch(...) on both TcpConnection but they are both still there
Jessie Wadman
@JessieWadman
Looks like remoting (and clustering) breaks when communicating cross-platform using .NET base types like DateTimeOffset, List and Dictionary, etc. Consider when a Windows Forms application remotes to an actor system running on Linux built with .NET Core. The problem isn't with Akka.Remoting itself, but with the underlying serializers (both Newtonsoft.Json and Hyperion), because of the strict type naming configuration in Akka, resulting in the serializers not being able to resolve types between mscorlib.dll/System.Core.dll (on .NET 4.6) and System.Private.CoreLib.dll (.NET Core). Anyone already bumped into this problem and solved it? It's only a problem for BCL types, obviously, but you'd be surprised at how often you use List and Dictionary and DateTimeOffset :-)
Thomas Denoréaz
@ThmX
Ok it was my bad, I found the problem. I'm still surprised though, as the message was not displayed as unhandled message. I was only handling Tcp.Closed and Tcp.PeerClosed and it was firing a Tcp.ErrorClosed, so now I'm directly handling Tcp.ConnectionClosed.
Robert Stiff
@uatec
so here's a fun story
i have very valuable data in my FSM
and i just corrupted it
i am storing my state in redis and I can see that the "akka:persistence:snapshotssnapshot:myfsm" is intact, but the "akka:persistence:snapshotsjournal:persisted:myfsm" is corrupted
i have a back up of akka:persistence:snapshotsjournal:persisted:myfsm though, but it might not be insync with the current state of akka:persistence:snapshotssnapshot:myfsm
can anyone help me figure out how best to integrate these remaining bits of state?
Robert Stiff
@uatec
phew, actually, my FSM had not persisted it's state, so the journal was corrupt, but removed the journal and reset back to 10 minutes ago
Jalal EL-SHAER
@jalchr

I'm trying to make the Akka.Persistence.AtLeastOnceDeliveryReceiveActor v1.3.1

                Deliver(commandRouter.Path,
                    messageId =>
                    new ReliableDeliveryEnvelope<StartJob>(startJob, messageId));

Where commandRouter is defined like this

            var commandRouter = ClusterSystem.ActorOf(Props.Empty.WithRouter(FromConfig.Instance), "tasker");

and has following hocon config:

/tasker {
                  router = consistent-hashing-group
                  routees.paths = ["/user/api"]
                  virtual-nodes-factor = 8
                  cluster {
                      enabled = on
                      max-nr-of-instances-per-node = 1
                      allow-local-routees = on
                      use-role = web
                  }

The message never reaches the destination actor. If I use an actor instead of a router, it works fine !

So this works
                Deliver(SystemActors.ApiMaster.Path,
                    messageId =>
                    new ReliableDeliveryEnvelope<StartJob>(startJob, messageId));
Robert Stiff
@uatec
with things like that, i find that you have to create the router on every single node
that's definately the case with singletons
Jalal EL-SHAER
@jalchr
I think this is more like a bug
Bartosz Sypytkowski
@Horusiath
@jalchr if you have a cluster group router, you're basically creating an endpoint on the local node, that will redirect all incoming messages to actors defined by routees.paths, living on an every node in the cluster having a configured role. This also means, that those actors (in your case /user/api) needs to be established manually as group routers won't create them by themselves
Aaron Stannard
@Aaronontheweb
@uatec woah, how did that happen? can you draw a flowchart of that?
@JessieWadman we've made it clear in our release notes et al that .NET Core and .NET interop will not work with default serialization
won't work with Hyperion either
.NET Core moved all of the namespaces of those types around
and adding a compatibility shim for detecting that stuff would be hideously expensive
you're far better off ditching JSON.NET or Hyperion and just writing a Protobuf for your application if you need that type of x-plat stuff
eliminates the issue altogether without compromising performance
Robert Stiff
@uatec
@Aaronontheweb it wasn't corrupted by akka.net, it was corrupted by me :|
fortunately the corruption was still in the journal and hadn't been persisted to the snapshot yet
also, how do you mean that default serialization wont work? I am default (newtonsoft) on .net core
Aaron Stannard
@Aaronontheweb
default serialization between .NET framework and .NET Core doesn't work
for instance, a string lives in two different namespaces on each runtime
therefore an object serialized in .NET which has a string field can't automatically be deserialized on .NET Core
Robert Stiff
@uatec
ah, between different versions of .net, i see
Aaron Stannard
@Aaronontheweb
since the serializer sees the full qualified type name in .NET in the object's data and then can't find it when it tries to resolve the .NET Core
version of that same type
Jessie Wadman
@JessieWadman
It works for the types handled by Hyperion, like byte, string, DateTime and arrays, so I could work around it!
Robert Stiff
@uatec
rly? string looks like it's in System on both frameworks to me
Bartosz Sypytkowski
@Horusiath
@uatec it's assembly name that matters here
Robert Stiff
@uatec
ah
Bartosz Sypytkowski
@Horusiath
@JessieWadman if I remember correctly, types from mscorlib in Hyperion have their assembly name replaced with some magic string - at least that was the case once
Jessie Wadman
@JessieWadman
I saw the code for that, but it doesn't seem to be working for all types. But Hyperion has ValueSerializers for primitives, which I'm piggybacking on, like so...
    public class SomeType
    {
    }

    public class XPlatMsg
    {
        private SomeType[] items;

        public XPlatMsg(IEnumerable<SomeType> items, DateTimeOffset someDate)
        {
            this.items = items.ToArray();
            this.SomeDate = new DateTime(someDate.ToUniversalTime().Ticks, DateTimeKind.Utc);
        }

        public DateTime SomeDate { get; private set; }
        public IReadOnlyCollection<SomeType> Items => items;
    }
Can also make a public DateTimeOffset SomeDate => new DateTimeOffset(someDate, ...) to convert back and forth
Saepul Ramdani
@blackclavus
guys, quick question, is there anyway to write log into text file but only when error or warning happen?
Jalal EL-SHAER
@jalchr
@Horusiath I have the "router" setup already working fine in my cluster. Once I added the "Persistence" features, it didn't work as expected. Somehow the Deliver method fails to "use" the router.