问题
I have an asp.net core website that I'd like to deploy to an on-prem IIS server using devops (VSTS) pipeline.
The build pipeline works fine but I've hit a problem when configuring the release pipeline.
Process followed:
- Create new Release Pipeline - selected "IIS website deployment" as the template
- On the "Deployment group job" blade there's a drop-down that requires selection of a "Deployment group".
- Clicked the cogs icon to the right of this drop-down and created a new deployment group called "Integration-Dev". My understanding is that the generated PowerShell script must be run on each target server within the deployment group?
- Created a PAT token with the required deployment group access
- Logged onto the on-prem IIS server that I want to release the website to (the member of the new deployment group).
- Ran the PowerShell script from the "Deploment groups" devops page in an Admin elevated Powershell session
- Prompted to enter the PAT token
- Hangs for many minutes
- Following error message presented: An error occurred while sending the request. Failed to connect.
I am able to browse to the devops site from the target server within a browser session (https://companydomain.visualstudio.com)
Have I understood correctly that the agent needs to be installed on each target server? Any ideas why it's failing to connect? I guess it's some corporate proxy / firewall issue but I don't know how to access any diags or logs. I would have thought access to .visualstudio.com over 443 would be good enough?
回答1:
I encountered the same issue. Vanilla Azure Windows 2019 VM with latest patches. Powershell script downloads the agent zip, extracts it, but then just hangs when running Config.cmd "connecting to the server" I left it for 30 min before cancelling.
After spending a couple of hours on this I eventually tried to just run Config.cmd via normal Command Prompt (As Admin)
That worked for me and it registered as a service correctly.
I suppose there may be some default system policy around powershell and connectivity.
Thanks, BruceVS
来源:https://stackoverflow.com/questions/56080646/azure-agent-listener-configure-hangs