dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.1k stars 2.04k forks source link

Problem Running the Stand-Alone Silo Tutorial #1929

Closed bluelaurend closed 8 years ago

bluelaurend commented 8 years ago

I have just started to play with Orleans. The first part of the tutorial went well, but the
"Running in a Stand-Alone Silo" tutorial doesn't.

The siloHost3

package id="Microsoft.CodeAnalysis.Analyzers" version="1.0.0" targetFramework="net452" package id="Microsoft.CodeAnalysis.Common" version="1.0.0" targetFramework="net452" package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" package id="Microsoft.Orleans.Core" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.CounterControl" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.OrleansCodeGenerator" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.OrleansCodeGenerator.Build" version="1.2.0" targetFramework="net452" package id="Microsoft.Orleans.OrleansHost" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.OrleansProviders" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.OrleansRuntime" version="1.2.2" targetFramework="net452" package id="Microsoft.Orleans.Server" version="1.2.2" targetFramework="net452" package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452"

... Successfully started Orleans silo 'claude-pc' as a Primary node. [2016-07-10 03:40:49.048 GMT 28 INFO 101301 Orleans.Messaging.Gateway 127.0.0.1:11111] Recorded opened socket from endpoint 127.0.0.1:19488, client ID *cli/48dfa89b. [2016-07-10 03:40:49.131 GMT 30 INFO 100000 Runtime.Messaging.GatewaySender/GatewaySiloSender_0 127.0.0.1:11111] Starting AsyncAgent Runtime.Messaging.GatewaySender/GatewaySiloSender_0 on managed thread 30 [2016-07-10 03:40:52.317 GMT 26 WARNING 100150 Watchdog 127.0.0.1:11111] .NET Runtime Platform stalled for 00:00:04.0362334 - possibly GC? We are now using total of 12MB memory. gc=13, 4, 3

The client

package id="Microsoft.Orleans.Core" version="1.2.2" targetFramework="net452" / package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" /

... [2016-07-10 03:40:48.189 GMT 10 INFO 101309 Messaging.GatewayManager ] Found 1 knownGateways from Gateway listProvider [gwy.tcp://127.0.0.1:30000/0]
[2016-07-10 03:40:49.043 GMT 10 INFO 100908 Messaging.GatewayConnection/GatewayClientSender_gwy.tcp://127.0.0.1:30000/0 192.168.2.124:0] Connected to gateway at address gwy.tcp://127.0.0.1:30000/0 on trial 0. [2016-07-10 03:40:49.051 GMT 13 INFO 100000 Messaging.GatewayConnection/GatewayClientSender_gwy.tcp://127.0.0.1:30000/0 192.168.2.124:0] Starting AsyncAgent Messaging.GatewayConnection/GatewayClientSender_gwy.tcp://127.0.0.1:30000/0 on managed thread 13
[2016-07-10 03:40:49.051 GMT 14 INFO 100000 Messaging.GatewayClientReceiver/gwy.tcp://127.0.0.1:30000/0 192.168.2.124:0] Starting AsyncAgent Messaging.GatewayClientReceiver/gwy.tcp://127.0.0.1:30000/0 on managed thread 14
[2016-07-10 03:40:49.180 GMT 10 INFO 100929 OutsideRuntimeClient 192.168.2.124:0] ---------- Started OutsideRuntimeClient with Global Client ID: C192.168.2.124:0:-205818048cli/48dfa89b@e77541ab, client GUID ID: cli/48dfa89b

Client code

var config = Orleans.Runtime.Configuration.ClientConfiguration.LocalhostSilo(30000);

GrainClient.Initialize(config); var hello = GrainClient.GrainFactory.GetGrain(0);

Console.WriteLine(hello.SayHello("First").Result); Invoking the SayHello method generates a AgregateException with the following inner exception: {"Could not load type 'Orleans.PublicOrleansTaskExtentions' from assembly 'Orleans, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null'.":"Orleans.PublicOrleansTaskExtentions"}

Thanks

benjaminpetit commented 8 years ago

Try to consolidate Orleans NuGet packages, I had this error, updating all packages to the same version fixed the issue for me.