I am new to Octopus Deploy and I’m trying to set up my first deployment. I’ve spent a good amount of time reading through the documentation and getting everything in place. I’ve succesfully set up my Octopus server and tentacles, used OctoPack to send a new build to the NuGet repositiory on my Octopus server, set up my environments, a deployment process, a release with three steps (two email and a “Deploy Build”), and I’m even using a variable for CustomInstallationDirectory. Things are looking good!
However, whenever I try and do my first deployment I keep getting this warning:
“You must have at least one enabled healthy machine in the environment before deployment can proceed.”
I’ve checked many times now. The environment in queestion has 5 servers, all of which are green and 3 of which are in the appropriate role for the deploy build step of the deployment. In fact, all of the servers in all of the environments are green.
I just upgraded the server and the tentacles to 2.6.3.886 but I’m still getting the same error.
I just discovered this error for all of my tentacles in diagnostics:
2/27/2015 5:34:36 PM -05:00 [Error] Error posting to: https://*****:10933/mx/v1
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it *****:10933
at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
at Pipefish.Transport.SecureTcp.Client.SecureTcpClient.Send(SecureTcpRequest request, Action`1 response) in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\Client\SecureTcpClient.cs:line 54
at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.PerformExchange() in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 353
at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.Run() in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 187
I figured it out. I think that my installation variable did not have any roles applied to it when I orginally created it. I tried creating a new release and this gave me the updated variable to work with.
Hello,
I have exactly the same issue since I have upgraded to 2.6.3.886.
I have updated all my tentacles and all are green but still have the message "You must have at least one enabled healthy machine in the environment before deployment can proceed."
And I also have the following error:
Error posting to: https://127.0.0.1:10933/mx/v1
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:10933
at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
at Pipefish.Transport.SecureTcp.Client.SecureTcpClient.Send(SecureTcpRequest request, Action`1 response) in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\Client\SecureTcpClient.cs:line 54
at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.PerformExchange() in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 353
at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.Run() in y:\work\3cbe05672d69a231\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 187
No connection could be made because the target machine actively refused it
This means that Octopus opened a socket to connect to the Tentacle, but the host machine that Tentacle runs on (i.e., your application server) rejected the connection. This typically means that either a) Tentacle isn’t running, b) Tentacle isn’t listening on that port, or c) a firewall or something else blocked the connection before it got to Tentacle. This page has a troubleshooting guide to work out what the issue might be:
You must have at least one enabled healthy machine in the environment before deployment can proceed
If you click on the “Advanced” link on the deployment page, you’ll get a better idea of what the issue is. It could be related to the above - that is, even though the last health check succeeded, the machine appears to be offline to Octopus because of the errors above and so it will appear red on the deployment page.
Alternatively, as Jeremy found, it can happen because you have steps that target a specific role, but no machines in that role for this environment. This will mean the deployment has nothing to do.
I didn’t have experiment my first error anymore but the second one is still unresolved.
I have create a new project with a a new livecycle (see screenshot livecycle.png). This livecycle use one of my existing environment /machine : “Integration” (see screenshot Environments.png). The check health work on this environment. (see screenshot check-health.png)
I only have a single step who send an email (see screenshot Step.png) and no environments condition set on this step.
One thing I have notice when I try to deploy in advance mode is the fact that the machines dropdown is empty (see screenshot No-Machine.png)
Hey Ben,
I just came across the same issue. It appears that Octopus does not like releases that don’t really “do” anything so the error you’re getting is a little misleading.
You aren’t able to select any Machines from the dropdown because none of your steps specify a Role.
If you’re just trying to test the email step on it’s own I’d try adding a dummy step where you’re able to specify a Role (deploy a nuget package, run a powershell script etc.).
I ended up just making a step to run a powershell script that didn’t modify anything (e.g. cd C:) and in that step I was able to specify the role my machine is in. I then created a new release, my machine name showed up in the dropdown on the deploy screen, and I was able to deploy.
This worked short-term for me because I was just testing sending an email to multiple addresses and now I can integrate the step into a full process. If your entire process is just sending an email then you should consider incorporating it into another process.
Hi Benjamin, Isabella is correct - there’s a bug at the moment which prevents you from having standalone email or manual steps with nothing else in the deployment process. We’ll fix this as part of 3.0.
Hi Dalmiro Grañas, why the thread for @coolvipz is private? I’m seeing exact the same issue with TeamCity and Octopus 3.2.2. Can I know how to fix this issue? What in my process for the project is just a simple Power Shell script. Thanks.
Hi @Bigbearzhujun - That thread was set as private because @coolvipz shared some private info on it that was only meant to be seen by him and our staff.
The error message that @coolvipz had was There must be at least one enabled healthy machine to deploy to in the environment
Generally speaking that message means you tried to start a deployment for an environment that either doesn’t have any machines on it, or doesn’t have any healthy machines. Could this be the case?
If you want me to help you figuring this out, please send me screenshots of the following:
Your deployment process where all the steps can be seen
A screenshot of the Environment that you were trying to deploy to. Make sure all the machines that are on it can be seen.
I have figured it out. I thought the Octopus server can run the script by
it self. However, seems it needs the script to run on a tentacle. I just
added a localhost tentacle and everything is working fine now.
We added the ability to run scripts on the Octopus Server in 3.3. Once you upgrade to that version, you’ll see the option shown on the attached screenshot in your regular Script Step. You can totally run a deployment that only has a single step that runs on the Octopus server using this feature.