I am using Realm Browser v. 2.1.7 and my Realm Object Server is running on an Ubuntu server behind Nginx. I can access my Realm dashboard via the browser and can connect via my mobile app.
However, when I try to connect with the Realm Browser I get the following error message:
Failed to connect to Object Server. Check the URL and that the server is accessible.
When I check my Nginx access log I see the following:
204.xxx.173.126 - - [25/Apr/2017:14:15:58 -0700] "GET /realm-object-server HTTP/1.1" 404 158 "-" "-"
I fixed this problem by ensuring that my Nginx was correctly configured as a Websocket Proxy. Here is my Nginx server block:
server {
listen 80 default_server;
server_name realm.mydomain.com;
location / {
proxy_pass http://127.0.0.1:9080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}