Closed azraelx23 closed 6 years ago
Are these logs from the client? In addition, are you certain that the certificate is valid, and not issued from ACME staging servers?
yes, from client side, certificates are valid since the login from client went through fine, but the actual data syncing after that has problems mentioned
@azraelx23 can set the logs to debug
so we can see more info? Also can you share the logs from the server?
may I know where the logs are? Tried searching for it on /var/log to no avail.
also on client side, it is failing on this line of code:
Realm.asyncOpen(configuration: config, callbackQueue: DispatchQueue.main, callback: { (realm : Realm?, error : Error?) in
Can you turn on higher logs for the client? If you are running with pm2 then just pm2 logs
will work: http://pm2.keymetrics.io/docs/usage/log-management/
Holy moly! spent whole night troubleshooting same issue. @azraelx23 check your scheme in realm URL. That should be realms
instead of realm
for instance realms://myros.com:9443/~/ios-app-realm
Such nuances should be clearly described in the docs.
thanks @modnovolyk , appreciate it, will try it out!
I'm assuming this solved your issue. Otherwise please get back.
it is solved per @modnovolyk 's suggestion, thanks again!
Goals
using https on realm object server 2
Expected Results
syncs fine on HTTPS
Actual Results
Steps to Reproduce
Code Sample
index.ts file:
import { BasicServer } from 'realm-object-server' import { FacebookAuthProvider } from "../node_modules/realm-object-server/dist/auth/facebook/FacebookAuthProvider" import { GoogleAuthProvider } from "../node_modules/realm-object-server/dist/auth/google/GoogleAuthProvider" import * as path from 'path'
const server = new BasicServer()
const facebookProvider = new FacebookAuthProvider() const googleProvider = new GoogleAuthProvider( { clientId: ''
}
)
server.start({ dataPath: path.join(__dirname, '../data'), authProviders: [ facebookProvider, googleProvider ], logLevel: 'info', https: true, httpsPort: 9443, httpsKeyPath: '/etc/letsencrypt/live/server.com/privkey.pem', httpsCertChainPath: '/etc/letsencrypt/live/server.com/cert.pem'
Version of Realm and Tooling
Realm Object Server Version: 2.0.13
Flavor:
Server OS & Version: Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial
Client SDK Version: 3.0.1
Client OS & Version: iOS 11.1
Logs
2017-11-07 17:16:25.780304+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connected to endpoint ‘172.104.5.72:9443’ (from ‘192.168.0.103:60023’) 2017-11-07 17:16:25.911540+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Writing failed: End of input 2017-11-07 17:16:25.911766+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connection closed due to error 2017-11-07 17:16:26.580869+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connected to endpoint ‘172.104.5.72:9443’ (from ‘192.168.0.103:60028’) 2017-11-07 17:16:26.710788+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Writing failed: End of input 2017-11-07 17:16:26.711034+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connection closed due to error 2017-11-07 17:16:27.395899+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connected to endpoint ‘172.104.5.72:9443’ (from ‘192.168.0.103:60031’) 2017-11-07 17:16:27.518827+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Writing failed: End of input 2017-11-07 17:16:27.519148+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connection closed due to error 2017-11-07 17:16:28.287810+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connected to endpoint ‘172.104.5.72:9443’ (from ‘192.168.0.103:60032’) 2017-11-07 17:16:28.412039+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Writing failed: End of input 2017-11-07 17:16:28.412334+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connection closed due to error 2017-11-07 17:16:29.191763+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connected to endpoint ‘172.104.5.72:9443’ (from ‘192.168.0.103:60033’) 2017-11-07 17:16:29.317879+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Writing failed: End of input 2017-11-07 17:16:29.318088+0200 SmartCardsPlus[29073:1925389] Sync: Connection[1]: Connection closed due to error