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

The right way to deploy ros on nginx with SSL #310

Closed jaisontj closed 6 years ago

jaisontj commented 6 years ago

Goals

Hi, I seem to be having the same issue as this one.

Here is what I have done, I have dockerized ros and am trying to deploy it on nginx with SSL enabled. Since the requests to ros are behind a gateway I have not enabled https on the ros. The server is currently running at https://ros.critique72.hasura-app.io/. I tried connecting to this via Realm studio with

url -> https://ros.dishonestly26.hasura-app.io/ default username and password

While the login succeeds, I am not able to view the Realms/Users and Logs are empty.

Expected Results

Realm Studio should display Realms and User information

Actual Results

Login succeeds but no data is shown, just a loading indicator for each tab.

Steps to Reproduce

Try connecting to the following using realm studio

url -> https://ros.dishonestly26.hasura-app.io/ default username and password

Version of Realm and Tooling

morten-krogh commented 6 years ago

Hi @jaisontj Sorry for the late reply. I tried connecting to your server, but it seems like you have taken it offline. Do you still have this problem?

guatedude2 commented 6 years ago

I'm having a similar issue. Here's how I reproduced it locally with a self-signed cert

used docker compose for this example:

version: '3'
services:
  web:
    image: nginx
    depends_on:
      - realm_db
    volumes:
      - ./web/nginx.conf:/etc/nginx/conf.d/default.conf:ro
      - ./web/ssl:/var/opt/ssl:ro
    ports:
      - 9080:9080
      - 9443:9443
  realm_db:
    image: realm/realm-object-server:latest
    environment:
      - ROS_TOS_EMAIL_ADDRESS=admin@local.com

nginx.conf file

upstream db {
    server realm_db:9080;
}
server {
    listen 9080;
    listen 9443 ssl;
    ssl_certificate /var/opt/ssl/server.crt;
    ssl_certificate_key /var/opt/ssl/server.key;
    location / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass http://db;
    }
}

Here are the Heruku instructions to generate a self signed cert if you need one.

After that I try to connect via Real Studio like so:

screen shot 2018-05-05 at 12 43 38 pm

And get a blank screen like this one:

screen shot 2018-05-05 at 12 43 58 pm

Connecting to 9080 seems to work

astigsen commented 6 years ago

Closing this for now as it relates to an outdated version of ROS. Please reopen if the issue resurfaces.