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

realm object session out / getting closed . #352

Closed AshishChagugule closed 6 years ago

AshishChagugule commented 6 years ago

hay hello , I need one quick help we have integrated realm object server with android and and ios , and it work fine . but after some time server getting closed and we need to reset it . we are not getting exact problem . will u please suggest something.

and we are getting log from severer like

[ec2-user@ip-172-31-40-160 ~]$ ros start
info: Loaded feature token capabilities=[Sync], expires=Wed Apr 19 2017 14:15:29 GMT+0000 (UTC)
info: Realm Object Server version 2.5.1 is starting
info: [sync] Realm sync server started ([realm-core-4.0.4], [realm-sync-2.1.10])
info: [sync] Directory holding persistent state: /home/ec2-user/data/sync/user_data
info: [sync] Operating mode: master_with_no_slave
info: [sync] Log level: info
info: [sync] Download log compaction is enabled
info: [sync] Max download size: 131072 bytes
info: [sync] Listening on 127.0.0.1:43055 (sync protocol version 22)
info: Realm Object Server has started and is listening on http://0.0.0.0:9080
error: [sync] Sync Connection[11]: Session[1]: Received UPLOAD message while session token had expired
nirinchev commented 6 years ago

The logs don't indicate a fatal error that would terminate the server process. What makes you think it's getting closed?

sagarshirbhate commented 6 years ago

Hi @nirinchev I'm working on iOS Side along with @AshishChagugule. This is response coming from server.

error: [sync] Sync Connection[8]: Session[1]: Token expired (signed_user_token='...a1mQMTPmYmmtauMoopzo+6srcg+g==').
error: [sync] Sync Connection[8]: Session[1]: Token expired (message_type='bind', signed_user_token='...a1mQMTPmYmmtauMoopzo+6srcg+g==').

After showing that log server get closed and we need to restart the Realm again using npm command

We had used only single admin user on both side iOS and Android but I think this is happen because we had used a single user and we didnt write a code for logout the particular user. If we tried to logout from device its logout from all the devices where I logged with that admin user.

nirinchev commented 6 years ago

The logs that you posted indicate that the SDK tried to perform some action with an expired access token. However, that token would be automatically renewed after that response and syncing should continue. Can you post the complete server log where it shows that the server process is terminated?

astigsen commented 6 years ago

Closing this for now as it refer to an outdated version of ROS and the user has not responded for months. Please reopen if the problem resurfaces.

krishnasharma2018 commented 5 years ago

Hello, We are getting this type of log on realm object server after an interval - Token expired (message_type='bind', signed_user_token='...72UtQ4z/WUeN+lOoW0iLG42fGAyA=='). Token expired (signed_user_token='...72UtQ4z/WUeN+lOoW0iLG42fGAyA==')

Please find attached log file from more information. Can you please give me an idea how do we fix this issue in our android application. Thanks in advance. realm_logs