Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails when using AD Authentication #193

Closed
brianfeucht opened this issue Nov 18, 2013 · 14 comments
Closed

Installation fails when using AD Authentication #193

brianfeucht opened this issue Nov 18, 2013 · 14 comments
Labels
kind/bug This issue represents a verified problem we are committed to solving
Milestone

Comments

@brianfeucht
Copy link

When running the installer using AD authentication, it fails with the following error. I removed my AD information from the log.

Creating empty configuration file: E:\OctopusBeta\OctopusServer\OctopusServer.config
Saving instance: OctopusServer
Home directory set to: E:\OctopusBeta
Generating a new Master Key for this Octopus Server...
Master Key saved; use the Octopus Administration tool to back the key up.
Storage mode set to: Embedded
Allow checking for upgrades: True
Include usage statistics: True
Web authentication mode: Domain
Web force SSL: False
Web listen prefixes: http://localhost:8456/
Service stopped
You can browse the RavenDB server at: http://localhost:10930/
Creating default Octopus Server certificate
Creating default Windows Azure certificate
Creating default upgrade availability
Creating built-in role Project viewer
Creating built-in role Project contributor
Creating built-in role Project lead
Creating built-in role Project deployer
Creating built-in role Project initiator
Creating built-in role Environment viewer
Creating built-in role Environment manager
Creating built-in role System administrator
Creating default team Octopus Administrators
Creating default team Everyone
Creating default retention policy
Creating default backup configuration
Creating default SMTP configuration

Creating default project group

A fatal exception occurred
System.IO.FileNotFoundException: Could not load file or assembly 'Octopus.Shared.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
File name: 'Octopus.Shared.XmlSerializers'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
at System.DirectoryServices.AccountManagement.UnsafeNativeMethods.IADsPathname.Retrieve(Int32 lnFormatType)
at System.DirectoryServices.AccountManagement.ADStoreCtx.LoadDomainInfo()
at System.DirectoryServices.AccountManagement.ADStoreCtx.get_DnsDomainName()
at System.DirectoryServices.AccountManagement.ADStoreCtx.GetAsPrincipal(Object storeObject, Object discriminant)
at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory)
at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRef(Type principalType, String urnScheme, String urnValue, DateTime referenceDate)
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue) at Octopus.Server.Commands.AdminCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Commands\AdminCommand.cs:line 69 at Octopus.Shared.Startup.ConsoleHost.Run(Action1 start, Action shutdown) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36

=== Pre-bind state information ===
LOG: User = domain\XXXXX
LOG: DisplayName = Octopus.Shared.XmlSerializers
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Octopus.Shared.XmlSerializers | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/Octopus/Server/
LOG: DEVPATH = C:\ProgramData\Red Gate.NET Reflector\DevPath
LOG: Initial PrivatePath = NULL

Calling assembly : System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Octopus\Server\Octopus.Server.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Octopus/Server/Octopus.Shared.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Octopus/Server/Octopus.Shared.XmlSerializers/Octopus.Shared.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Octopus/Server/Octopus.Shared.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Octopus/Server/Octopus.Shared.XmlSerializers/Octopus.Shared.XmlSerializers.EXE.


Error: The previous command returned a non-zero exit code of: 100
Error: The command that failed was: "C:\Program Files (x86)\Octopus\Server\Octopus.Server.exe" admin --instance "OctopusServer" --username "XXXXX" --wait 5000

@brianfeucht
Copy link
Author

I was able to change authentication to web authentication and complete the install.

@nblumhardt
Copy link
Contributor

Thanks for the report.

@willfalconer
Copy link

I had the same issue during installation as well (details are the same as above). AD integration is an important feature for us, so I would like to "vote" for this issue.

@PaulStovell
Copy link
Member

To help resolve this, can you share:

  • What version of Windows were you installing Octopus on?
  • Is .NET 4.5 installed or just .NET 4.0?
  • is Windows x86 or x64?

@PaulStovell
Copy link
Member

I think this might be related to:

http://support.microsoft.com/kb/2683913/en-us

@willfalconer
Copy link

My system is Windows 7, x64 and .net 4.5 is installed

@PaulStovell
Copy link
Member

Can you try applying that hotfix to see if it fixes the issue?

@nblumhardt
Copy link
Contributor

Paul, what do you think about adding a defensive try/catch, perhaps with code to reset LASTERROR, here?

@PaulStovell
Copy link
Member

I had a couple more reports about this issue via email, and they've all been resolved by installing that hotfix. Do you think resetting LASTERROR will work?

A try/catch that can throw a more friendly exception with "Please install this hotfix: http://support.microsoft.com/kb/2683913/en-us" might work. Or, in the Octopus Tools prerequisite checker, we could detect if it's an affected OS and then check if the hotfix is installed.

@nblumhardt
Copy link
Contributor

I've added code to detect the error and give a better message, linking to this issue and the hotfix.

Folks on the thread, thanks for all the info.-Please reopen this issue if you experience any issues after patching Windows.

@pregress
Copy link

The same exception is raised when you configure octopus server over command line to use Active directory.
Only when you do not specify a domain.

Does not work:

Octopus.Server.exe admin --username=YOURUSERNAME

Works:

Octopus.Server.exe admin --username=DOMAIN\YOURUSERNAME

@AwaNoodle
Copy link

I'm encountering the same issue. I've attempted a 2.6 -> 3.2 upgrade and have got the error:

2016-02-05 17:23:05.7057      1  INFO  Creating default Octopus Server certificate
2016-02-05 17:23:06.6264      1 ERROR  ===============================================================================
2016-02-05 17:23:06.6420      1 FATAL  Could not load file or assembly 'Octopus.Shared.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Octopus.Shared.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
File name: 'Octopus.Shared.XmlSerializers'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)

I've installed the hotfix which hasn't altered anything. The file it is looking for isn't part of the install package or the installed directory. Does anyone have any suggestions?

@michaelnoonan
Copy link
Contributor

Hi @AwaNoodle - I'd recommend getting in touch with our support team to get help with this issue. Hope that helps!

@lock
Copy link

lock bot commented Nov 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

7 participants