Reputation: 241
I am using CURL command in jenkins for retrieving "status code" of an ip. I did the following command in terminal and it is working properly.
curl -i ip_address:port
Output of terminal
HTTP/1.1 200 OK
But in the case of jenkins,
I added the above command inside "Execute shell" It is the giving error with the following output.
curl -i ip_address:port
% Total % Received % Xferd AverageDload Speed Upload TimeTotal
0 0 0 0 0 --:--:--
TimeSpent TimeLeft CurrentSpeed
--:--:-- --:--:-- --:--:--
curl:
Failed to connect to ip_address port : Connection refused
Can anyone suggest a solution for the same?
Upvotes: 0
Views: 2055
Reputation: 1869
This isn't really a Jenkins question/answer but try this:
curl -i -s IP:port/path
Upvotes: 0