I’ve using the Push Packages to Octopus task in Azure Devops for my .net build for some time now using a self hosted agent.
I’m looking to change the agent to an Azure Pipelines agent but when doing so I get the below error.
System.Exception: Unable to connect to the Octopus Deploy server. See the inner exception for details. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The remote name could not be resolved: ‘MyOctopusServer’
I do have an active service connection to Octopus that seemed to work fine when I was on the self hosted agent.
Can you confirm if your Octopus Server is publicly accessible? If it is and you are using hosted ADO, there may be a network issue between ADO and your Octopus Server causing ADO to not be able to resolve the DNS for your Octopus Server.
As a first troubleshooting step, I would suggest attempting a connection to your Octopus Server from a machine outside of your local network to see if that works.
Let me know what you find out at your earliest convenience.
I’ve never really looked into making my Octopus server publicly accessible since until now we’re always working within our network.
Is making it publicly accessible recommended and is there a way to give specific access to the ADO hosted agents?
There are certainly considerations to be taken here with risk when exposing your Octopus Server publicly. I would suggest having this discussion with your security team in order to determine the best path forward.
I will say that many of our customers choose to run locally hosted build servers in order to avoid exposing Octopus Server publicly.
If you have any additional questions or if there is anything else I can assist with, please let me know.