Multiple Instances

I have tried a number of combos of bindings and ports but I keep getting this message when trying to start the second instance of the server.
if I stop the other instance each will start on its own fine but if one is running this is the error the second gives.
any ideas?
2015-09-01 20:35:30.4870 6 FATAL Unhandled AppDomain exception occurred: A required communications port is already in use. See:
System.Exception: A required communications port is already in use. See: —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at Halibut.Transport.SecureListener.Start() in y:\work\7ab39c94136bc5c6\source\Halibut\Transport\SecureListener.cs:line 43
at Octopus.Server.Communications.PollingEndpointDistributor.Start() in y:\work\refs\heads\master\source\Octopus.Server\Communications\PollingEndpointDistributor.cs:line 31
at Octopus.Server.OctopusServerEngine.Start() in y:\work\refs\heads\master\source\Octopus.Server\OctopusServerEngine.cs:line 55
at Octopus.Server.Commands.RunCommand.Start() in y:\work\refs\heads\master\source\Octopus.Server\Commands\RunCommand.cs:line 33
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass2.b__0() in y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceHost.cs:line 21
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 44
— End of inner exception stack trace —
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 53
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)


Thanks for reaching out. Could you please check the server.config file on the home directory of each Octopus instance (see screenshot)? Their content should be similar to this:

<?xml version="1.0" encoding="utf-8"?>
<octopus-settings xmlns:xsd="" xmlns:xsi="">
  <set key="Octopus.Communications.ServicesPort">10943</set>
  <set key="Octopus.Home">C:\Octopus</set>
  <set key="Octopus.Server.NodeName">DALMIROPC</set>
  <set key="Octopus.Storage.ExternalDatabaseConnectionString">Data Source=DalmiroPC\DalmiroPC;Initial Catalog=Octopus3;Integrated Security=True</set>
  <set key="Octopus.Storage.MasterKey">somekey</set>
  <set key="Octopus.Tasks.MaxConcurrentTasks">1</set>
  <set key="Octopus.Upgrades.AllowChecking">true</set>
  <set key="Octopus.Upgrades.IncludeStatistics">true</set>
  <set key="Octopus.WebPortal.AuthenticationMode">0</set>
  <set key="Octopus.WebPortal.ForceSsl">false</set>
  <set key="Octopus.WebPortal.ListenPrefixes">http://localhost:80/</set>

Please verify if “Octopus.Communications.ServicesPort” is different in each instance. By the looks of that error, their value must be identical. If they are identical, change one of them to something else and try to start the services again. If they were different already, please let me know.



Ok…so the default config doesn’t have the listening port config entry…

That sound right?

<?xml version="1.0" encoding="utf-8"?>



The 2 instances you are trying to run are both 2.x, both 3.0 or a combination of both?

Try manually adding the missing line with the appropriate port. Make sure that each config/instance has a different port.

<set key="Octopus.Communications.ServicesPort">10943</set>



Both are 3.0…the default one is an upgrade…I will add that line in to
the default one…

That did not work either…they are both running 3.0


Hi David,

Could you please clarify if both are the same version of 3.0, or if they are different versions that were installed on different directories?


They are both the same version of 3.0. One is an upgrade and I believe
that has something to do with it. Not that big a deal. I was able to test
this out on another server with fresh installs and you are correct as long
as that port is different then all is good. It was a proof of concepts and
isn’t truly needed now. If they decide they do want to have multiple
instances I will just backup and do a clean install of the octopus server