Problem modifying system using REST

Hi,

I'm having problems executing REST commands that modify the system (either change a parameter or pause a build). When sending a put command, I get an error
"Invoke-RestMethod : The request was aborted: The request was canceled" (using Powershell). Unfortunately, googling this error didn't give me much insight on what can be the reason, so I was wandering if someone here could point me to the right direction.
Thanks!
Zura

0
4 comments

Hi,

Have you tried to run REST API command from command line, using curl for example? Does it work?

0

Hi Alina,

I just tried curl and it did work... and I found out little bit more:
1. curl works locally as well as from another machine;
2. Powershell's invoke-restmethod works from another machine;
3. invoke-restmethod works if I run locally and use localhost;
4. invoke-restmethod doesn't work if I run locally using server's public url...

0

Hi,

Sorry for delay. Is this is still the case? How do you run Powershell commands, using TeamCity or not?
It looks like the problem is not related to TeamCity, but related to Powershell settings or to network configuration (probably proxy).

0

Hi Alina,

The problem is still there, changing public dns to localhost didn't really help. I understand the problem may be on my side but was so far unable to find the cause.
The process goes as follows:
I develop a script, try locally on the buildserver, once it works, I add to teamcity as a build step, try running couple builds, see that it does what I expect and leave it on happy. At some moment, I run the build (this is not a CI build so we run it manually not to often) and it fails...

0

Please sign in to leave a comment.