2016-06-24 17 views
5

मैंने एक अभिनेता सेवा बनाई है, जो विकास क्लस्टर पर चलता है। एक एएसपी.नेट आवेदन (आईआईएस के माध्यम से अलग से होस्ट किया गया), क्लस्टर से जुड़ता है और अभिनेताओं का उपयोग करता है। यह ठीक काम करता है।Azure सेवा फैब्रिक उत्पादन सर्वर पर डीएलएल गायब है: FabricCommon.dll

लेकिन जब मैं उत्पादन वातावरण में सबकुछ तैनात करता हूं, तो एएसपी.NET अनुप्रयोग क्लस्टर से नीचे अपवाद के साथ कनेक्ट करने में विफल रहता है। क्लस्टर ऑन-प्रिमाइज़ (विंडोज 2012 आर 2) होस्ट किया गया है।

The type initializer for 'Microsoft.ServiceFabric.Services.ServiceTrace' threw an exception. 

Stacktrace: 
    at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.TryGetConfigPackageObject(String configPackageName, ConfigurationPackage& package) 
    at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetSettingsFilePath(String configPackageName) 
    at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetConfig() 
    at Microsoft.ServiceFabric.Services.Common.FabricServiceConfigSection.Initialize() 
    at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.LoadFrom(String sectionName, String filepath, String configPackageName) 
    at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.TryLoadFrom(String sectionName, FabricTransportSettings& settings, String filepath, String configPackageName) 
    at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.GetDefault(String sectionName) 
    at Microsoft.ServiceFabric.Actors.Remoting.FabricTransport.FabricTransportActorRemotingProviderAttribute.CreateServiceRemotingClientFactory(IServiceRemotingCallbackClient callbackClient) 
    at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateServiceRemotingClientFactory(Type actorInterfaceType) 
    at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.GetOrCreateServiceRemotingClientFactory(Type actorInterfaceType) 
    at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateActorProxy[TActorInterface](Uri serviceUri, ActorId actorId, String listenerName) 
    at Microsoft.ServiceFabric.Actors.Client.ActorProxy.Create[TActorInterface](ActorId actorId, Uri serviceUri, String listenerName) 

Inner Exception: 
innerExceptionType: System.DllNotFoundException 
innerStacktrace: 
    at System.Fabric.Interop.NativeCommon.FabricGetConfigStore(Guid& riid, IFabricConfigStoreUpdateHandler updateHandler) 
    at System.Fabric.Common.NativeConfigStore.CreateHelper(IFabricConfigStoreUpdateHandler updateHandler) 
    at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String functionArgs) 
    at System.Fabric.Interop.Utility.RunInMTA[TResult](Func`1 func) 
    at Microsoft.ServiceFabric.Common.Tracing.Trace.InitializeFromConfigStore() 
    at Microsoft.ServiceFabric.Services.ServiceTrace..cctor() 
innerExceptionMessage: Unable to load DLL 'FabricCommon.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 
exceptionType: System.TypeInitializationException 

ऐसा लगता है कि FabricCommon.dll वेब सर्वर (जो ASP.NET होस्ट करता है) पर नहीं पाया जा सका।

मुझे पता चला कि यह फ़ाइल क्लस्टर स्थापना पैकेज का हिस्सा है। विकास मशीन और क्लस्टर मशीनों पर, फ़ाइल यहां स्थित है: C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricCommon.dll। लेकिन यह स्पष्ट रूप से क्लाइंट एप्लिकेशन में NuGet के माध्यम से स्थापित निर्भरता नहीं है।

क्या मैं वेब सर्वर पर किसी भी शर्त को स्थापित करने के लिए चूक गया? क्या मुझे मैन्युअल रूप से डीएलएल शामिल करना है?

+0

वर्णित त्रुटि तब होती है का उपयोग कर जब मैं एक ActorProxy बनाने का प्रयास करें सेवा हल कर सकते हैं साथ my repo है। लेकिन इस बीच (इस पोस्ट के लिए धन्यवाद: http://stackoverflow.com/questions/38015934/how-to-create-actor-proxy-to-remote-service-fabric-cluster) मैंने सीखा है कि एक अभिनेताप्रॉक्सी का उपयोग करना क्लस्टर के बाहर एक क्लाइंट एप्लिकेशन से वर्तमान में अच्छी तरह से काम नहीं करता है। एक ही एसएफ आवेदन के भीतर एक स्टेटलेस वेबएपीआई सेवा का उपयोग करना एक विकल्प है (जैसा कि यहां दिखाया गया है: https://github.com/Azure-Samples/service-fabric-dotnet-web-reference-app)। – Henrik

उत्तर

2

मुझे लगता है कि आपको वेब सर्वर पर सेवा फैब्रिक एसडीके इंस्टॉल करने की आवश्यकता है। https://azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/

+0

हाय। इसने मेरी विशेष समस्या हल की (डीएलएल गायब)। हालांकि मुझे वेब सर्वर को एक देव मशीन में परिवर्तित करना पड़ा। और रिमोट क्लस्टर से कनेक्ट करना अभी भी एक मुद्दा है। इस बीच मैंने पाया [यह] (http://stackoverflow.com/questions/38015934/how-to-create-actor-proxy-to-remote-service-fabric-cluster)। – Henrik

1

मैं यह मेरी देव मशीन में एक बिंदु पर होने है:

नीचे दिए गए लिंक देखें। मैंने जो किया वह सेवा फैब्रिक एसडीके को पुनर्स्थापित करना था।

2

अपने पथ वातावरण चर के लिए निम्न सेवा कपड़ा बिन पथ जोड़ें:

set PATH=%PATH%;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code 

इसके अलावा सेट निष्पादन नीति अप्रतिबंधित करने के लिए:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser 
0

मामलों आप पर सेवा कपड़ा एसडीके स्थापित नहीं कर सकता जब के लिए लक्ष्य पर्यावरण Service Fabric REST API का उपयोग करने का विकल्प है।

यहाँ एपीआई सी # में लिखा ग्राहक जो, इस एपीआई

संबंधित मुद्दे