realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

error: [http] HTTP upgrade failed (service did not respond properly) #401

Closed grafele closed 5 years ago

grafele commented 5 years ago

Goals

Sync my app with realm object server.

Expected Results

Sync works as it did before.

Actual Results

On the client i get the following log:

Sync: Connection[1]: Websocket: Expected HTTP response 101 Switching Protocols, but received:
HTTP/1.1 503 Service Unavailable

Server: Realm-Object-Server/3.12.2

On the server side I get this message:

error: [http] HTTP upgrade failed (service did not respond properly) {"type":"https://realm.io/docs/object-server/problems/service-unavailable","title":"The requested service is temporarily unavailable.","status":503,"code":802}
Request:  eed1dd54-2a34-421a-a3e6-b2e765947b1a
GET /realm-sync/%2F__admin HTTP/1.1
Authorization: Realm-Access-Token version=1 token="eyJhcHBfaWQiOiJpby5yZWFsbS5hdXRoIiwiaWRlbnRpdHkiOiJfX2FkbWluIiwiYWNjZXNzIjpbImRvd25sb2FkIiwidXBsb2FkIiwibWFuYWdlIl0sInNhbHQiOiIzZTNhOTRkNiIsImNhblNraXBSZXZvY2F0aW9uQ2hlY2siOnRydWV9:PNreybb81LnbZL8lBThLOxpC88K34kv6QIAzAzSxeulYFxBunkpD1VoCT4XD
iR/PnBbmheZof3I+khEqZOcUQfFrunTZED8BajH/gwMVj8ru9nPO3sCKSEHpEAcKTkKO2tbEVPikPo+gi9VqE1JNGZxTp6IfZgP9p9f3vZ3cr7GsWZTlh3ayHHH60qQw8EGDzkydKLo7Sn4jh4udQ53SFMFFDrhhksUqE5W/h+wiDo9weUuj/p3Rou+0xcN1HCKLh8beidWqVvPBvYTtgItXAuAbUOSRmhb5gzZ2IE2C2gPmZ2CoFcmHvWExzXivRuSOosTMJaSm3KXbp6gyL8Gi7Q=="
Connection: Upgrade
Host: 0.0.0.0
Sec-WebSocket-Key: v0M+uwCTW9YHbG/lETUfIQ==
Sec-WebSocket-Protocol: io.realm.sync.25
Sec-WebSocket-Version: 13
Upgrade: websocket

Response:
HTTP/1.1 503 Service Unavailable
Server: Realm-Object-Server/3.12.2

Detected an unhandled promise rejection at:  Promise { <rejected> 'Bad WebSocket response 503 service unavailable' } , reason:  Bad WebSocket response 503 service unavailable
Detected an unhandled promise rejection at:  Promise { <rejected> 'Bad WebSocket response 503 service unavailable' } , reason:  Bad WebSocket response 503 service unavailable

Steps to Reproduce

Sync your app with realm object server version 3.12.2 (same happened at 3.11.5).

Code Sample

Nothing special here. Normal Realm.open on client side.

Version of Realm and Tooling

Logs

systemctl status realm-object-server.service
Unit realm-object-server.service could not be found
sudo journalctl -u realm-object-server.service
-- No entries --
cat /var/log/realm-object-server.log
Paste output here
mgeerling commented 5 years ago

@grafele -- can you open a support ticket here? With this, can you please include the full logs (ideally at the debug level) as well as any information about what has changed in your setup, app, etc since this starting occurring?

bmunkholm commented 5 years ago

Closing as this is handled through support.