Symptoms
We have deployed our first Smartforms Application to newly installed Production server.
During testing we can create new request but unfortunately there was no email. We can approve-reject directly on workspace.
Log error files shows error as below, could you guide us on this issue.
"1510056","2015-12-08 09:16:47","Error","General","0","ErrorMessage","SourceCode.Hosting.Server.Services.DiscoveryService.Init","0 Only one usage of each socket address (protocol/network address/port) is normally permitted","system","::1","TH1SRK2-05:C:Program Files (x86)K2 blackpearlHost ServerBin","1510056","2fc6b11e951a4be2ac090efba0356e4a",""
"1510079","2015-12-08 09:16:47","Error","System","2001","ServerStartError","SourceCode.Hosting.Server.Runtime.HostServerEngine.StartHostServer","2001 Error Starting Host Server: bind() Failed. Error code: 10048","system","10.150.2.30","TH1SRK2-05:C:Program Files (x86)K2 blackpearlHost ServerBin","1510079","b6fcc918c81f4072bb749717e030adbc",""
Diagnoses
Either K2 is not configured with the correct connection string to Exchange server, or there is something wrong with MSMQ.
Resolution
After enabling full logging, a new error message appeared.
"Error","EventBus","7498","General","EventQueueProcessing.RetrieveEventItemsFromSource","7498 An error has occurred: System.Messaging.MessageQueueException (0x80004005): A connection with Active Directory cannot be established. Verify that there are sufficient permissions to perform this operation.
It was discovered that the new error message has something to do with MSMQ. Upon checking the Public Queues, it was discovered that only the eventbus error queue was there. The eventbus queue was missing. After creating the queue and running a test again, a new error appears:
"Error","MessageBus","61012","ConnectionError","ExchangeWebServicesOrigin","61012 Exception from message source utlk2workflow@utacgroup.com: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
The new error shows that K2 is properly connecting to the Exchange server. Checking the connection string yields no result. Running the Setup Manager again did not help as well. After going through the Exchange Integration for Exchange Online, the user granted K2 service account the "ApplicationImpersonation" rights and the problem is fixed.
Reference:
http://help.k2.com/kb001189