System.DirectoryServices.AccountManagement is not supported on this platform

Hi,

we are testing a dry run migration from our Windows on-premise to Docker container.

What we did so far:
1 - we set up a new docker Octopus instance with the same version as our on-premise Octopus instance has
2 - we backup the on-premise SQL database
3 - we restored the on-premise database into a different SQL server and pointed docker Octopus into that DB ( plus we created an SQL user and give him access to the SQL server - so new Docker Octopus can fully use DB)

And now the fun part begins - The old Windows instance uses NTLM authentication, thus our Docker instance fails with the error:

System.DirectoryServices.AccountManagement is not supported on this platform.
System.PlatformNotSupportedException
at System.DirectoryServices.AccountManagement.PrincipalContext…ctor(ContextType contextType, String name, String container)
at Octopus.Server.Extensibility.Authentication.DirectoryServices.DirectoryServices.DirectoryServicesContextProvider.GetContext(String domain)
at Octopus.Server.Extensibility.Authentication.DirectoryServices.DirectoryServices.UserMatcher.Match(String name, CancellationToken cancellationToken)
at Octopus.Server.Commands.AdminCommand.<>c__DisplayClass24_0.b__1(ICanMatchExternalUser x) in AdminCommand.cs:line 245
at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Func2 predicate, Boolean& found) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at Octopus.Server.Commands.AdminCommand.AddAdminUser(IRawWriteQueryExecutor transaction, Mode mode, CancellationToken cancellationToken) in AdminCommand.cs:line 245 at Octopus.Server.Commands.AdminCommand.Start() in AdminCommand.cs:line 139 at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) at Octopus.Shared.Startup.ConsoleHost.Run(Action1 start, Action shutdown)
at Octopus.Shared.Startup.OctopusProgram.RunHost(ICommandHost host)
at Octopus.Shared.Startup.OctopusProgram.Run()

Terminating process with exit code 100
Full error details are available in the log files at:
/root/.octopus/OctopusServer/Server/Logs
Octopus/Logs
If you need help, please send these log files to Help & Support - Octopus Deploy

And my question is:
Is there a possibility to switch NTLM off somewhere in the Database so the Docker instance will use only username&password authentication?

And you can close that ticket!

The problem was fixed by restarting POD and inserting a command before POD went into the crash loop:

/Octopus.Server database --connectionString "$DB_CONNECTION_STRING" && ./Octopus.Server configure --activeDirectoryIsEnabled=false

Hey @TomasUnverdorben,

Thanks for reaching out on our community forum. I’m glad you were able to find the solution, and thank you for posting it. That will help anyone else with the same issue!

Please let us know if anything else comes up.

Best,
Brent

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