Page MenuHomePhabricator

Connection refused on HTTP post call to build.e.org from a different vm
Open, Incoming QueuePublic

Description

To trigger new builds on Jenkins when a patch gets uploaded for review, Phab needs to call a Jenkins URI which currently fails with connection refused.

curl -X POST "https://build.enlightenment.org/buildByToken/buildWithParameters?job=differential_efl_gcc_x86_64&DIFF_ID=12379&PHID=PHID-HMBT-ecmw7eulx2jlkcy6kgum&token=foobar"
curl: (7) Failed to connect to build.enlightenment.org port 443: Connection refused

When I call the very same URI from my local machine it works and the build is triggered.
I need this functionality thought to have uilds from new patches coming from phab.

Indeed, that was due to local DNS override. This has been fixed, can you please retest now ?

$ curl -vD - -X POST "https://build.enlightenment.org/buildByToken/buildWithParameters?job=differential_efl_gcc_x86_64&DIFF_ID=12379&PHID=PHID-HMBT-ecmw7eulx2jlkcy6kgum&token=foobar"
*   Trying 140.211.167.135...
* TCP_NODELAY set
* Connected to build.enlightenment.org (140.211.167.135) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: OU=Domain Control Validated; OU=Gandi Standard Wildcard SSL; CN=*.enlightenment.org
*  start date: Aug 22 00:00:00 2017 GMT
*  expire date: Aug 30 23:59:59 2019 GMT
*  subjectAltName: host "build.enlightenment.org" matched cert's "*.enlightenment.org"
*  issuer: C=FR; ST=Paris; L=Paris; O=Gandi; CN=Gandi Standard SSL CA 2
*  SSL certificate verify ok.
> POST /buildByToken/buildWithParameters?job=differential_efl_gcc_x86_64&DIFF_ID=12379&PHID=PHID-HMBT-ecmw7eulx2jlkcy6kgum&token=foobar HTTP/1.1
> Host: build.enlightenment.org
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Date: Wed, 27 Sep 2017 18:59:54 GMT
Date: Wed, 27 Sep 2017 18:59:54 GMT
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Location: https://build.enlightenment.org/buildByToken/
Location: https://build.enlightenment.org/buildByToken/
< Content-Length: 0
Content-Length: 0
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Strict-Transport-Security: max-age=16070400; includeSubDomains; preload
Strict-Transport-Security: max-age=16070400; includeSubDomains; preload

<
* Connection #0 to host build.enlightenment.org left intact

I still get the same error from the phab machine. Did you do your test from the actual phab vm?

beber added a comment.Oct 1 2017, 6:50 AM

I did the test from a jenkins slave. I just made a fix for phab as well.

beber@e5-phabricator1 ~ $ curl -vD - -X POST "https://build.enlightenment.org/buildByToken/buildWithParameters?job=differential_efl_gcc_x86_64&DIFF_ID=12379&PHID=PHID-HMBT-ecmw7eulx2jlkcy6kgum&token=foobar"
*   Trying 140.211.167.135...
* TCP_NODELAY set
* Connected to build.enlightenment.org (140.211.167.135) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: OU=Domain Control Validated; OU=Gandi Standard Wildcard SSL; CN=*.enlightenment.org
*  start date: Aug 22 00:00:00 2017 GMT
*  expire date: Aug 30 23:59:59 2019 GMT
*  subjectAltName: host "build.enlightenment.org" matched cert's "*.enlightenment.org"
*  issuer: C=FR; ST=Paris; L=Paris; O=Gandi; CN=Gandi Standard SSL CA 2
*  SSL certificate verify ok.
> POST /buildByToken/buildWithParameters?job=differential_efl_gcc_x86_64&DIFF_ID=12379&PHID=PHID-HMBT-ecmw7eulx2jlkcy6kgum&token=foobar HTTP/1.1
> Host: build.enlightenment.org
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 201 Created
HTTP/1.1 201 Created
< Date: Sun, 01 Oct 2017 13:49:44 GMT
Date: Sun, 01 Oct 2017 13:49:44 GMT
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Location: https://build.enlightenment.org/queue/item/811/
Location: https://build.enlightenment.org/queue/item/811/
< Content-Length: 0
Content-Length: 0
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Strict-Transport-Security: max-age=16070400; includeSubDomains; preload
Strict-Transport-Security: max-age=16070400; includeSubDomains; preload

<
* Connection #0 to host build.enlightenment.org left intact

What is the status on this please?