We are experiencing a recurring problem with logging in to Octopus deploy.
We are using Active Directory authentication. Most of the time it works fine, but intermittently (once a week perhaps) the login fails with the message:
The server could not be contacted.
Restarting the Octopus service does not resolve the problem, however restarting the server does.
The OctopusServer.txt log file contains the following:
2016-09-08 06:50:13.9784 103 WARN An exception was thrown while trying to establish a principal for the current request
System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. —> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.
at System.DirectoryServices.Protocols.LdapConnection.Connect()
at System.DirectoryServices.Protocols.LdapConnection.SendRequestHelper(DirectoryRequest request, Int32& messageID)
at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)
at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)
— End of inner exception stack trace —
at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)
at System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval()
at System.DirectoryServices.AccountManagement.PrincipalContext…ctor(ContextType contextType, String name, String container, ContextOptions options, String userName, String password)
at System.DirectoryServices.AccountManagement.PrincipalContext…ctor(ContextType contextType, String name, String container)
at Octopus.Server.Web.Infrastructure.Authentication.ActiveDirectoryMembership.GetOrCreateUser(String username, Boolean& wasCreated) in Y:\work\refs\tags\3.3.17\source\Octopus.Server\Web\Infrastructure\Authentication\ActiveDirectoryMembership.cs:line 232
at Octopus.Server.Web.Infrastructure.Authentication.ActiveDirectoryMembership.GetOrCreateUser(String username) in Y:\work\refs\tags\3.3.17\source\Octopus.Server\Web\Infrastructure\Authentication\ActiveDirectoryMembership.cs:line 222
at Octopus.Server.Web.Infrastructure.Authentication.OctopusPrincipalEstablisher.GetPresentedUserIdentity(NancyContext context) in Y:\work\refs\tags\3.3.17\source\Octopus.Server\Web\Infrastructure\Authentication\OctopusPrincipalEstablisher.cs:line 97
at Octopus.Server.Web.Infrastructure.Authentication.OctopusPrincipalEstablisher.EstablishPrincipalForRequest(NancyContext context) in Y:\work\refs\tags\3.3.17\source\Octopus.Server\Web\Infrastructure\Authentication\OctopusPrincipalEstablisher.cs:line 43
I understand that this is likely not an issue with Octopus specifically, but any troubleshooting advice would be greatly appreciated.
Thanks!
Alan