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

Precheck canot be disabled #407

Closed programaths closed 5 years ago

programaths commented 5 years ago

Goals

Avoid precheks which becomes very important when there is

Expected Results

Prechekc are not done

Actual Results

Precheck are done

Steps to Reproduce

Add this:

  verifyRealmsAtStart: false,
  skipVerifyRealmsAtStart: true,
  runPrecheckInChildProcess: false,
  disablePrecheckInChildProc: true,

to your server config.

Code Sample

See above

Version of Realm and Tooling

Logs

Unwanted precheks

ros-server_1     | debug: [sync] Precheck: Checking '/company/092bddfa-df98-4159-a0ce-5538baae5ce6' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/092bddfa-df98-4159-a0ce-5538baae5ce6/__partial/f51ceb9de6243246a2d5405a77fc970b/9d9f5a826f6765fc82f58384bf5f74ea26576ab8' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09304dd2-41de-4c4a-a64c-40abd07bfd76' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09304dd2-41de-4c4a-a64c-40abd07bfd76/__partial/f51ceb9de6243246a2d5405a77fc970b/9d9f5a826f6765fc82f58384bf5f74ea26576ab8' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09332abd-733d-47c9-af36-7cccc87c5dac' (file size = 81920 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09332abd-733d-47c9-af36-7cccc87c5dac/__partial/f51ceb9de6243246a2d5405a77fc970b/9d9f5a826f6765fc82f58384bf5f74ea26576ab8' (file size = 81920 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09433668-22fd-4466-904d-420d48ee9d62' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/09433668-22fd-4466-904d-420d48ee9d62/__partial/f51ceb9de6243246a2d5405a77fc970b/9d9f5a826f6765fc82f58384bf5f74ea26576ab8' (file size = 73728 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/094c7e58-1957-4409-aef5-057828f6b0fa' (file size = 81920 bytes)
ros-server_1     | debug: [sync] Precheck: Checking '/company/094c7e58-1957-4409-aef5-057828f6b0fa/__partial/f51ceb9de6243246a2d5405a77fc970b/9d9f5a826f6765fc82f58384bf5f74ea26576ab8' (file size = 81920 bytes)

Consequential error

ros-server_1     | 2018-12-21T15:08:57.975985285Z POST /auth HTTP/1.1
ros-server_1     | 2018-12-21T15:08:57.975990485Z content-type: application/json;charset=utf-8
ros-server_1     | 2018-12-21T15:08:57.976000780Z accept: application/json
ros-server_1     | 2018-12-21T15:08:57.976020112Z accept-encoding: gzip,deflate
ros-server_1     | 2018-12-21T15:08:57.976025395Z user-agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
ros-server_1     | 2018-12-21T15:08:57.976034948Z connection: close
ros-server_1     | 2018-12-21T15:08:57.976039366Z content-length: 96
ros-server_1     | 2018-12-21T15:08:57.976043816Z Host: ros-server:9080
ros-server_1     | 2018-12-21T15:08:57.976048234Z {"data":"signup-microservice","provider":"password","user_info":{"password":"**redacted**"}}
ros-server_1     | 2018-12-21T15:08:57.976720921Z detail: [http] 192.168.64.13 - POST /auth HTTP/1.1 404 144 - 1.105 ms
ros-server_1     | 2018-12-21T15:08:57.977556176Z detail: [http] 192.168.64.13 - POST /auth HTTP/1.1 404 144 - 0.899 ms
ros-server_1     | 2018-12-21T15:08:58.276444904Z trace: [http] 
ros-server_1     | 2018-12-21T15:08:58.276487576Z Request:  f605aaef-8201-4439-85d2-67f32165f0bb
ros-server_1     | 2018-12-21T15:08:58.276494910Z POST /auth HTTP/1.1
ros-server_1     | 2018-12-21T15:08:58.276499730Z content-type: application/json;charset=utf-8
ros-server_1     | 2018-12-21T15:08:58.276504007Z accept: application/json
ros-server_1     | 2018-12-21T15:08:58.276507904Z accept-encoding: gzip,deflate
ros-server_1     | 2018-12-21T15:08:58.276512220Z user-agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
ros-server_1     | 2018-12-21T15:08:58.276516462Z connection: close
ros-server_1     | 2018-12-21T15:08:58.276521125Z content-length: 96
ros-server_1     | 2018-12-21T15:08:58.276525594Z Host: ros-server:9080
ros-server_1     | 2018-12-21T15:08:58.276529890Z {"data":"signup-microservice","provider":"password","user_info":{"password":"***redacted***"}}
ros-server_1     | 2018-12-21T15:08:58.276835913Z detail: [http] 192.168.64.4 - POST /auth HTTP/1.1 404 144 - 0.187 ms
ros-server_1     | 2018-12-21T15:08:58.285577002Z trace: [http] 
ros-server_1     | 2018-12-21T15:08:58.285615828Z Request:  8c5120e3-9ed8-4f29-b614-01b932f03df7
ros-server_1     | 2018-12-21T15:08:58.285621935Z POST /auth HTTP/1.1
ros-server_1     | 2018-12-21T15:08:58.285626191Z content-type: application/json;charset=utf-8
ros-server_1     | 2018-12-21T15:08:58.285630301Z accept: application/json
ros-server_1     | 2018-12-21T15:08:58.285634522Z accept-encoding: gzip,deflate
ros-server_1     | 2018-12-21T15:08:58.285638628Z user-agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
ros-server_1     | 2018-12-21T15:08:58.285643071Z connection: close
ros-server_1     | 2018-12-21T15:08:58.285646884Z content-length: 96
ros-server_1     | 2018-12-21T15:08:58.285650908Z Host: ros-sta.showsourcing.com:9080
ros-server_1     | 2018-12-21T15:08:58.285654919Z {"data":"signup-microservice","provider":"password","user_info":{"password":"***redacted***"}}
ros-server_1     | 2018-12-21T15:08:58.286729934Z detail: [http] 35.243.180.82 - POST /auth HTTP/1.1 404 144 - 0.293 ms
ros-server_1     | 2018-12-21T15:08:58.320779663Z debug: Returning error response status=503, title=The requested service is temporarily unavailable., detail=Timeout occured upgrading websocket request, path=service-unavailable, code=802, class=ServiceUnavailable
ros-server_1     | 2018-12-21T15:08:58.320827328Z debug: Error: The requested service is temporarily unavailable.
ros-server_1     | 2018-12-21T15:08:58.320849159Z     at SyncProxyService.<anonymous> (/home/jenkins/workspace/ROS/ROS-Release/src/services/SyncProxyService.ts:253:23)
ros-server_1     | 2018-12-21T15:08:58.320855142Z     at Generator.throw (<anonymous>)
ros-server_1     | 2018-12-21T15:08:58.320859682Z     at rejected (/realm-object-server/node_modules/realm-object-server/dist/services/SyncProxyService.js:14:65)
ros-server_1     | 2018-12-21T15:08:58.322443581Z 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,"detail":"Timeout occured upgrading websocket request","code":802}
ros-server_1     | 2018-12-21T15:08:58.322522264Z Request:  543f5287-3f57-41ce-bbc5-32e76fcd65e9
ros-server_1     | 2018-12-21T15:08:58.322530547Z GET /realm-sync/%2F__admin HTTP/1.1
ros-server_1     | 2018-12-21T15:08:58.322535314Z Authorization: Realm-Access-Token version=1 token="***redacted***"
ros-server_1     | 2018-12-21T15:08:58.322541552Z Connection: Upgrade
ros-server_1     | 2018-12-21T15:08:58.322545315Z Host: ros-sta.showsourcing.com
ros-server_1     | 2018-12-21T15:08:58.322549004Z Sec-WebSocket-Key: aYbQBqNJ8QrXiSNQIG/T7A==
ros-server_1     | 2018-12-21T15:08:58.322552864Z Sec-WebSocket-Protocol: io.realm.sync.25
ros-server_1     | 2018-12-21T15:08:58.322556744Z Sec-WebSocket-Version: 13
ros-server_1     | 2018-12-21T15:08:58.322560320Z Upgrade: websocket
ros-server_1     | 2018-12-21T15:08:58.322564304Z User-Agent: RealmSync/3.13.4 (Windows Win32 unknown 10.0.17134.1 x86_64)
ros-server_1     | 2018-12-21T15:08:58.322568622Z Response:
ros-server_1     | 2018-12-21T15:08:58.322572768Z HTTP/1.1 503 Service Unavailable
ros-server_1     | 2018-12-21T15:08:58.322591456Z Server: Realm-Object-Server/3.16.5
ros-server_1     | 2018-12-21T15:08:58.322597532Z 
ros-server_1     | 2018-12-21T15:08:58.323327307Z debug: Returning error response status=503, title=The requested service is temporarily unavailable., detail=Timeout occured upgrading websocket request, path=service-unavailable, code=802, class=ServiceUnavailable
ros-server_1     | 2018-12-21T15:08:58.323343123Z debug: Error: The requested service is temporarily unavailable.
ros-server_1     | 2018-12-21T15:08:58.323348966Z     at SyncProxyService.<anonymous> (/home/jenkins/workspace/ROS/ROS-Release/src/services/SyncProxyService.ts:253:23)
ros-server_1     | 2018-12-21T15:08:58.323354737Z     at Generator.throw (<anonymous>)
ros-server_1     | 2018-12-21T15:08:58.323373103Z     at rejected (/realm-object-server/node_modules/realm-object-server/dist/services/SyncProxyService.js:14:65)
ros-server_1     | 2018-12-21T15:08:58.323378591Z 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,"detail":"Timeout occured upgrading websocket request","code":802}
ros-server_1     | 2018-12-21T15:08:58.323399693Z Request:  e0c29e8e-78bd-49da-8416-04b63137384c
ros-server_1     | 2018-12-21T15:08:58.323404573Z GET /realm-sync/%2Flegacy-auth HTTP/1.1
ros-server_1     | 2018-12-21T15:08:58.323409461Z Authorization: Realm-Access-Token version=1 token="***redacted***"
ros-server_1     | 2018-12-21T15:08:58.323416832Z Connection: Upgrade
ros-server_1     | 2018-12-21T15:08:58.323421414Z Host: ros-sta.showsourcing.com
ros-server_1     | 2018-12-21T15:08:58.323425988Z Sec-WebSocket-Key: ajGwo6inv0VvnOcYrmxitg==
ros-server_1     | 2018-12-21T15:08:58.323430412Z Sec-WebSocket-Protocol: io.realm.sync.25
ros-server_1     | 2018-12-21T15:08:58.323434894Z Sec-WebSocket-Version: 13
ros-server_1     | 2018-12-21T15:08:58.323439740Z Upgrade: websocket
ros-server_1     | 2018-12-21T15:08:58.323444516Z User-Agent: RealmSync/3.13.4 (Windows Win32 unknown 10.0.17134.1 x86_64)
ros-server_1     | 2018-12-21T15:08:58.323449404Z Response:
ros-server_1     | 2018-12-21T15:08:58.323453804Z HTTP/1.1 503 Service Unavailable
ros-server_1     | 2018-12-21T15:08:58.323458424Z Server: Realm-Object-Server/3.16.5
nirinchev commented 5 years ago

The precheck will enumerate the files it encounters in the server working directory, even though it doesn't do anything with them. Typically the precheck process completes within few hundred milliseconds (the duration is output immediately after all files are enumerated). If that's not the case, please open a support ticket and share your configuration and setup so we can investigate what has gone wrong.

programaths commented 5 years ago

This was still outputting prechecks on Monday! (started Friday) Now trying to get it work with "Kubernetes" to benefit form load balancing & sharding.

bmunkholm commented 5 years ago

@programaths Please open a support ticket if this is still an issue for you.

programaths commented 5 years ago

@bmunkholm not working on this anymore