Offline Deployment Failing To Find Variables File

I have successfully create an offline environment project etc for a multi tenant scenario.

When I click one of the Tenants it creates the package successfully, but another Tenant fails…with the error:

Could not find a part of the path ‘d:\Octopus\Work\Machines-161-ServerTasks-15729\local\na-uk-integration\4.1.0.32\Variables\local.na-uk-integration.Deploy Tenant-Specific .ExternalLists to DatabaseServer, AppServer and ScheduledTaskServer.variables.secret’.

If I look in the Octopus Server Work folder - the file is not there…but the very same release for the same Tenant deploys to the server - it just seems to have an issue generating the offline package.

At a loss as to what to do next to troubleshoot it.

I have rebooted the server, reindexed the packages…what else?

Hi Stuart,

Thanks for getting in touch! That definitely looks like some strange behavior. From my understanding, this variables.secret file name is built with OfflineTargetName.ProjectName.StepName.variables.secret, so I can’t see why the tenant name could cause this issue. I’ve tested this using the same names as shown in your secret file and it works just fine on my end.

Could you let me know which version of Octopus you’re running, and what both of these (working and not working) tenant names are? That should help me in reproducing this behavior. :slight_smile:

I look forward ot hearing back and getting to the bottom of this one!

Best regards,

Kenny

After much experimenting (including rebooting the server, disconnecting Deployment Target and Projects and reconnecting etc…I finally got to the bottom of this myself.

It boils down to a ‘path too long’, except it looks like the exception is swallowed and thus the first time you become aware there was an issue is when it tries to read the file back in.

This is a bit worrying as there could be many other files missing that I am unaware off - so it would be much better if the Deploy to a Offline DeploymentTarget could error when a file fails to be written.

To explain the problem in more detail though…the length of the path for the variables.secret file that was missing was 263 characters and this looks like it was 3 characters too long. The file name is broadly based on the Step name of a Deploy step and this happened to be quite a long name…equally if the path to where Octopus/Application folder is located was deep this could have caused it too.

I renamed the Step to have a slightly shorter name and bingo it worked.

So - my issue if resolved to a point, but I would like to request that if it fails to write a file then this causes an error, else I may be deploying an incomplete fileset.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.