Tentacle.exe - can two instances exist and reference the same upload and install directories?

We’re trying to work out how to upgrade our tentacles to 1.0. While we work on migrating our Portal Beta to a Portal 1.0, we’d like for servers to have one tentacle service at a 1.0 RC, and a second one at Beta.

As an intermediate goal, we are trying to get into a state where both tentacles would be from beta releases. This is what we’re having trouble with.

In particular, based on how we configure the tentacle upload and install directories, it seems the 2nd instance sometimes defers to the 1st (including the 1st’s Tentacle.exe.config). That gives us an exception if the 1st is already running, as the 2nd is trying to re-register the 1st’s port.

My first service is in E:\Octopus\Tentacle\Agent and uses port 10933.
The one I’m trying to add is E:\OctopusBeta\Agent. I’ve modified E:\OctopusBeta\Agent\Tentacle.exe.config to have a different Services.PortNumber, and to have a Packages.UploadDirectory and Packages.InstallDirectory that points to the ones defined in E:\Octopus\Tentacle\Agent\Tentacle.exe.config

When I try to start E:\OctopusBeta\Agent\Tentacle.exe, this is what I see:


E:\OctopusBeta\Agent>Tentacle.exe

  • Tentacle

The Tentacle agent process does not appear to be running. Locating the latest Tentacle package.
Latest Tentacle determined to be at: E:\Octopus\Tentacle\Applications\Octopus.Tentacle.0.9.620.4\Tentacle.exe

and the exception I see :
System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://*:10933/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://*:10933/' because it conflicts with an existing registration on the machine. [...]

When I change the second service’s Tentacle.exe.config’s Packages.UploadDirectory and Packages.InstallDirectory to point to E:\OctopusBeta\Packages, E:\OctopusBeta\Applications, when I start E:\OctopusBeta\Agent\Tentacle.exe , this is what I see:


E:\OctopusBeta\Agent>Tentacle.exe

  • Tentacle

The Tentacle agent process does not appear to be running. Locating the latest Tentacle package.
Latest Tentacle determined to be at: E:\OctopusBeta\Agent\Tentacle.exe

... and no exception.

Why does it seem that my E:\OctopusBeta\Agent\Tentacle.exe finds a different Tentacle.exe, based on my upload and install directories?

Thanks for reading.
Lisa

Hi Lisa,

Tentacle isn’t really designed to run twice on the same machine. However (for the 0.9 release) you can:

  1. Modify the config file (to give it different install directories and different ports) as it sounds like you have done
  2. Call tentacle.exe with the -agent parameter

The -agent parameter is probably what is missing, as the first Tentacle instance will see that Tentacle is already running.

However, you won’t be able to run the tentacles (or at least the second instance) as a windows service.

I hope that helps,

Paul

Paul,

Thank you for answering my question so quickly! In particular, your second point (-agent) did the trick for me.

Thanks again for hosting this support forum.

Lisa