Unable to start octopus service - Error 193

Hi, I am trying to start octopus server and getting error Error 193: 0xc1.
Server is trying to start under Local System account. OS: Win7 x64.
What is interesting is that if i try to just run Octopus.Server.exe from commandline it works fine.

Could you please help me?

Stack trace from EventViewer:
2013-03-21 09:01:08,594 [1] ERROR Octopus [(null)] - System.InvalidOperationException: Cannot start service Octopus on computer ‘.’. —> System.ComponentModel.Win32Exception: 2013-03-21 09:01:08,594 [1] ERROR Octopus [(null)] - System.InvalidOperationException: Cannot start service Octopus on computer ‘.’. —> System.ComponentModel.Win32Exception: 2013-03-21 09:01:08,594 [1] ERROR Octopus [(null)] - System.InvalidOperationException: Cannot start service Octopus on computer ‘.’. —> System.ComponentModel.Win32Exception: 2013-03-21 09:01:08,594 [1] ERROR Octopus [(null)] - System.InvalidOperationException: Cannot start service Octopus on computer ‘.’. —> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application
— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.Start(String[] args)
at Octopus.Shared.Startup.ServiceInstaller.StartService(String name) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 562
at Octopus.Shared.Startup.ServiceInstaller.InstallAndStart(ServiceOptions options) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 85
at Octopus.Shared.Startup.CommandProcessor.Process(String[] args) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\CommandProcessor.cs:line 40
is not a valid Win32 application
— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.Start(String[] args)
at Octopus.Shared.Startup.ServiceInstaller.StartService(String name) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 562
at Octopus.Shared.Startup.ServiceInstaller.InstallAndStart(ServiceOptions options) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 85
at Octopus.Shared.Startup.CommandProcessor.Process(String[] args) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\CommandProcessor.cs:line 40
is not a valid Win32 application
— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.Start(String[] args)
at Octopus.Shared.Startup.ServiceInstaller.StartService(String name) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 562
at Octopus.Shared.Startup.ServiceInstaller.InstallAndStart(ServiceOptions options) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 85
at Octopus.Shared.Startup.CommandProcessor.Process(String[] args) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\CommandProcessor.cs:line 40
is not a valid Win32 application
— End of inner exception stack trace —
at System.ServiceProcess.ServiceController.Start(String[] args)
at Octopus.Shared.Startup.ServiceInstaller.StartService(String name) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 562
at Octopus.Shared.Startup.ServiceInstaller.InstallAndStart(ServiceOptions options) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\ServiceInstaller.cs:line 85
at Octopus.Shared.Startup.CommandProcessor.Process(String[] args) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Startup\CommandProcessor.cs:line 40

Hi Pavel,

Can you send me a screenshot of the properties dialog when you right-click on the Octopus service in services.msc?

Paul

Hi Paul,

See in attachment,

Please let me know if you need anything more.

Hi Pavel,

I don’t see any attachment - you may need to upload it at http://help.octopusdeploy.com/discussions/problems/6132-unable-to-start-octopus-service-error-193

Paul

Hi Paul, See in attachment. sorry

OctopusProperties.png

Hi Pavel,

What happens when you press start on that dialog? Are any other errors logged to the Windows event viewer?

Paul

Hi Paul,

I see another error in System Event Log:
The Octopus service failed to start due to the following error:
Octopus is not a valid Win32 application.

I read about this error and found that it may happen because i have x64 system.

Thanks,
Pavel

Hi Pavel,

Octopus is compiled as an Any CPU application, so the server will run on both x86 and x64 machines, and we test it this way.

Is there something on your system that could perhaps be forcing it to run under a certain mode? Some kind of group policy or virus scanner, or someone experimenting with corflags?

Could you run:

corflags octopus.server.exe 

From the directory Octopus is installed to and send me a copy of the output?

Could you also try uninstalling and reinstalling Octopus using a custom folder instead of C:\Program Files? E.g., C:\Octopus\App?

Paul

Hi Paul

Installing in custom folder solved problem.
Anyway - see results of corflags:
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 0x9
ILONLY : 1
32BITREQ : 0
32BITPREF : 0
Signed : 1

About group polity i am not sure - i can install custom created windows services from Program Files folder.
About antivirus - we are using Symantec, but it does not warn me.

Please let me know if you need any more details.

Thanks,
Pavel