Error Starting Host Server

  • 26 July 2018
  • 8 replies
  • 24 views

Hi ,

 I have upgraded the K2 blacpearl version from 4.6.10 to 4.6.11 by installing K2 blackpearl 4.6.11 (4.12060.1731.2) installable. When i try to start the balcpearl service i get the following error.

 

Error   2001 Error Starting Host Server: bind() Failed. Error code: 10013
;Error Invoking 'StartHostServer' : SourceCode.HostServerLib : bind() Failed. Er
ror code: 10013


;Stopped Hosting Server Runtime
Press any key to continue...Info        61002 Started MessageBus service.


8 replies

Badge +12

Is there anything else in the logs (in the host serverin folder) or the event logs on the server?

Did you also happen to install any windows updates?

Try running the configuration analysis tool and see if it calls anything out as a problem

Hi Jayant


 


A Bind Failed error usually happens if the Hostserver port (TCP 5555) is already in use by a different process.


 


The most common cause of this is if the K2 Hostserver is started up twice. (i.e. as a service and in the console)


 


You can run the following command in Command Prompt to show you the ProcessID of anything using port 5555: netstat -ano | find "5555" | find "LISTENING"


 


You can then find the Process Name using the following command (e.g. PID 4444): tasklist /fi "pid eq 4444"


 


Cheers,
T

Thank you for the reply.

 I ran the K2 Setup configuration analysis after the install and it has the following errors.

 

 

K2Services - Set Virtual Directory Anonymous Authentication
-----------------------------------------------------------
Analysis Result: Failed.
Authentication options is set to Anonymous Authentication.
The K2Services virtual directory does not have the correct authentication options. The virtual directory requires Anonymous authentication.

Current Settings:
Windows Authentication: False
Anonymous Authentication: True
Forms Authentication: False

Duration: 2.1723754 seconds

AutoDiscover - Set Virtual Directory Negotiation
------------------------------------------------
Analysis Result: Passed.
Authentication options is set to NTLM and Anonymous Authentication.
A Service Principal Name has not been detected for application pool user  of the K24611 virtual directory. The virtual directory has the recommended authentication options.

Current Settings:
Windows Authentication: True
Anonymous Authentication: True
Forms Authentication: False
Use Kernel Mode Authentication: True
Use Application Pool Credentials: False


Identity - Set Virtual Directory Negotiation
--------------------------------------------
The task is not complete as one or more of its dependencies failed.

Identity - Set Virtual Directory Anonymous Authentication
---------------------------------------------------------
Analysis Result: Warning.
Authentication options is set to Anonymous Authentication.
The Identity virtual directory does not have the correct authentication options. The virtual directory requires Anonymous authentication.

Current Settings:
Windows Authentication: False
Anonymous Authentication: True
Forms Authentication: False

 

Windows - Set Virtual Directory Negotiation
-------------------------------------------
Analysis Result: Failed.
Authentication options is set to Unknown Authentication.
The web.config file cannot be modified due to malformed XML. Open the file directly, update it to resolve the issue, and then Repair this task.
Details: Filename: ?C:Program Files (x86)K2 blackpearlWebServicesIdentityweb.config
Line number: 53
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'NTLM'

Filename: ?C:Program Files (x86)K2 blackpearlWebServicesIdentityweb.config
Line number: 53
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'NTLM'

Filename: ?C:Program Files (x86)K2 blackpearlWebServicesIdentityweb.config
Line number: 53
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'NTLM'


Duration: 10.4264068 seconds

Forms - Set Virtual Directory Negotiation
-----------------------------------------
Analysis Result: Warning.
Authentication options is set to Unknown Authentication.
Current Settings:
Windows Authentication: False
Anonymous Authentication: False
Forms Authentication: False

Installation Health
-------------------
Results are based on install done on: 30/07/20*personal details removed*:05:00
Analysis Result: Failed.

The following errors were logged as part of the install:
K2 Workspace error: Filename: ?C:Program Files (x86)K2 blackpearlWebServicesIdentityweb.config

 

The Installtracelog shows the following error.

 Logged Error: K2 Workspace error: Filename: ?C:Program Files (x86)K2 blackpearlWebServicesIdentityweb.config
Line number: 53
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'NTLM'

 

The web.config had the value

      <providers>
            <add value="NTLM" />
      </providers>

 

I compared it with the another the production server web config and replaced it with the config

 

 <providers>
            <remove value="Negotiate" />
            <remove value="NTLM" />
            <add value="NTLM" />
 </providers>

 

It however did not make any difference.

Badge +12

Hi Jayant - I would try rebooting the server (to make sure no other user has an active session, or killing any other user's active session via task manager) and start the K2 blackpearl server in console mode to see if there are any differences in behavior.

Also, when you ran the configuration analysis, was "repair" an option for the issue that it found?

I did restart the server and also rerun the "repair all" . I did paste the error logs in the previous reply.

 

Is there any documentation for these errors  or possible causes for the errors

Error   2001 Error Starting Host Server: bind() Failed. Error code: 10013;Error Invoking 'StartHostServer' : SourceCode.HostServerLib : bind() Failed. Error code: 10013

 

Regards,

 

 

 

Badge +12

Usually that error means another instance of the K2 service is running, which seems unlikely given the steps you have taken. Are you starting the server in console mode and seeing this message appear? Or are you trying to start the K2 blackpearl windows service and seeing this message in the host server logs?

Hi,

Yes. I am starting the server in console mode as this a dev server.  In the event viewer logs in i get the following error.

 

7998 An error has occurred: System.TypeInitializationException: The type initializer for 'SourceCode.EventBus.Utils.Config' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Required attribute 'mailassembly' not found. (C:Program Files (x86)K2 blackpearlHost ServerBinK2HostServer.exe.Config line 29)

at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)

at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)

at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)

at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)

at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)

at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)

at System.Configuration.ConfigurationManager.GetSection(String sectionName)

at SourceCode.EventBus.Utils.Config..cctor()

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

at SourceCode.EventBus.Utils.Config.get_EventBusConfiguration()

at SourceCode.EventBus.Scheduler.Server.ScheduleProcessing.InitializeConfigSettings()

Does K2 upgrade not work on dev servers

 

For the bind error, as mentioned before, this has something to do with the port already being used by some other application, or it can be that you already have another instance of K2HostServer.exe running. Open your Windows Task Manager, and check if you have a K2HostServer.exe already running in the background. If not, you have to run a netstat to check if there are any application that is listening at port 5555 or port 5252.


 


And as for the mailassembly not found error, please edit your K2HostServer.exe.config with a notepad, then search for "<sourcecode.eventbus" (without quotes).


 


Do you see a mailassembly property there? The entire line should look something like this:


 


<sourcecode.eventbus mailassembly="C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.EventBus.MessageBusRecorder.dll" mailassemblytype="SourceCode.EventBus.MessageBusRecorder.MessageBusMailer" mailmethodsignature="Void SendMail(System.String, System.String, System.String, System.String, System.String, System.String, Boolean, System.String)" notificationtemplatepath="C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.EventBus.ClientRecorder.DLL.mailTemplate" eventbusserverdependencies="SourceCode.SmartObjects.Runtime.SmartObjectClientServer,SourceCode.SmartObjects.Runtime.SmartObjectManagementServer" msmqpath="DLXEventBus" msmqerrorpath="DLXEventBus Error" eventqueuingassembly="SourceCode.EventBus.MSMQSource.dll" eventqueuingtype="SourceCode.EventBus.MSMQSource.MessagesFromSource" eventbuffersize="25" eventpollinginterval="15" getschedulesinterval="60" sendmailfrom="k2service@denallix.com">

 

Reply