Unable to establish a connection.

Nov 29, 2011 at 11:52 AM
Edited Nov 29, 2011 at 11:54 AM

Hi,

Lync Resence is working but if I try to chat I get the Message "Unable to establish a connection" after entering my name.
In the Error Log I found this:

2011-11-29 13:19:14,090 [11] ERROR Lync.Widget.Service.InstantMessaging.UCInstantMessageProvider [(null)] - ConnectionFailureException
Microsoft.Rtc.Signaling.ConnectionFailureException:Unable to establish a connection. ---> System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.18:5061
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at Microsoft.Rtc.Internal.Sip.TcpTransport.OnConnected(Object arg)
  
--- End of inner exception stack trace ---
   at Microsoft.Rtc.Signaling.SipAsyncResult`1.ThrowIfFailed()
   at Microsoft.Rtc.Signaling.Helper.EndAsyncOperation[T](Object owner, IAsyncResult result)
   at Microsoft.Rtc.Collaboration.LocalEndpoint.EndEstablish(IAsyncResult result)
   at Lync.Widget.Service.InstantMessaging.UCInstantMessageProvider.EndEndpointEstablish(IAsyncResult ar) in C:\Users\admschuenemann\Downloads\LyncWidget_118da305b239\src\Lync.Widget\Lync.Widget.Service\InstantMessaging\UCInstantMessageProvider.cs:line 204
Detected at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at Microsoft.Rtc.Signaling.ExceptionUtilities.TryMapS4Exception(Exception s4Exception, SecurityAssociationContext securityContext, Boolean isSipEndpoint, String traceId, Object parentObject, Object childObject, RealTimeException& ex)
   at Microsoft.Rtc.Signaling.SipTransactionAsyncResult`1.ConnectionConnectCompleted(IAsyncResult result)
   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.MakeCallback()
   at Microsoft.Rtc.Signaling.SipAsyncResult2`1.Complete(TEx ex, Boolean synchronousCompletion)
   at Microsoft.Rtc.Signaling.RealTimeConnection.CompletePendingConnects(IEnumerable`1 results, RealTimeException exception)
   at Microsoft.Rtc.Signaling.RealTimeConnection.<.ctor>b__0(SipConnection sender, Object reason)
   at Microsoft.Rtc.Internal.Sip.SipConnection.DisconnectedEventHandler.Invoke(SipConnection sender, Object reason)
   at Microsoft.Rtc.Internal.Sip.SipConnection.FireDisconnectedEvent(Object reason)
   at Microsoft.Rtc.Internal.Sip.IOWorkItem1Arg.Execute()
   at Microsoft.Rtc.Internal.Sip.SingleThreadedDispatcherQueue.DispatcherCallback(Object queue)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

But I have no Idea how to fix this.

Any Idea?

Best regards
Carsten

Coordinator
Dec 2, 2011 at 1:32 PM

I'm not a sys admin, but

"System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.18:5061"

smells like a firewall issue.

Try allowing TCP on port 5061.

Dec 5, 2011 at 7:40 AM

Firewall was my first idea too, so I disabled the firewall but I get the same error.

Dec 7, 2011 at 6:32 AM

Hi,
the Problem was fixed. I had a wrong Lync Server in the web.config.