Couldn t connect to host

Добрый день, коллеги!

Возникла следующая проблема. Пытаемся получить маркеры доступа oauth с помощью curl по https. На нашем сервере — всё отлично. У заказчика же возникает проблема — curl ничего не возвращает. Вот пример кода:

В логе curlLog.txt отображается следующее:

  • About to connect() to esia-portal1.test.gosuslugi.ru port 443 (#0)
  • Trying 213.59.255.177. * Connection refused
  • couldn’t connect to host
  • Closing connection #0

Судя по phpinfo и на нашем сервере и на сервере заказчика — всё совершенно одинаковое. За исключением одного компонента в составе curl.

У нас SSL Version — NSS/3.15.3 и всё работает.
У заказчика SSL Version — NSS/3.14.0.0
на обоих серверах php 5.5.0beta2
Работает это всё под nginx.

Может ли это быть из-за NSS? И да — заказчик сказал, что прокси нет, и ничто не не должно блокировать доступ.

Так же выяснилось, что если из терминала вызывать

Добрый день! Установил lavarel-prerender на сайт, но сыпятся такие ошибки:

Скрин: joxi.ru/xAeBzLSpXjNMry
Кто может подсказать в чём проблема?

  • Вопрос задан более двух лет назад
  • 8768 просмотров

Ваш хост
1)забанили
2) у вас криво настроен firewall
3) с хоста запрещены исходяшие соединения.

Join the community to find out what other Atlassian users are discussing, debating and creating.

  • Community
  • Products
  • Jira
  • Questions
  • curl: (7) couldn’t connect to host

We use JIRA OnDemand. We are trying to access JIRA rest APi to add a comment.
When we run following Curl command from our Linux Machine

We get Error "Couldn’t resolve host ‘sungardvaldi.atlassian.net’

So we tried using JavaScript to do this

var xmlHttpReq = false;
var self = this;
self.xmlHttpReq = new XMLHttpRequest();
self.xmlHttpReq.open("POST", "https://sungardvaldi.atlassian.net/rest/api/2/issue/ /comment", true);
self.xmlHttpReq.setRequestHeader("Content-Type", "application/json");
self.xmlHttpReq.setRequestHeader("Authorization", "Basic " + Base64.encode( + ":" +

Читайте также:  Antutu benchmark как пользоваться

When We run this script, we get error "Failed to load resource: the server responded with a status of 400 (Bad Request)"

Can anyone please assist, what are we doing wrong here and how can we achieve this?

Should we get IP and host of our JIRA from our Administrator and try the Curl again?

6 answers

1 accepted

Please, find bellow a tested implementation to post a comment to an issue (http://example.com:8080/jira/rest/api/2/issue//comment [GET, POST]) in JIRA Cloud:

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.

Thank you for your question.

Could you please run the following from Linux box and attach its response:

The following command r eturns general information about the current JIRA server. Please, refer to http://example.com:8080/jira/rest/api/2/serverInfo [GET] for further information.

Kind regards,
Rafael P. Sperafico
Atlassian Support

You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.

I cant ping or telnet ‘ sungardvaldi.atlassian.net’ from Linux mahine as well as from Windows Desktop.

Please see the result below.

C:Program Files (x86)GoogleChromeApplication>ping sungardvaldi.atlassian.net

Pinging sungardvaldi.atlassian.net [165.254.226.66] with 32 bytes of data:
Request timed out.
Request timed out.

C:Program Files (x86)GoogleChromeApplication>telnet sungardvaldi.atlassian.n
et 443
Connecting To sungardvaldi.atlassian.net. Could not open connection to the host
, on port 443: Connect failed

Читайте также:  Самый популярный недорогой смартфон 2018 года

However, we can directly access the link through browser "https://sungardvaldi.atlassian.net"

You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.

We also executed the given Curl command to get ServerInfo
curl -D- -u [USERNAME] -p -H "Content-Type: application/json" -X GET https: //[DOMAIN].atlassian.net/rest/api/2/serverInfo

Although, this curl also resulted into "Couldn’t connect to host" but the link opened on browser.

But ServerInfo didn’t give us IP/Port, it just gives the base Url "baseUrl":"https://sungardvaldi.atlassian.net".

Can you please also suggest why the below JavaScript results into "400: Bad Request" and how can we fix it.

We assume that since the link can be opened on browser, HTTP post through JavaScript should work.