Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection reset by peer #6458

Closed
pavelpoley opened this issue Mar 8, 2019 · 10 comments
Closed

Connection reset by peer #6458

pavelpoley opened this issue Mar 8, 2019 · 10 comments

Comments

@pavelpoley
Copy link

After i open the app and running some minutes in background i have this error:

` E/REALM_SYNC: Connection[4]: Reading failed: Connection reset by peer
E/REALM_JAVA: Error in __permission:
    CONNECTION_RESET_BY_PEER(realm.basic_system:104): Connection reset by peer
E/REALM_SYNC: Connection[1]: Reading failed: Connection reset by peer
 E/REALM_JAVA: Error in __wildcardpermissions:
    CONNECTION_RESET_BY_PEER(realm.basic_system:104): Connection reset by peer
 E/REALM_SYNC: Connection[2]: Reading failed: Connection reset by peer`

What can be the reason? i am using 2 different configurations, full sync and query based.
The app not crash but data no showing, does it mean i need to sign in again or how to prevent this issue?

Realm version(s): 5.9.1

Realm Sync feature enabled: Yes

Android Studio version:3.3.2 ?

@marcus-hiles
Copy link

Yeah carrying out a test project with Android studio and got an error here too, any help guys?

@cmelchior
Copy link
Contributor

Connection reset by peer is a network error: https://stackoverflow.com/questions/1434451/what-does-connection-reset-by-peer-mean

Most likely you stopped the server or dropped the connection somehow.

@pavelpoley
Copy link
Author

I even don't know how to stop the server, it is not randomly happen, it happen every time after 3-4 minutes. I am using cloud platform without additional backend code.

@cmelchior
Copy link
Contributor

How is your device connected to the Internet? Does it, in general, have problems with connectivity e.g. when using the browser?

@pavelpoley
Copy link
Author

I am using WIFI, i don't have problems with Internet, checked without WIFI and on emulator same problem

`E/REALM_SYNC: Connection[3]: Reading failed: End of input

 E/REALM_JAVA: Session Error[realms://***.us1a.cloud.realm.io/753fa***74ce/pavel.poley88__gmail.com__1]: MISC_END_OF_INPUT(realm.util.misc_ext:1): End of input

 E/REALM_SYNC: Connection[2]: Reading failed: End of input15536-15612/com.***.next.app
 
E/REALM_SYNC: Connection[5]: Reading failed: End of input

 E/REALM_JAVA: Session Error[realms://***.us1a.cloud.realm.io/users]: MISC_END_OF_INPUT(realm.util.misc_ext:1): End of input

 E/REALM_SYNC: Connection[4]: Reading failed: End of input

 E/REALM_JAVA: Error in __permission:  MISC_END_OF_INPUT(realm.util.misc_ext:1): End of input

 E/REALM_SYNC: Connection[1]: Reading failed: End of input

 E/REALM_JAVA: Error in __wildcardpermissions:
    MISC_END_OF_INPUT(realm.util.misc_ext:1): End of input`

@pavelpoley
Copy link
Author

Does the problem can happen because of open realms/permissionManagers?

@cmelchior
Copy link
Contributor

No, both end of input and connection reset by peer are indications of network problems somewhere.

@cmelchior
Copy link
Contributor

Since these errors are network related errors I'll be closing this issue. If you still think this is an issue with Realm itself we would need a sample project to be able to debug this.

@pavelpoley
Copy link
Author

pavelpoley commented Apr 11, 2019

I guess it is somehow related to PermissionManager or system permissions, this connection reset happen after some time when PermissionManager.getPermissions() called.

Also, after this error the non system realms still syncing and updating data but when i try to call PermissionManager.getPermissions() again error is thrown, and i need to restart the app to force PermissionManager work again.

It happen not only on my network, happen at all users that we tested.

@pavelpoley
Copy link
Author

pavelpoley commented Apr 14, 2019

I see this error also in Realm todo-full-sync app example, connection reset after about five minutes

2019-04-14 13:27:52.996 32320-32347/io.realm.todo E/REALM_SYNC: Connection[3]: Reading failed: Connection reset by peer
2019-04-14 13:27:52.997 32320-32347/io.realm.todo E/REALM_JAVA: Error in __permission:
CONNECTION_RESET_BY_PEER(realm.basic_system:104): Connection reset by peer

If i comment the code with PermissionManager this error not happen.

But lets say it was connection error, it can happen, i think the problem is that after connection is drooped i don't have access to permission manager anymore, it return error. All other realms after drooped connection work fine updating and syncing.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants