I am sending simple REST API (curl) to change light item switch state (ON/OFF) from my PC. There is very long delay until the command is executed, something like 10 seconds. When I send same command from my cloud account or locally, execution is immediate (as expected).
Any idea why?
Maybe this can help to identify the issue:
Note: Unnecessary use of -X or --request, POST is already inferred.
20:44:52.972597 * Trying 220.127.116.11...
20:44:52.972820 * TCP_NODELAY set
20:44:53.052321 * Connected to home.myopenhab.org (18.104.22.168) port 443 (#0)
20:44:53.052554 * ALPN, offering h2
20:44:53.052595 * ALPN, offering http/1.1
20:44:53.052688 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
20:44:53.062098 * successfully set certificate verify locations:
20:44:53.062137 * CAfile: /etc/ssl/cert.pem
20:44:53.062309 * TLSv1.2 (OUT), TLS handshake, Client hello (1):
20:44:53.143765 * TLSv1.2 (IN), TLS handshake, Server hello (2):
20:44:53.144281 * TLSv1.2 (IN), TLS handshake, Certificate (11):
20:44:53.149352 * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
20:44:53.150496 * TLSv1.2 (IN), TLS handshake, Server finished (14):
20:44:53.154981 * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
20:44:53.155019 * TLSv1.2 (OUT), TLS change cipher, Client hello (1):
20:44:53.155114 * TLSv1.2 (OUT), TLS handshake, Finished (20):
20:44:53.231257 * TLSv1.2 (IN), TLS change cipher, Client hello (1):
20:44:53.231389 * TLSv1.2 (IN), TLS handshake, Finished (20):
20:44:53.231443 * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
20:44:53.231477 * ALPN, server accepted to use http/1.1
20:44:53.231507 * Server certificate:
20:44:53.231578 * subject: CN=home.myopenhab.org
20:44:53.231613 * start date: Oct 1 01:30:12 2018 GMT
20:44:53.231658 * expire date: Dec 30 01:30:12 2018 GMT
20:44:53.231720 * subjectAltName: host "home.myopenhab.org" matched cert's "home.myopenhab.org"
20:44:53.231761 * issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
20:44:53.231793 * SSL certificate verify ok.
20:44:53.231846 * Server auth using Basic with user 'xxxxxxxxxxxxxxx'
20:44:53.231972 > POST /rest/items/Light_Kitchen HTTP/1.1
20:44:53.231972 > Host: home.myopenhab.org
20:44:53.231972 > Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXX=
20:44:53.231972 > User-Agent: curl/7.54.0
20:44:53.231972 > Content-Type: text/plain
20:44:53.231972 > Accept: application/json
20:44:53.231972 > Content-Length: 2
20:44:53.232219 * upload completely sent off: 2 out of 2 bytes
20:45:03.537732 < HTTP/1.1 200 OK
20:45:03.537781 < Server: nginx/1.10.0 (Ubuntu)
20:45:03.537812 < Date: Tue, 13 Nov 2018 18:45:03 GMT
20:45:03.537844 < Content-Type: text/plain; charset=utf-8
20:45:03.537875 < Content-Length: 0
20:45:03.537908 < Connection: keep-alive
20:45:03.537939 < X-Powered-By: Express
20:45:03.537970 < Vary: X-HTTP-Method-Override
20:45:03.538002 < set-cookie: CloudServer=192.168.132.75%3A3001; Max-Age=900; Path=/; Expires=Tue, 13 Nov 2018 19:00:03 GMT; HttpOnly
20:45:03.538033 < set-cookie: connect.sid=s%3; Domain=.myopenhab.org; Path=/; HttpOnly
20:45:03.538111 * Connection #0 to host home.myopenhab.org left intact
10 secs to get the HTTP response… ouch
did this appear recently? (did it work faster before?)
Is home.myopenhab.org down? & Remote Access is slow
When I send the request from cloud, all works, so myopenhab is not down. Checking the second link you sent …
It was this way yesterday, don’t know weeks or month ago but I know that few month ago it wasn’t this way.
One more thing, I am sending this request also from AWS lambda and I get the same delay …
(not 100% sure… but) It seems that the NGINX proxy that is in front of the back-end servers of
myopenhab.org is experiencing hiccups
sometimes it spits 504 - Gateway timeouts, sometimes it responds very slow
the maintenance team is working to identify and fix the issues.
@Dim great, will check and update
@Dim, I have tested, still same issue
21:06:50.882854 > User-Agent: curl/7.54.0
21:06:50.882854 > Content-Type: text/plain
21:06:50.882854 > Accept: application/json
21:06:50.882854 > Content-Length: 2
21:06:50.883302 * upload completely sent off: 2 out of 2 bytes
21:06:55.272352 < HTTP/1.1 200 OK
21:06:55.272435 < Server: nginx/1.10.0 (Ubuntu)
21:06:55.272494 < Date: Thu, 15 Nov 2018 19:06:55 GMT
21:06:55.272554 < Content-Type: text/plain; charset=utf-8
21:06:55.272613 < Content-Length: 0
21:06:55.272673 < Connection: keep-alive
21:06:55.272730 < X-Powered-By: Express
21:06:55.272787 < Vary: X-HTTP-Method-Override
check here the latest status:
FYi this looks like its not a Basic Auth issue but we are handling internal requests between Ngnix and nodejs when there is no cookie in the request header. Still looking.
Follow/track that thread. The updates will go there
As written in the other thread, issue is solved. Just checked it.