Sc.exe config failed with exit code: 1639

Hi,

I’ve got an issue suddenly with a deployment where (literally) nothing has changed apart from the server it’s being deployed onto might have a couple of tweaks. I’ve attached the logs of the last working deployment and a broken redeployment of the same release. I’ve had to change the names of things to be generic, but hopefully not messed around anywhere else!

It’s failing on the CONFIG command, but if I copy it from the logs and run it directly on the server…it works!

I’m wondering if there are any known issues specifically around Windows Management Framework 5.0 or PowerShell 5.0?

Found this when searching so might be related, but was closed a while ago as fixed in a very old version… http://help.octopusdeploy.com/discussions/problems/26770-scexe-create-failed-with-exit-code-1639

Running on Octopus 3.3.0 on both server and tentacle.

Help me Obi Wan Kenobi, you’re my only hope…

broken.log (7 KB)

working.log (7 KB)

Hi Matthew,

Thanks for getting in touch! I was able to reproduce your problem and I believe it is related to the fact that the binPath parameter contains spaces. When I remove them then the script succeeds with both PowerShell 4 and PowerShell 5.

Can you please try to run your deployment with a path that doesn’t contain any spaces and see whether it works with PowerShell 5.0? If it does then we already have a fix (https://github.com/OctopusDeploy/Issues/issues/2467) available so you can use paths with spaces. It was released as part of 3.3.9 release.

Please let me know if this doesn’t solve your problem.

Pawel

Hi Pawel,

Thanks that sounds like my exact problem so I’m going to just upgrade to the latest release and get it sorted :slight_smile:

Will come back when done and confirm it’s all working again.

Thanks.

Hi Pawel,

It’s working again after the upgrade to 3.3.17 thanks :slight_smile:

Hi Matthew,

I’m glad it worked.

If you have any other issues don’t hesitate to reach out.

Pawel