Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Linux Build Agent(Docker) on TeamCity, I am running into an issue, I have tests that I do API requests and I am not able to make requests to those endpoints when the build is running on TeamCity.

Locally using 'IPAddress.Loopback' will get 127.0.0.1, for the port I have a utility class that returns a free address.

var _localHost = "http://127.0.0.1:44393";
RestClient client = new RestClient(new RestClientOptions(_localHost)
	{ Authenticator = new HttpBasicAuthenticator("ApiUser", "pwd") });
RestRequest request = new RestRequest("/ClientConfiguration/enabledcleints/2");


What I have tried:

As I know that IPAddress.Loopback would not work on the agent I have tried with the following

- IpAddress of the build Agent
- 172.26.0.1 (this I read somewhere is default for docker)
- 172.17.0.2 (same for this)
Posted

1 solution

This sounds like a JetBrains TeamCity specific issue. Try searching, then asking in their support forums: https://teamcity-support.jetbrains.com/hc/en-us[^]. For example: Agent on Ubuntu binding to loopback[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900