Error deploying a Windows Service

Hello! We are excited about the potential of Octopus Deploy to resolve our deployment problems. Our first deployment (of a Windows Service) is failing and the error is a little strange.

Essentially, the log is indicating that it can’t find the executable. When I look on the server, it is looking for C:\Octopus\Applications\SkyWeb 10\InvoiceEmailPDFConverter\1.0.9\InvoiceEmailPDFConverter.exe
but the file is located in:
C:\Octopus\Applications\SkyWeb 10\InvoiceEmailPDFConverter\1.0.9\lib\net45\InvoiceEmailPDFConverter.exe

Could the space in “SkyWeb 10” be related? I notice that the log line breaks on the space…

log.txt (9 KB)

Hi,

Thanks for getting in touch! I’m having a look at what you have sent through, I can see that the the server is looking at a different location to the files:
C:\Octopus\Applications\SkyWeb 10\InvoiceEmailPDFConverter\1.0.9\InvoiceEmailPDFConverter.exe
C:\Octopus\Applications\SkyWeb 10\InvoiceEmailPDFConverter\1.0.9`lib\net45`InvoiceEmailPDFConverter.exe

The space in SkyWeb 10 wouldn’t cause any issues here but if the server is looking for the executable that is in a different directory (\lib\net45\) then it will not find it.
Something you could try here is ensuring that the Executable path is set correctly in the process page under Windows Service: Executable. After that you can attempt a redeploy.

Let me know if this helps.

Regards,
Daniel

Hello Daniel!

I also noticed that, and I tried updating the executable path to “lib\net45\InvoiceEmailPDFConverter.exe” but the error message was identical – it was as if that parameter/setting wasn’t being utilized at all. This morning I tried it again with a backslash in front “\lib\net45\InvoiceEmailPDFConverter.exe” just in case (even though the example on the page doesn’t have that) and it also failed with the same error message. I have even tried recreating the step with the alternate executable path, but I still get the same error message.

Craig

Hi Craig,

Would you be able to create a new release then attach the deployment logs for that release?
Here is a link to the documentation on getting the deployment logs: http://docs.octopus.com/display/OD/Get+the+raw+output+from+a+task
Hopefully we can find our answer in there.

Looking forward to hearing from you.

Regards,
Daniel

Hello Daniel!

Interestingly, I did that and it worked – it failed at a later step, but that failure is something I’m dealing with now. It seems like the solution to the error was to add that path, but the configuration change was not being applied to the currently release. I expect you might want to investigate that, but it’s not holding me up anymore. :slight_smile:

I did not realize that the NuGet package built by TeamCity would not include all the referenced .DLLs, etc, so now I am investigating having it build a zip and post it to Octopus Deploy. I’m a little bummed that the extra effort is required, but c’est la vie – it’s better than the crappy custom code that I’m replacing. :slight_smile:

Craig

Hi Craig,

Great! I’m glad you got it working. The reason you needed to do a redeploy was due to how the snapshots work (https://octopus.com/blog/releases-and-snapshots)
Here is a little snippet from that link:


A copy of all of the variables
A copy of all of the steps (NuGet package ID's and versions)```

This pretty much means that any changes that you will be making to these things will require a redeploy to take action.

Hope this helps to understand why this happened :)

Regards,
Daniel