且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用手动配置平台时建立应用程序端点时出现未知错误

更新时间:2022-10-17 21:01:24

是第二台机器,这是在T中失败了为联系对象配置的生锈应用程序池?


Hello,

I really hope I get some help here because I have been spending a few days on this with no luck. I have a very simple application that actually runs perfectly when I run it locally on the Lync Server machine. The application creates a manually provisioned platform, and on the endPlatform event, creates an application endpoint, then it does a begin establish on the endpoint (and also registers for IM incoming calls). When I run this on a remove server, it fails; when run locally on the Lync server it runs fine, so I am pretty sure all my configuration values are correct. I have installed a cert on the remove machine and pass that to the ServerPlatformSettings and that seems to work. I see the error when we call EndEstablish on the application endpoint. As I said, I am pretty sure I have the cert set up correctly. the remote machine is a VM, and it is a member of the same domain as the Lync Server machine. What should I check into to help me nail this down?

Note also that I tried to run this application using a auto provisioned application, but I get an exception while trying to do that on the endEstablish of the platform. Still trying to track that down, but one question that arises on this  is do I indeed need a local replicated store to be 'running' on my remote machine? I'll likely do another post on this error although it could be the same central problem leading to both the manual and auto provisioned platforms.

Below is the exception and the code (much of which was taken out of UCMA samples).

Thanks very much for any help!

Mike Castillo

 

Exception:

Collaboration platform associated with the provisioned application with ID urn:a

pplication:ucdev-speechserver has been started

RealTimeException : Microsoft.Rtc.Signaling.OperationFailureException:The GetInb

andDataAsyncResult operation has failed with message: "The data session subscrip

tion to server failed.". See the InnerException and FailureReason properties as

well as the logs for additional information.  ---> FaultCode=

Microsoft.Rtc.Signaling.PublishSubscribeException:The data session subscription

to server failed. ---> ErrorCode=-2146233088

FailureReason=RemoteDisconnected

LocalEndpoint=192.168.109.128:49315

RemoteEndpoint=10.3.1.201:5061

RemoteCertificate=[Subject]

  CN=ucdev2-ls-se1.gsiucdev2.com, OU=Gold Systems, O="Gold Systems, Inc", L=Boul

der, S=CO, C=US

 

[Issuer]

  CN=gsiucdev2-UCDEV2-DC1-CA, DC=gsiucdev2, DC=com

 

[Serial Number]

  618735C5000000000003

 

[Not Before]

  12/22/2010 4:07:55 PM

 

[Not After]

  12/21/2012 4:07:55 PM

 

[Thumbprint]

  DD8653009D01E254CFC297EA42324A700A6E2EB5

 

Microsoft.Rtc.Signaling.TlsFailureException:Unknown error (0x80131500) ---> Micr

osoft.Rtc.Internal.Sip.RemoteDisconnectedException: Peer disconnected while outb

ound capabilities negotiation was in progress ---> System.Net.Sockets.SocketExce

ption: An existing connection was forcibly closed by the remote host

   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)

   at Microsoft.Rtc.Internal.Sip.TcpTransport.OnReceived(Object arg)

   --- End of inner exception stack trace ---

 

--- End of inner exception stack trace ---

Detected at System.Environment.get_StackTrace()

   at Microsoft.Rtc.Signaling.Helper.get_StackTrace()

   at Microsoft.Rtc.Signaling.TlsFailureException..ctor(String message, Exceptio

n innerException, Int32 errorCode, TlsFailureReason tlsFailureReason, IPEndPoint

 localEndpoint, IPEndPoint remoteEndpoint, X509Certificate remoteCertificate)

   at Microsoft.Rtc.Signaling.TlsExceptionExtensions.CreateNewTlsFailureExceptio

n(TLSException tlsException, String message, Int32 errorCode, TlsFailureReason t

lsFailureReason)

   at Microsoft.Rtc.Signaling.Helper.MapToTlsFailureException(TLSException excep

tion)

   at Microsoft.Rtc.Signaling.ExceptionUtilities.TryMapS4Exception(Exception s4E

xception, SecurityAssociationContext securityContext, Boolean isSipEndpoint, Str

ing traceId, Object parentObject, Object childObject, RealTimeException& ex)

   at Microsoft.Rtc.Signaling.SipTransactionAsyncResult`1.ConnectionConnectCompl

eted(IAsyncResult result)

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.MakeCallback()

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.Complete(TEx ex, Boolean synchro

nousCompletion)

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.Complete(TEx ex)

   at Microsoft.Rtc.Signaling.RealTimeConnection.CompletePendingConnects(IEnumer

able`1 results, RealTimeException exception)

   at Microsoft.Rtc.Signaling.RealTimeConnection.<.ctor>b__0(SipConnection sende

r, Object reason)

   at Microsoft.Rtc.Internal.Sip.SipConnection.FireDisconnectedEvent(Object reas

on)

   at Microsoft.Rtc.Internal.Sip.IOWorkItem1Arg.Execute()

   at Microsoft.Rtc.Internal.Sip.SingleThreadedDispatcherQueue.DispatcherCallbac

k(Object queue)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_Thre

adPoolWaitCallback tpWaitCallBack)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

 

 

 

--- End of inner exception stack trace ---

   at Microsoft.Rtc.Signaling.SipAsyncResult`1.ThrowIfFailed()

   at Microsoft.Rtc.Signaling.Helper.EndAsyncOperation[T](Object owner, IAsyncRe

sult result)

   at Microsoft.Rtc.Signaling.Helper.EndAsyncOperation[T](Object owner, IAsyncRe

sult result, String operationId)

   at Microsoft.Rtc.Collaboration.Presence.ProvisioningQuery.EndQuery(IAsyncResu

lt result)

   at Microsoft.Rtc.Collaboration.GetInbandDataAsyncResult.InbandQueryCompleted(

IAsyncResult result)

Detected at System.Environment.get_StackTrace()

   at Microsoft.Rtc.Signaling.FailureResponseException..ctor(String message, Exc

eption innerException, SipResponseData responseData)

   at Microsoft.Rtc.Signaling.PublishSubscribeException..ctor(String message, Ex

ception innerException)

   at Microsoft.Rtc.Signaling.SipSubscription.ProcessError(Exception exception)

   at Microsoft.Rtc.Signaling.SipSubscribeTransactionAsyncResult.ProcessError(Re

alTimeException exception, SipResponseData responseDataIfAny)

   at Microsoft.Rtc.Signaling.SipTransactionAsyncResult`1.ProcessError(RealTimeE

xception exception)

   at Microsoft.Rtc.Signaling.SipTransactionAsyncResult`1.ConnectionConnectCompl

eted(IAsyncResult result)

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.MakeCallback()

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.Complete(TEx ex, Boolean synchro

nousCompletion)

   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.Complete(TEx ex)

   at Microsoft.Rtc.Signaling.RealTimeConnection.CompletePendingConnects(IEnumer

able`1 results, RealTimeException exception)

   at Microsoft.Rtc.Signaling.RealTimeConnection.<.ctor>b__0(SipConnection sende

r, Object reason)

   at Microsoft.Rtc.Internal.Sip.SipConnection.FireDisconnectedEvent(Object reas

on)

   at Microsoft.Rtc.Internal.Sip.IOWorkItem1Arg.Execute()

   at Microsoft.Rtc.Internal.Sip.SingleThreadedDispatcherQueue.DispatcherCallbac

k(Object queue)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_Thre

adPoolWaitCallback tpWaitCallBack)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

 

 

 

 

--- End of inner exception stack trace ---

   at Microsoft.Rtc.Signaling.SipAsyncResult`1.ThrowIfFailed()

   at Microsoft.Rtc.Signaling.Helper.EndAsyncOperation[T](Object owner, IAsyncRe

sult result)

   at Microsoft.Rtc.Collaboration.LocalEndpoint.EndEstablish(IAsyncResult result

)

   at Microsoft.Rtc.Collaboration.Sample.AutoProvisioning.UCMASampleAutoProvisio

ning.EndEndpointEstablish(IAsyncResult ar) in C:\Program Files\Microsoft UCMA 3.

0\SDK\Core\Sample Applications\QuickStarts\AutoProvisioning\Autoprovisioning.cs:

line 254

Detected at System.Environment.get_StackTrace()

   at Microsoft.Rtc.Signaling.OperationFailureException..ctor(String message, Ex

ception innerException)

   at Microsoft.Rtc.Collaboration.GetInbandDataAsyncResult.InbandQueryCompleted(

IAsyncResult result)

   at Microsoft.Rtc.Signaling.SipAsyncResult`1.MakeCallback(Object state)

   at Microsoft.Rtc.Signaling.SipAsyncResult`1.Complete(TEx ex, Boolean synchron

ousCompletion)

   at Microsoft.Rtc.Signaling.SipAsyncResult`1.Complete(TEx ex)

   at Microsoft.Rtc.Collaboration.Presence.ProvisioningQueryAsyncResult.Subscrib

eCompleted(IAsyncResult result)

   at Microsoft.Rtc.Signaling.CompletionCallbackWorkItem.Microsoft.Rtc.Signaling

.IWorkitem.Process()

   at Microsoft.Rtc.Signaling.WorkitemQueue.ProcessItems()

   at Microsoft.Rtc.Signaling.SerializationQueue`1.ResumeProcessing()

   at Microsoft.Rtc.Signaling.SerializationQueue`1.ResumeProcessingCallback(Obje

ct state)

   at Microsoft.Rtc.Signaling.QueueWorkItemState.ExecuteWrappedMethod(WaitCallba

ck method, Object state)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C

ontextCallback callback, Object state)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_Thre

adPoolWaitCallback tpWaitCallBack)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

 

FailureReason = Unknown

Code:

var certToUse = UCMASampleHelper.GetLocalCertificate("UCDEV2-LS-SE1-1");

                    // not getting any serts back here so use constructor that does not pass certs

                    ServerPlatformSettings settings = null;

                    if (certToUse == null)

                    {

                        settings = new ServerPlatformSettings("SpeechServer", "ucdev2-ls-se1.gsiucdev2.com", 10607,

                            "sip:ucdev2-ls-se1.gsiucdev2.com@gsiucdev2.com;gruu;opaque=srvr:ucdev-speechserver:DtPG12QtslKKk5EoUH-UJQAA");

                    }

                    else

                    {

                        settings = new ServerPlatformSettings("SpeechServer", "ucdev2-ls-se1.gsiucdev2.com", 10607,

                            "sip:ucdev2-ls-se1.gsiucdev2.com@gsiucdev2.com;gruu;opaque=srvr:ucdev-speechserver:DtPG12QtslKKk5EoUH-UJQAA", certToUse);

                    }

 

...

 

collabPlatform.EndStartup(ar);

                Console.WriteLine("Collaboration platform associated with the provisioned application with "

                    + "ID {0} has been started", _appID);

                ApplicationEndpointSettings appEndpointSettings = new ApplicationEndpointSettings("sip:V7SS-WorkflowDemo@gsiucdev2.com", "ucdev2-ls-se1.gsiucdev2.com", 5061);

                appEndpointSettings.Presence.InitialPresenceState = PresenceState.PersistentOnline;

                appEndpointSettings.Presence.PresentityType = "automaton";

                appEndpointSettings.Presence.Description = "AlwaysOnBot";

                ApplicationEndpoint _applEndpoint = new ApplicationEndpoint(collabPlatform, appEndpointSettings);

                // register for incoming calls (either audiovideo, im or both, depending on the app

                _applEndpoint.RegisterForIncomingCall<InstantMessagingCall>(InstantMessagingCallReceived);

                _applEndpoint.BeginEstablish(EndEndpointEstablish, _applEndpoint);

 

...

 

Throws exception here:

LocalEndpoint currentEndpoint = ar.AsyncState as LocalEndpoint;

            try

            {

                currentEndpoint.EndEstablish(ar);

            }

Is the 2nd machine, where this fails, in the Trusted Application pool that the contact object is configured for?