Git Product home page Git Product logo

Comments (8)

growse avatar growse commented on June 2, 2024

32000 is the MQTT client exception for REASON_CODE_CLIENT_TIMEOUT. The client's not getting a response back from the server. The fact that this is fixed by restarting your wireguard VPN (which I assume is what you're connecting over) hints that your network is dropping the return packets somehow.

Can you test without Wireguard to see if it still behaves the same?

from android.

LinusNil avatar LinusNil commented on June 2, 2024

I should have been clearer about the vpn. As mentioned the connection issue is resolved by first activating and the deactivating the vpn. In other words; I usually don't use it and even if it is activate, I only route a few LAN subnets through it.

I believe the only thing this does is trigger/force owntracks to reconnect to the broker in some way. I might have come around this issue by using Clean Session, which I believe makes Owntracks open and close the TCP connection repeatedly in some way.

Addition:
I still occasionally run into this issue, also with Clean Session activated.
I also noticed that if I close the app gracefully (with the Exit App menu option) and then start it, it regains connection to the broker and starts working properly.

from android.

growse avatar growse commented on June 2, 2024

Network changes do trigger a reconnect, so that's probably why you're seeing a reconnect.

It does smell an awful lot like a middle router (or something) between your device and your broker is stopping packets from flowing at some point after the connection is established. I've seen this before on some ... interesting NAT implementations & firewalls that had a slightly wonky view on what "connected" meant (they only let traffic flow when there was a connection formed by a TCP handshake, and then at some point forgot that happened so dropped further packets in the flow).

Clean session is just a flag sent to the broker on connect to say "don't send me any outstanding Qos 1 or 2 messages that you might have queued from my last session". It doesn't affect reconnects.

There's a 2.5.0 beta out shortly, I'd be interested in whether or not you experience the same thing there.

from android.

LinusNil avatar LinusNil commented on June 2, 2024

Ok. I got the Clean Session thing wrong then. Thank you for enlightening me on that.

Well, I am behind CGNAT while I'm not on WiFi. Also, my mobile connect to WiFi whenever it is available. Looking forward for updates.

This might be considered a not so desirable workaround, but would it be possible for OwnTracks to simply reinitiate the TCP connection if it runs into these kind of errors for a certain timespan?

from android.

growse avatar growse commented on June 2, 2024

This might be considered a not so desirable workaround, but would it be possible for OwnTracks to simply reinitiate the TCP connection if it runs into these kind of errors for a certain timespan?

One of the things the new version should enable is setting a keepalive to <900s. In theory (because software), this should mean that if the broker / client doesn't see a ping at least every $keepalive seconds, it'll RST the connection and force a re-connect. It sounds like you'd benefit from having a value closer to around 60s (depending on impact on your battery life).

from android.

LinusNil avatar LinusNil commented on June 2, 2024

This sounds great. Do you know it this will also be implemented in the iOS version?

from android.

jpmens avatar jpmens commented on June 2, 2024

I believe keepalives work fine in iOS.

from android.

github-actions avatar github-actions commented on June 2, 2024

Marking issue with request for more data as stale, due to no updates.

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.