TheoGBXuber
Scholar

Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Hi,

 

This is my first time trying to install 5.3 onto my local machine (or any machine). I am upgrading from my local installation of K2 4.7.

 

During the installation the K2HostServer.exe window opens but I get the error pasted below as a quote, and then I repeatedly see the error regarding “Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [{local machine ipv6 address}]:5560”

What is failing to work here? Do I need to speak to my IT team to open up port 5560? I only recall K2 using 5555 and 5252 previously.

Thank you

 

I have obviously covered my my licence and server key.

;K2 HostServer Console Mode
;======================================
;Loading .NET Framework v4.0.30319
;Framework loaded successfully.
;Creating Host Server Runtime.
;Press ESC to end..

Info    1001 Host Server Started as DOMAIN\username
Info    1002 Using .NET Framework v4.0.30319
Info    1003 Host Server Version: 5.1008.19172.2
Debug   15 Assembly Path: C:\Program Files (x86)\K2 blackpearl\Host Server\Bin
Info    1005 Initializing Connection to Host Server Database: AU-PF1QRY14.K2
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostSessionManager
Debug   1040 Connectionless Session Worker Thread Started
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostSecurityManager
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostLicenseManager
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostTypeLoader
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostServerBroker
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostTypeLoader
Debug   1006 Initializing SourceCode.Hosting.Server.Runtime.HostServiceBroker
Debug   0 No variable found: '[productversion]'. Exception: Error (0) .
Debug   0 Use HostServer Encryption: False
Info    1049 Loaded 1 Licenses.
Info    1048 K2 Five - Development Server License XXX
Error   0 System.Exception: Error (0) . ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [{local machine ipv6 address}]:5560
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at RestSharp.Http.GetRawResponse(HttpWebRequest request)
   at RestSharp.Http.GetResponse(HttpWebRequest request)
   --- End of inner exception stack trace ---
   at SourceCode.Configuration.Client.Extensions.RestSharpExtensions.EnsureSuccess(IRestResponse`1 response)
   at SourceCode.Configuration.Client.ConfigurationClient.GetServices()
   at SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll()
Debug   15 Machine Code: XXXX

Tags (1)
0 Kudos
11 Replies
Rusty02
Apprentice

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

@TheoGBXuber I wound run the k2 setup again and make sure k2 is configured to use/host on port 5555 (default) and you did not change the port number. 

Then you can run the following from a PowerShell prompt on that K2 server to validate connectivity: Test-NetConnection IP.XXX.XXX -Port PortNumber

Note: K2 Dev license requires to run K2 server on Console all the time.

0 Kudos
TheoGBXuber
Scholar

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Rusty02 wrote:

@TheoGBXuber I wound run the k2 setup again and make sure k2 is configured to use/host on port 5555 (default) and you did not change the port number. 

Then you can run the following from a PowerShell prompt on that K2 server to validate connectivity: Test-NetConnection IP.XXX.XXX -Port PortNumber

Note: K2 Dev license requires to run K2 server on Console all the time.


Thanks Rusty,

I definitely didn’t change the port number (this is already my third time going through the installation). I have tested as you say but nothing is found there which leads me to think there’s something else the installer should be running or something it can’t run.

The errors I’m seeing are in the HostServer log files. I note (strangely) that K2 seems to be using two different usernames for me. My work is not setup on a standard AD system any more. I am on a domain that but there is no direct controller linked. I see this in the errors:

64005 Failed to resolve '{MyMachineName}\{myusername}': Failed to translate name: {MyMachineName}\{myusername}."

So it’s as if it thinks I should have a user of the type DOMAIN\username and one of MACHINENAME\username.

0 Kudos
Rusty02
Apprentice

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

@TheoGBXuber Usually after loading the k2 licenses, k2 will load authentication providers. Is K2 configured to use Windows Active Directory or something else as authencation provider? What does your [K2].[HostServer].[SecurityLabel] table looks like?

Like you said, if you’ve configured k2 to use AD and it cannot contact the AD controller than it will fail to authenticate.

TheoGBXuber
Scholar

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Rusty02 wrote:

@TheoGBXuber Usually after loading the k2 licenses, k2 will load authentication providers. Is K2 configured to use Windows Active Directory or something else as authencation provider? What does your [K2].[HostServer].[SecurityLabel] table looks like?

Like you said, if you’ve configured k2 to use AD and it cannot contact the AD controller than it will fail to authenticate.


It’s upgrading from a 4.7 installation that was supposed to be setup to use local SQL authentication. Good point, I’m going to just make a fresh 4.7 install and make sure that was the case to see if it resolves it.

 

Thanks

0 Kudos
TheoGBXuber
Scholar

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Rusty02 wrote:

@TheoGBXuber Usually after loading the k2 licenses, k2 will load authentication providers. Is K2 configured to use Windows Active Directory or something else as authencation provider? What does your [K2].[HostServer].[SecurityLabel] table looks like?

Like you said, if you’ve configured k2 to use AD and it cannot contact the AD controller than it will fail to authenticate.


Okay, uninstalled everything and tried the 5.3 from scratch. I’m no longer seeing any references to two different users and this time I was definite that it’s not using AD but sadly the 5560 port request is still failing over and over for the K2HostServer.exe

 

Just getting this repeated over and over

 

"3492","2021-03-16 17:26:33","Error","General","0","ErrorMessage","SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll","0 System.Exception: Error (0) . ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [{localhost ipv6}]:5560
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at RestSharp.Http.GetRawResponse(HttpWebRequest request)
   at RestSharp.Http.GetResponse(HttpWebRequest request)
   --- End of inner exception stack trace ---
   at SourceCode.Configuration.Client.Extensions.RestSharpExtensions.EnsureSuccess(IRestResponse`1 response)
   at SourceCode.Configuration.Client.ConfigurationClient.GetServices()
   at SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll()","system","127.0.0.1","{MACHINE NAME}:C:\Program Files (x86)\K2 blackpearl\Host Server\Bin","3492","7f6b8315e30b489bb3f50f89cd87233b",""

 

0 Kudos
Rusty02
Apprentice

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

@TheoGBXuber Before installing fresh K2 5.3, did you delete the k2 database and k2 artifacts from the file storage?

The error message “SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll”, did you install Network Load Balancer feature on the server?

0 Kudos
kateV1
Apprentice

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Hi TheoGBXuber,

 

Do you have a load balance ? Kindly check if you are able to connect to that server or if it is running.

The below information can be seen from the error message that you have posted 

 

Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [{localhost ipv6}]:5560

 

Cheers,

Kate

0 Kudos
TheoGBXuber
Scholar

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

Rusty02 wrote:

@TheoGBXuber Before installing fresh K2 5.3, did you delete the k2 database and k2 artifacts from the file storage?

The error message “SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll”, did you install Network Load Balancer feature on the server?


Yeah I did a completely clean installation in the end - deleted everything from IIS and SQL Server and nuked any leftover directories in Program Files (x86)

 

kateV wrote:

Hi TheoGBXuber,

 

Do you have a load balance ? Kindly check if you are able to connect to that server or if it is running.

The below information can be seen from the error message that you have posted 

 

Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [{localhost ipv6}]:5560

 

Cheers,

Kate


Thanks Kate but this is a purely local Windows 10 Enterprise machine installation, so no load balancer. I will try going back to my IT department to see if they can open this port in my local firewall but it’s strange I never had this with 4.7. That’s why I’m wondering what port 5560 is used for.

 

Thanks

Theo

 

 

0 Kudos
Rusty02
Apprentice

Re: Installing K2 5.3 and K2HostServer is failing to connect to remote server on prt 5560

@TheoGBXuber I have never install k2 server on windows 10 so I would not advise it, highly suggest to install k2 server on Windows Server.

0 Kudos