Unable to connect to Server on port 5252

  • 28 December 2007
  • 23 replies

After installing BlackPearl SP1 on a VM, I am getting this error when I open the K2 Workspace:

Unable to connect to vm2003server on port 5252
No connection could be made because the target machine actively refused it.

Both my install log and configuration log contain only INFO messages. 

I installed all K2 pieces on the machine except for the Reporting piece.  

 I tried telnetting to the server on 5252, but the connection fails.

Did I miss something in my install or config?

23 replies

I was reading another post that suggested running the K2 Host Server in console mode and I saw an error message that popped up:

;Error Invoking 'StartHostServer' : bind() Failed. Error code: 10048
;Stopped Hosting Server Runtime


I have seen this error in the Console mode when the K2 Host Server is already running in Service mode.  Can you confirm that the service is not already running in the Windows Service Applet?


There is no host server service on the machine.  The only K2 item in my Services list is K2 [blackpearl] Server.  The status on that service is not started.
Has the server been rebooted since Configuration Manager was run?

Also, have you tried enabling logging within the K2 (to log to a File and/or Event Log) and then restart the K2 Blackpearl Service to see if the service is encountering the same error as when in console mode.

1.) Yes the machine has been restarted.

2.) I don't see any errors in the log file that the host creates.   There are some Debugs and Infos in the log, but no errors or warnings.  Is this the correct setting for logging to a file:

<LogLocation Name="FileExtension" Active="True" LogLevel="All" />

 I have also tried repairing the installation, but that didn't seem to help.

Yes that looks like the correct setting.  Would it be possible to attach this host generated log file to this thread for review?

I have attached the file.


So I did a reboot after changing the Config file and the log file that was generated on the machine bootup has an error message in it that is similar to the one I was seeing in the console mode.

What else is running on this machine?  I think the error in the log points to a bind failure where we were unable to start listening on port 5252 because something else already was.

 Run this command on the server and see what it looks like

netstat -a

you can also just pipe it to a log file for easier reading

netstat -a>C:



 Thanks for the reply.  There is nothing in the netstat output that indicates something is running on 5252.

Ugh. I just saw a windows firewall message on the server.  I disabled the Windows Firewall (which I had sworn I had done previously) and I think it has gotten past the bind error.  I am still seeing error messages with my smart objects, however, since my dev. license expired today, I probably will not get to work on this until I can get a new license key.

So the original message is resolved for connecting to 5252.  What are the errors on smartobjects?

So I changed the port that the host server was running on and that seemed to help my problem on the workspace page, however, after I create a Smart object in VS2005,  I get an error stating  "Cannot connect to the Host Server.  Please make sure the hostserver is running and that you can connect to it.

 Invalid Packet Header Received!!!!"

 This error is on the design page of SmartObject1.sodx.


IN VS 2005 you will need to change the port that it uses to connect to the server. see screenshot
Badge +3

Did you really solve your problem dealing with port 5252 by changing the K2HostServer listening port? (which is 5555) I would have guessed you changed the K2Server port instead. But Blackpearl keeps on surprising me :-)

Thanks Chris that seemed to fix my SmartObject error.

 Nicolas:  I changed both the Host Service Port and the Workflow Service Port in the configuration manager. 

Please have a look in the environment library and confirm that the connection settings are configured correctly with server and port names. By default the Workflow server run on port 5252 and host server (including SO Service) run on 5555. My best guess would be that the SmartObject server connection string is incorrect.

I have face this issue as well, after I upgraded to SP1. Any one have idea to resolve it?

You mentioned a couple of posts back that your license had expired.  Have you recieved and applied a new one yet?

I have face this issue as well, after I upgraded to SP1. Any one have idea to resolve it?


 What error message are you seeing?



 I'm getting exactly the same error while trying to deploy my workflow on the K2 BP server. I triggered a simple netstat -a and the 5252 port doesn't seem to be bound to any process...

My license key expired last night (development purposes) and I had to reconfigure/reboot the server to update the license key and now after installing the process, I'm able to get the management console within the workspace (port 5555) but unable to connect to the 5252.


PS : I just tried to replace strictly all "5252"  occurences by "5555" in all connection strings (workflow server, so server, etc.) workflow management server, etc... In production AND developpment environments... but it still says it can't connect to the 5252 port while deploying... Any idea ?

Thanks in advance if you have any idea.


Badge +3
The answer is probably "no" but it's worth asking: Do you have 2003 installed on the same machine?