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

AppVeyor Host Agent -- Error 26403. Failed to add user to group #3771

Open
marcingminski opened this issue Jan 9, 2022 · 9 comments
Open

Comments

@marcingminski
Copy link

When installing the host agent on Windows Server 2019 I get the following:

 PS C:\Users\localadmin> Connect-AppVeyorToComputer -AppVeyorUrl https://ci.appveyor.com -ApiToken xxx

Checking AppVeyor API access...
Configuring 'Process' build cloud in AppVeyor
AppVeyor cloud 'appveyor' already exists.
Reading Host Agent authorization token from the existing cloud.

Ensure build worker image is available for AppVeyor projects
AppVeyor build worker image 'Windows' already exists.

Installing AppVeyor Host Agent
OS: Windows
Downloading appveyor-host-agent.msi...
Installing Host Agent...
Something went wrong and Host Agent was not installed
Connect-AppVeyorToComputer : Error installing Host Agent
At line:1 char:1
+ Connect-AppVeyorToComputer -AppVeyorUrl https://ci.appveyor.com -ApiT ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Connect-AppVeyorToComputer 

and in the Windows EventLog I can see:

Product: AppVeyor Host Agent -- Error 26403. Failed to add user to group.  (-2147023509   appveyor   Administrators   )

I am running it under a local admin account.

@FeodorFitsner
Copy link
Member

Make sure "appveyor" user does not exist and try again.

@marcingminski
Copy link
Author

Hi, I have checked before and no, it did not exist and still does not exist but the error remains:
image

@FeodorFitsner
Copy link
Member

Is it localized version of Windows? Is the server part of domain? Where is it hosted?

It also could be an issue if the name of that server is appveyor (most probably).

You can try installing Host Agent manually with different user account and log enabled:

Download Host Agent from here and run:

msiexec /i appveyor-host-agent-7.0.3134-win-x64.msi /quiet /qn /norestart /log %USERPROFILE%\appveyor-install.log APPVEYOR_USER_NAME={username} APPVEYOR_USER_PASSWORD={password}

@marcingminski
Copy link
Author

Hi, renaming the server solved the issue and the agent installed successfully. Thank you for your help. Perhaps a future feature would be to have a check in the PS script to validate machine name?

@marcingminski
Copy link
Author

Looks like every time I restart the VM, the service fails to start due to logon failure. I am having to change the password with every restart. The account is set too never expire, and user cannot change the password:
image
Any idea?

@marcingminski
Copy link
Author

Thank you but that's not it. I noticed that the appveyor account gets locked out and I can't even login via RDP. I wonder if this is somehow caused by renaming the server to solve the previous problem. The event log isnt much helpful. I will rebuild the VM from scratch using a different name. Thank you for your time.

@FeodorFitsner
Copy link
Member

Try using a different account - it's doesn't make any difference what account is used for Host Agent service. It just needs to have enough permissions.

@marcingminski
Copy link
Author

Hi, didn't work, the new user is getting locked out too and the service does not start. I have rebuilt the VM with a correct name to start with and everything is OK now. Thank you kindly for your help and guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants