Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 25 14:59
    Aaronontheweb commented #3615
  • Jan 25 14:58
    Aaronontheweb commented #3615
  • Jan 25 14:56
    Aaronontheweb commented #4126
  • Jan 25 13:16
    IgorFedchenko synchronize #4126
  • Jan 25 12:37
    IgorFedchenko commented #3615
  • Jan 25 12:37
    IgorFedchenko commented #3615
  • Jan 25 12:35
    IgorFedchenko commented #3615
  • Jan 25 12:16
    IgorFedchenko synchronize #4126
  • Jan 25 12:03
    IgorFedchenko opened #4165
  • Jan 25 11:06
    IgorFedchenko synchronize #4126
  • Jan 25 10:45
    IgorFedchenko commented #4126
  • Jan 25 10:37
    IgorFedchenko synchronize #4126
  • Jan 25 10:36
    IgorFedchenko edited #4126
  • Jan 25 10:34
    IgorFedchenko synchronize #4126
  • Jan 25 10:30
    IgorFedchenko synchronize #4126
  • Jan 24 23:00
    Danthar commented #3954
  • Jan 24 22:53
    Aaronontheweb commented #3954
  • Jan 24 21:06
    Aaronontheweb synchronize #4128
  • Jan 24 16:56
    Aaronontheweb synchronize #4128
  • Jan 24 16:46

    Aaronontheweb on explain-sharding-path

    (compare)

Mike Clark
@mclark1129
Also, I'm a bit confused as to when logging statements will display an actor's path vs not. Seems like sometimes it's just implicitly added to the log statement (using NLog provider) and other times its not.
Ideally I'd just have them all logged in a consistent way
Stijn Herreman
@stijnherreman
@mclark1129 do you always log through an ILoggingAdapter? If so, the format should be consistent.
Mike Clark
@mclark1129
@stijnherreman Yeah, we're exclusively using the ILoggingAdapter within actor code but I can't find any consistency between when the path is logged vs not
Stijn Herreman
@stijnherreman
Perhaps some configuration of NLog? Our Serilog config looks like this:
    "WriteTo:Console": {
      "Name": "Console",
      "Args": {
        "outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}][Thread {Thread}][{LogSource}] {Message:lj}{NewLine}{Exception}"
      }
    },
Where {LogSource} is the actor path
I've not used NLog yet with Akka so can't give you any specific pointers I'm afraid.

in case it doesn't expand:

Some new releases today:

troasfl
@troasfl
Please how do we gracefully handle messages in an actor's inbox when your app is shutting down and you still have a lot of messages to process before the shutdown?
Jonathan Nagy
@nagytech
@troasfl Have you checked the coordinated shutdown docs for any ideas?https://getakka.net/articles/actors/coordinated-shutdown.html
troasfl
@troasfl
@nagytech Let me check it out
Alexandre Roba
@AlexandreRoba
Hi all, Akka.net newbie here. i was wondering if it would be possible to write something like https://github.com/koudelka/visualixir on akka.net?
Are there any commonly used tools to monitor running actors?
Thomas Lazar
@thomaslazar
good morning
trying this from the other side now. i have the following problem https://stackoverflow.com/questions/59267447/simpleinjector-container-verify-and-akka-net/59803013
using akka.net with simpleinjector and simpleinjector has the "nice" option to verify your registrations
but it tries to resolve registered actors which throws an exception. which is expected. but that kills the whole verify process.
it seems you can't really tell simpleinjector to not do that. so now i'm trying the other way around.
is there a way to tell akka.net not to throw this exception? and just let it slide?
i want to call the Verify method in some tests and see if everything is properly registered. so i would like a way just to tell akka.net to not throw these exceptions in that case
Jonathan Nagy
@nagytech

@AlexandreRoba In terms of what's freely available, I've had several approaches to monitoring/visualizing in the past. First, I used Akka.Monitoring (https://github.com/petabridge/akka-monitoring) to feed data into StatsD and (Akka.Visualizer) https://github.com/corneliutusnea/Akka.Visualizer helped a little bit - but the visualizer is a bit out of date.

There's also this which is commercially supported: https://phobos.petabridge.com/articles/monitoring

Alexandre Roba
@AlexandreRoba
@nagytech thanks for sharing, I'll have a look at it.
wsvdyk
@wsvdyk

I'm trying to run my application on a new computer, but I keep getting an error when I run the application. While the exact same copy (Copied the exe will all the extra stuff) does still run on my old computer. This is the error I get

[ERROR][1/23/2020 7:58:41 PM][Thread 0006][akka://ModulairVisionFramework/user/InterfaceCameraActor] Error while creating actor instance of type CameraSystem.InterfaceCameraActor with 0 args: ()
Cause: [akka://ModulairVisionFramework/user/InterfaceCameraActor#1923472091]: Akka.Actor.ActorInitializationException: Exception during creation
 ---> System.TypeLoadException: Error while creating actor instance of type CameraSystem.InterfaceCameraActor with 0 args: ()
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.BadImageFormatException: Could not load file or assembly 'VimbaNET, Version=1.8.0.27270, Culture=neutral, PublicKeyToken=96b729f24f119b9a'. An attempt was made to load a program with an incorrect format.
File name: 'VimbaNET, Version=1.8.0.27270, Culture=neutral, PublicKeyToken=96b729f24f119b9a'
   at CameraSystem.InterfaceCameraActor..ctor()

   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

[INFO][1/23/2020 7:58:44 PM][Thread 0008][akka://ModulairVisionFramework/user/InterfaceCameraActor] Message Initialize from akka://ModulairVisionFramework/user/FrameworkActor to akka://ModulairVisionFramework/user/InterfaceCameraActor was not delivered. 1 dead letters encountered.

what jumps out for me is this about the error is this An attempt was made to load a program with an incorrect format.. In the past I got this error and I fixed it by using the right DLL (I used the 32bit dll while running 64bit). But i'm 100% sure that I have the right DLL. and I'm able to run it on my old computer, with zero changes.

InterfaceCameraActor is located in a DLL, and this DLL can be compiled without any issues.

Does anyone know what this error may cause and how it can be solved?

Stephen Newman
@goodisontoffee
I'm seeing Cluster association errors which appear to be caused by a failure to write messages to the transport.
Akka.Remote.EndpointException: Failed to write message to the transport ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'Hyperion.SerializerFactories.ArraySerializerFactory.WriteValues<System.ValueType>(System.ValueType[], System.IO.Stream, System.Type, Hyperion.ValueSerializers.ValueSerializer, Hyperion.SerializerSession)' has some invalid arguments
   at CallSite.Target(Closure , CallSite , ArraySerializerFactory , Object , Stream , Type , ValueSerializer , SerializerSession )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid6[T0,T1,T2,T3,T4,T5](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
   at CallSite.Target(Closure , CallSite , ArraySerializerFactory , Object , Stream , Type , ValueSerializer , SerializerSession )
   at Hyperion.SerializerFactories.ArraySerializerFactory.<>c__DisplayClass4_0.<BuildSerializer>b__1(Stream stream, Object arr, SerializerSession session)
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.WriteValue(Stream stream, Object value, SerializerSession session)
   at Hyperion.Extensions.StreamEx.WriteObject(Stream stream, Object value, Type valueType, ValueSerializer valueSerializer, Boolean preserveObjectReferences, SerializerSession session)
   at lambda_method(Closure , Stream , Object , SerializerSession )
   at Hyperion.ValueSerializers.Object
  <package id="Akka" version="1.3.17" targetFramework="net472" />
  <package id="Akka.Cluster" version="1.3.17" targetFramework="net472" />
  <package id="Akka.Cluster.Sharding" version="1.3.9-beta68" targetFramework="net472" />
  <package id="Akka.Cluster.Tools" version="1.3.17" targetFramework="net472" />
  <package id="Akka.DI.AutoFac" version="1.3.9" targetFramework="net472" />
  <package id="Akka.DI.Core" version="1.3.17" targetFramework="net472" />
  <package id="Akka.DistributedData" version="1.3.9-beta68" targetFramework="net472" />
  <package id="Akka.Logger.Serilog" version="1.3.9" targetFramework="net472" />
  <package id="Akka.Persistence" version="1.3.17" targetFramework="net472" />
  <package id="Akka.Persistence.PostgreSql" version="1.3.9" targetFramework="net472" />
  <package id="Akka.Persistence.Sql.Common" version="1.3.17" targetFramework="net472" />
  <package id="Akka.Remote" version="1.3.17" targetFramework="net472" />
  <package id="Akka.Serialization.Hyperion" version="1.3.17-beta" targetFramework="net472" />
  <package id="DotNetty.Buffers" version="0.6.0" targetFramework="net472" />
  <package id="DotNetty.Codecs" version="0.6.0" targetFramework="net472" />
  <package id="DotNetty.Common" version="0.6.0" targetFramework="net472" />
  <package id="DotNetty.Handlers" version="0.6.0" targetFramework="net472" />
  <package id="DotNetty.Transport" version="0.6.0" targetFramework="net472" />
  <package id="Google.Protobuf" version="3.3.0" targetFramework="net472" />
  <package id="Hyperion" version="0.9.12" targetFramework="net472" />
It seems as though there is some interface mismatch in place, is this a well known issue or have I stumbled across something exciting?
Here is the tail of the stack trace.
   at Akka.Serialization.HyperionSerializer.ToBinary(Object obj)
   at Akka.Remote.Serialization.DaemonMsgCreateSerializer.Serialize(Object obj)
   at Akka.Remote.Serialization.DaemonMsgCreateSerializer.PropsToProto(Props props)
   at Akka.Remote.Serialization.DaemonMsgCreateSerializer.ToBinary(Object obj)
   at Akka.Remote.MessageSerializer.Serialize(ExtendedActorSystem system, Address address, Object message)
   at Akka.Remote.EndpointWriter.SerializeMessage(Object msg)
   at Akka.Remote.EndpointWriter.WriteSend(Send send)
   --- End of inner exception stack trace ---
   at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level, Boolean needToThrow)
   at Akka.Remote.EndpointWriter.WriteSend(Send send)
   at Akka.Remote.EndpointWriter.<Writing>b__27_0(Send s)
   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.<>c__DisplayClass11_0.<Become>b__0(Object m)
   at Akka.Actor.ActorCell.<>c__DisplayClass106_0.<Akka.Actor.IUntypedActorContext.Become>b__0(Object m)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Actor.ActorCell.ReceiveMessage(Object message)
   at Akka.Actor.ActorCell.Invoke(Envelope envelope)
Aaron Stannard
@Aaronontheweb
@goodisontoffee yeah, looks like a Hyperion problem
@wsvdyk that's definitely an image version issue
you might want to go into Visual Studio
and check the following setting on your program.exe
image.png
make sure that if you're loading 32bit or 64bit DLLs, make sure your EXE version aligns
the platform target
and if you're using "Any CPU"
uncheck "prefer 32 bit"
if you want to make sure you're running under 64 bit
@goodisontoffee what does your data structure look like?
Stephen Newman
@goodisontoffee
@Aaronontheweb All the messages I send are pretty simple, only public members which are strings, decimals, longs, Guid, getters only, either default constructors (when no properties) or a single constructor which take all values and assign to properties. I see this behaviour before any of "our" messages have been sent i.e. start cluster, don't kick off any processing, errors appear.
wsvdyk
@wsvdyk
@Aaronontheweb I tested your solution, but I'm sure that I run a 64 bit. I also have a 32 bit DLL of the same system, and when I use that one the application will not even initialize. and the system will initialize (untill the DLL is used) if I use the right DLL.
See below for the settings that I use on the 64bit platform
image.png
Stephen Newman
@goodisontoffee
@Aaronontheweb I think it's a prop being serialized, and that's where the issue is. I'll see if I can't fix it and if that's it, I'll report back :)
Stephen Newman
@goodisontoffee
@Aaronontheweb it’s all good. Prop serialisation caught me out, I’ve achieved what I need a different way.
Aaron Stannard
@Aaronontheweb
:+1:
@goodisontoffee polymorphic serialization, while convenient, becomes edge-casey very quickly
because the serializer has to be capable of supporting a theoretically infinite number of possible combinations.... which is impossible to test exhaustively
both Hyperion and Newtonsoft.Json will run into issues like this, but I'm glad you caught it
Stephen Newman
@goodisontoffee
All good :)