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


Badge +2

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 DOMAINusername
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 blackpearlHost ServerBin
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


11 replies

Badge +5

@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.

Badge +2
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 DOMAINusername and one of MACHINENAMEusername.

Badge +5

@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.

Badge +2
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

Badge +2
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 blackpearlHost ServerBin","3492","7f6b8315e30b489bb3f50f89cd87233b",""

 

Badge +5

@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?

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

Badge +2
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

 

 

Badge +5

@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.

Badge +2
Rusty02 wrote:

@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.


I don’t have the option of Windows Server OS for my development machine really. Not sure all the other software I need would work on it and our IT system doesn’t cover that. It needs to be installed for the Visual Studio integration stuff.

Maybe I’ll see if I can just install that on its own and get it to work.

Userlevel 3
Badge +10
K2 Platform 5560 Inbound + Outbound HTTPS K2 Configuration Service connections. Incoming connections to update feature and service states, changes to install variables and shard configuration. Outgoing connections to provide requested configuration information on services, features, shards and K2 variables.

I believe this was introduced in one of the K2 5.X releases.

https://help.nintex.com/en-US/k2five/icg/5.4/default.htm#Prepare/Firewall-Settings.htm?Highlight=5560

Reply