2016-10-29 36 views
0

我試圖使用現有的Consul集羣作爲測試Orleans應用程序的成員資格提供程序。試圖與Consul設置Orleans集羣成員身份

我的客戶端應用程序連接到筒倉

中找不到任何Orleans.Runtime.Host.ConsulBasedMembershipTable網關時,我得到這個錯誤。奧爾良客戶端無法初始化。

挖掘到ConsulUtils類中,正在檢索的條目沒有定義ProxyPort - 並且被丟棄 - 因此是空的結果集。

我初始化這樣的筒倉:

 var clusterConfiguration = new ClusterConfiguration(); 
     clusterConfiguration.Globals.DataConnectionString = "http://localhost:8500"; 
     clusterConfiguration.Globals.DeploymentId = "OrleansPlayground"; 
     clusterConfiguration.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.Custom; 
     clusterConfiguration.Globals.MembershipTableAssembly = "OrleansConsulUtils"; 
     clusterConfiguration.Globals.ReminderServiceType = GlobalConfiguration.ReminderServiceProviderType.Disabled; 

     var silohost = new SiloHost("Fred", clusterConfiguration); 

     silohost.InitializeOrleansSilo(); 
     startup = Task.Factory.StartNew(() => 
     { 
      return silohost.StartOrleansSilo(); 
     }); 
     return true; 

我把我的客戶端應用程序像這樣:

 var config = new ClientConfiguration(); 

     config.CustomGatewayProviderAssemblyName = "OrleansConsulUtils"; 
     config.DataConnectionString = "http://localhost:8500"; 
     config.DeploymentId = "OrleansPlayground"; 
     config.GatewayProvider = ClientConfiguration.GatewayProviderType.Custom; 

     GrainClient.Initialize(config); 

綜觀ConsulUtils代碼中,我可以看到ProxyPort不當條目被保存時設置(即爲0)。所以我假設我在初始化筒倉時遇到了問題 - 但我無法弄清楚它是什麼!

回答

0

沒有深入挖掘,聽起來像是一個錯誤。請轉貼在GitHub上,我們會盡力幫助你。

+0

謝謝!我已經添加它作爲一個問題 - https://github.com/dotnet/orleans/issues/2370 –