[.NET]Remote Message Queue aanroepen geeft foutmelding

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • P_de_B
  • Registratie: Juli 2003
  • Niet online
We hebben een applicatie die is gemaakt in het .Net 3.0 framework. Een onderdeel van deze applicatie voegt messages aan een remote Message Queue (MS MQ op een Win2k3 server) toe. We lopen tegen een probleem aan als op de clientmachine (Win XP, .Net 3.0) geen Message Queueing is geïnstalleerd. Op een machine met mmq geïnstalleerd treedt het probleem niet op. We krijgen de volgende foutmelding op het moment dat we een bericht in de queue proberen te plaatsen:

code:
1
the type initializer for 'System.ServiceModel.Channels.Msmq' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'mqrt.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)


We gebruiken de volgende config instellingen voor de queue:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<system.serviceModel>
    <bindings>
      <netMsmqBinding>
        <binding name="NetMsmqBinding_IServiceForInvoice" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            deadLetterQueue="System" durable="true" exactlyOnce="true"
            maxReceivedMessageSize="65536" maxRetryCycles="2" receiveErrorHandling="Fault"
            receiveRetryCount="5" retryCycleDelay="00:30:00" timeToLive="1.00:00:00"
            useSourceJournal="false" useMsmqTracing="false" queueTransferProtocol="Native"
            maxBufferPoolSize="524288" useActiveDirectory="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
                msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="NetMsmqBinding_IServiceForConceptInvoice" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            deadLetterQueue="System" durable="true" exactlyOnce="true"
            maxReceivedMessageSize="65536" maxRetryCycles="2" receiveErrorHandling="Fault"
            receiveRetryCount="5" retryCycleDelay="00:30:00" timeToLive="1.00:00:00"
            useSourceJournal="false" useMsmqTracing="false" queueTransferProtocol="Native"
            maxBufferPoolSize="524288" useActiveDirectory="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
                msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="NetMsmqBinding_IServiceForInvoicePart" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            deadLetterQueue="System" durable="true" exactlyOnce="true"
            maxReceivedMessageSize="65536" maxRetryCycles="2" receiveErrorHandling="Fault"
            receiveRetryCount="5" retryCycleDelay="00:30:00" timeToLive="1.00:00:00"
            useSourceJournal="false" useMsmqTracing="false" queueTransferProtocol="Native"
            maxBufferPoolSize="524288" useActiveDirectory="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
                msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netMsmqBinding>
    </bindings>
    <client>
      <endpoint address="net.msmq://SERVER/private/QueueModule2"
          binding="netMsmqBinding" bindingConfiguration="NetMsmqBinding_IServiceForInvoice"
          contract="VCLXPA.Module.InvoiceWF.IServiceForInvoice"
          name="NetMsmqBinding_IServiceForInvoice" />
      <endpoint address="net.msmq://SERVER/private/QueueModule1"
          binding="netMsmqBinding" bindingConfiguration="NetMsmqBinding_IServiceForConceptInvoice"
          contract="VCLXPA.Module.ConceptInvoiceWF.IServiceForConceptInvoice"
          name="NetMsmqBinding_IServiceForConceptInvoice" />
      <endpoint address="net.msmq://SERVER/private/QueueModule4"
          binding="netMsmqBinding" bindingConfiguration="NetMsmqBinding_IServiceForInvoicePart"
          contract="VCLXPA.Module.InvoicePartWF.IServiceForInvoicePart"
          name="NetMsmqBinding_IServiceForInvoicePart" />
    </client>
  </system.serviceModel>


en de volledige stacktrace: (van een Nederlandse client :|):
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
The error occured
    Type:       TypeInitializationException
    Message:    De type-initialisatiefunctie voor System.ServiceModel.Channels.Msmq heeft een uitzondering veroorzaakt.
    Data:       0 entries
    Stack trace:
   bij System.ServiceModel.Channels.Msmq.EnterXPSendLock(Boolean& lockHeld, ProtectionLevel protectionLevel)
   bij System.ServiceModel.Channels.MsmqOutputChannel.OnSend(Message message, TimeSpan timeout)
   bij System.ServiceModel.Channels.OutputChannel.Send(Message message, TimeSpan timeout)
   bij System.ServiceModel.Dispatcher.OutputChannelBinder.Send(Message message, TimeSpan timeout)
   bij System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   bij System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   bij System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   bij System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [1]: 
   bij System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   bij System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   bij VCLXPA.Module.InvoiceWF.IServiceForInvoice.ManualAuthorization(ManualAuthorization invoice, Int32 UserID, Int32 Status)
   bij VCLXPA.Module.GUIInvoiceHandler.DoManualAuthorization(Int32 InvoiceId, Int32 Uname, Int32 status, Session session)
   bij VCLXPA.Module.Win.vwControllerInvoice.actManualAuthorization_Execute(Object sender, SimpleActionExecuteEventArgs e)
   bij DevExpress.ExpressApp.Actions.SimpleAction.RaiseExecute(ActionBaseEventArgs eventArgs)
   bij DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
InnerException:
    Type:       DllNotFoundException
    Message:    Kan DLL mqrt.dll niet laden: Een initialisatieroutine van de dynamic link library (DLL-bestand) is mislukt. (Uitzondering van HRESULT: 0x8007045A)
    Data:       0 entries
    Stack trace:
   bij System.ServiceModel.Channels.UnsafeNativeMethods.MQGetPrivateComputerInformation(String computerName, IntPtr properties)
   bij System.ServiceModel.Channels.MsmqQueue.GetMsmqInformation(Version& version, Boolean& activeDirectoryEnabled)
   bij System.ServiceModel.Channels.Msmq..cctor()
    InnerException is null


Ik heb me suf gegoogled, maar ik kan er geen oplossing voor vinden. Het enige dat lijkt te werken is het installeren van Message Queuing op de client, en dat is iets dat we willen voorkomen als het even kan. Dat maakt het installeren en uitrollen van de applicatie alleen maar ingewikkeld.

Voor zover ik het begrijp gebruikt onze applicatie mqrt.dll, maar wordt bij het initialiseren van deze dll een andere library aangeroepen die niet standaard is geïnstalleerd.

Is er iemand die mij verder op weg kan helpen, heb je bijvoorbeeld remote mmq wel werkend gekregen zonder mmq op de client te installeren? Hoe kan ik erachter komen welke extra library aangeroepen wordt bij het initialiseren van mqrt.dll?

Oops! Google Chrome could not find www.rijks%20museum.nl


Acties:
  • 0 Henk 'm!

  • Motrax
  • Registratie: Februari 2004
  • Niet online

Motrax

Profileert

Ik ben totaal onbekend met MS MQ en ken alleen IBM MQ.

IBM MQ kent een server en een client installatie. De client installatie is voldoende om remote queues aan te kunnen spreken.

Kent MS MQ zoiets ook?

☻/
/▌
/ \ Analyseert | Modelleert | Valideert | Solliciteert | Generaliseert | Procrastineert | Epibreert |


Acties:
  • 0 Henk 'm!

  • P_de_B
  • Registratie: Juli 2003
  • Niet online
Blijkbaar wel; vlak na het posten van dit bericht ( :( ) vond ik een site die het probleem behandelt:
6. Finally, when you send messages to remote queue, a temporary outgoing queue is created on your own machine. This is used in case the remote queue is unavailable. If you go to the computer Management console (compmgmt.msc), and expand the Services and Applications / Message Queuing / Outgoing Queues, you would see these queues. The right side of the console should show the details including the state (connected or not) and the IP address(es) for the next hop(s).
Het lijkt er dus op dat clients ook MS MQ geinstalleerd moeten hebben. Dit is wel vervelend, dus als iemand nog een andere oplossing heeft hoor ik dat graag.

Oops! Google Chrome could not find www.rijks%20museum.nl


Acties:
  • 0 Henk 'm!

  • Xiphalon
  • Registratie: Juni 2001
  • Laatst online: 12:43
Het hele idee achter MSMQ is het veilig overbrengen van berichten. Hiervoor heb je inderdaad een client lokaal nodig, dus je zal er niet omheen kunnen zeilen.

Wat je wel kan doen is via remoting ofzo het bericht op de remote client zelf in de daar lokale queue zetten. Je mist dan waarschijnlijk wel de zekerheid dat het bericht aankomt (ik denk niet dat de DTC zover gaat, dus je hebt geen transactie), maar je hebt wel het losgekoppelde gedrag.

Maar ik zou er sterk op aansturen dat je de MSMQ client op je client zet.

Acties:
  • 0 Henk 'm!

  • P_de_B
  • Registratie: Juli 2003
  • Niet online
Ok, duidelijk. Dan zullen we dat in onze requirements systeemeisen moeten meenemen.

Oops! Google Chrome could not find www.rijks%20museum.nl