Moving octopus Server to new server

Hi team ,
Followed the exact instruction to move Existing octopus server to new server
-Exported the master key

  • Stopped the Octopus service
    Took backup of Octopus DB
    Restored it on new server
    Installed the exact version of Octopus 3.17.13
    Installation went through fine , but the octopus service is not getting started , getting the below exception
    "The device is not ready.
    Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor ‘Void .ctor(Octopus.Time.IClock, Nevermore.IRelationalStore, Octopus.Core.Model.Logging.ILogEncoder, Octopus.Shared.Util.IOctopusFileSystem, Octopus.Shared.Util.IMachineWideMutex, Octopus.Server.Orchestration.Logging.IServerLogService)’ on type ‘ServerLogStorage’. —> The device is not ready.
    (See inner exception for details.) —> System.IO.IOException: The device is not ready.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
    at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
    at Octopus.Shared.Util.OctopusPhysicalFileSystem.EnsureDirectoryExists(String directoryPath)
    at lambda_method(Closure , Object[] )
    at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
    — End of inner exception stack trace —
    at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
    at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
    at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
    at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.b__4()
    at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
    at Octopus.Server.OctopusServerEngine.Start()
    at Octopus.Server.Commands.RunCommand.Start()
    at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
    at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.b__0()
    at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
    2020-02-07 12:44:10.5992 776 7 FATAL Unhandled AppDomain exception occurred: An exception was thrown while invoking the constructor ‘Void .ctor(Octopus.Time.IClock, Nevermore.IRelationalStore, Octopus.Core.Model.Logging.ILogEncoder, Octopus.Shared.Util.IOctopusFileSystem, Octopus.Shared.Util.IMachineWideMutex, Octopus.Server.Orchestration.Logging.IServerLogService)’ on type ‘ServerLogStorage’. —> The device is not ready.
    (See inner exception for details.)
    Autofac.Core.DependencyResolutionException
    at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
    at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
    at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
    at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.b__4()
    at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
    at Octopus.Server.OctopusServerEngine.Start()
    at Octopus.Server.Commands.RunCommand.Start()
    at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
    at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.b__0()
    at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

–Inner Exception–
The device is not ready.

System.IO.IOException
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.EnsureDirectoryExists(String directoryPath)
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor ‘Void .ctor(Octopus.Time.IClock, Nevermore.IRelationalStore, Octopus.Core.Model.Logging.ILogEncoder, Octopus.Shared.Util.IOctopusFileSystem, Octopus.Shared.Util.IMachineWideMutex, Octopus.Server.Orchestration.Logging.IServerLogService)’ on type ‘ServerLogStorage’. —> The device is not ready.
(See inner exception for details.) —> System.IO.IOException: The device is not ready.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.EnsureDirectoryExists(String directoryPath)
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
— End of inner exception stack trace —
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass51.<>c__DisplayClass7.b__4()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Octopus.Server.OctopusServerEngine.Start()
at Octopus.Server.Commands.RunCommand.Start()
at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.b__0()
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
"
Am able to access the log file folder from the octopus manager path

Note: Unfortunately the existing server will be gone by monday due to other reasons so need to get this new server up and running before that , any support will be highly appreciated

Hi @vettrikumaran.v,

Thanks for getting in touch! I’m sorry to hear you’ve hit this issue during your Octopus migration! We’ve had an email come through which looks like it’s probably the same issue (same version, process, etc.) which has been resolved by matching the drive name and location between the two servers. Can you confirm if that’s the case, and if you’re up and running as needed? :slight_smile:

Best regards,

Kenny

Hi Kenny,

  Matching the Drive name helped us to resolve the issue but unfortunately it dint work when the DB is on different server, So we need to move the DB to the same server where Octopus Client got installed , As of now we managed to make it work on the same server but not when it is on distributed environment, All good as of now , Thanks for your time 

Regards,
Vettri

Hi Vettri,

Thanks for following up and letting me know! Great to hear all is good for now. If you’re wanting to move your DB onto a different server in the future, the following doc page might be helpful when needed. :slight_smile:

Don’t hesitate to reach out if we can assist with anything else moving forward!

Best regards,

Kenny