Reconnect to receivers automatically

Want to post something that doesn't quite fit into the other forums? This is the place for that.
WeKnowMC
Posts: 36
Joined: Fri Feb 19, 2016 11:58 pm

Reconnect to receivers automatically

Post by WeKnowMC » Wed Jul 20, 2016 8:01 pm

I have a few receivers in quite a complex setup compared to others. I run my VRS setup on a cloud server and use a hamachi tunnel and a program called redir to transfer the raw port data from my raspberry pi running pi aware to the cloud server. Sometimes, my internet connection with the raspberry pi on goes down or restarts. This causes VRS on the cloud server to loose connection to the feed but doesn't reconnect when the connection is restored. I will have to manually right click on the feed and select 'reconnect to data feed' which can get quite repetitive and annoying.

Is there any way to make VRS automatically reconnect to the receiver automatically so I don't have to worry when my local internet connection temporarily goes down or restarts?

Here are my current receiver network settings:
Image

agw
Posts: 2248
Joined: Fri Feb 17, 2012 3:20 am

Re: Reconnect to receivers automatically

Post by agw » Tue Jul 26, 2016 9:35 pm

Those settings should cause VRS to automatically reconnect if a quarter of an hour goes by without any data on the feed. Are you saying that if you leave it for 15+ minutes it doesn't automatically reconnect?

WeKnowMC
Posts: 36
Joined: Fri Feb 19, 2016 11:58 pm

Re: Reconnect to receivers automatically

Post by WeKnowMC » Thu Jul 28, 2016 12:28 pm

agw wrote:Those settings should cause VRS to automatically reconnect if a quarter of an hour goes by without any data on the feed. Are you saying that if you leave it for 15+ minutes it doesn't automatically reconnect?
Yes, it happens randomly and can be hard to predict when. I will have to do some more testing.

agw
Posts: 2248
Joined: Fri Feb 17, 2012 3:20 am

Re: Reconnect to receivers automatically

Post by agw » Sun Jul 31, 2016 1:24 pm

Okey dokey - I've tested it as working just now by configuring up an instance of VRS running under Mono on Ubuntu to connect to a receiver on another machine, setting the idle timeout to 15 seconds and then unplugging the other machine from the network. After 15 seconds it came up as disconnected, a couple of seconds later it started trying to reconnect. After I plugged the other machine back in it reconnected.

If the idle timeout isn't working then my guess is that some garbage is being sent over the connection.

Vraz
Posts: 5
Joined: Mon Aug 29, 2016 3:34 pm

Re: Reconnect to receivers automatically

Post by Vraz » Mon Sep 05, 2016 3:24 pm

I can confirm there are situations where the idle timeout does not trigger properly. Three receivers are configured in VRS. Two were online and one was offline. Receivers #1 and #3 were setup as Pull from my RPi3 via LAN (192.168.0.xxx / 30000 and 30002). Receiver #2 (offline) was setup as Push, also from the RPi (port 30001). All had timeouts and all had keep-alive disabled. #1/#2 were timeout 60 and #3 was timeout 10. Using VRS Version 2.4.0.30532 7/30/2016 3:57:44 PM.

Last night, my RPi3 spontaneously rebooted. This morning, VRS was trying to reconnect #1 but said connected for #3. Checking netstat on the VRS Linux server, there was a bogus connection for #3 to the RPi (though not on the RPi side). This makes sense as TCP keepalives are not enabled, VRS keep-alives were disabled and the spontaneous reboot of the RPi would not inform the Linux server the connection was gone. However, the idle timeout in VRS should have detected the lack of data in 10 seconds and restarted the connection.

While theoretically possible VRS had a partial packet, the odds seem infinitesimally low that a tiny payload was split into multiple packets and the reboot occurred after one was received and other was about to send. Even if it did, seems like the timeout should apply to a partial packet.

Any chance this issue is related to having multiple receivers? Possible that timeout works with the first receiver and not the others (or not the last)?

agw
Posts: 2248
Joined: Fri Feb 17, 2012 3:20 am

Re: Reconnect to receivers automatically

Post by agw » Sun Sep 18, 2016 11:12 pm

I did recently manage to get my remote Pi3 to break its connection and not reconnect automatically, I made a note of the circumstances but I've not had the time yet to take a look into it.

Regarding the multiple receivers - I'd be surprised if that had a bearing on it, the connections are pretty much independent. I think there's just a problem with the idle timeout somewhere.

dodgeboy
Posts: 5
Joined: Mon Apr 18, 2016 3:36 pm

Re: Reconnect to receivers automatically

Post by dodgeboy » Wed Feb 08, 2017 4:16 pm

Was there ever a resolution to this? I have been having this situation for nearly a year now (in Mono), and I'd really like to have a way for the connection to repair itself (detect it's down, and hit the timeout).

agw
Posts: 2248
Joined: Fri Feb 17, 2012 3:20 am

Re: Reconnect to receivers automatically

Post by agw » Mon Feb 13, 2017 2:13 am

No I'm afraid not, I still need to reproduce it.

dodgeboy
Posts: 5
Joined: Mon Apr 18, 2016 3:36 pm

Re: Reconnect to receivers automatically

Post by dodgeboy » Mon Feb 13, 2017 2:29 am

agw wrote:No I'm afraid not, I still need to reproduce it.
Please let me know if there's some way I can help get you logs or information you need. It happens 1-2 times a day to me.

Skibox
Posts: 152
Joined: Mon Apr 07, 2014 7:06 pm
Location: ESGG

Re: Reconnect to receivers automatically

Post by Skibox » Mon Feb 20, 2017 9:02 pm

dodgeboy wrote:Was there ever a resolution to this? I have been having this situation for nearly a year now (in Mono), and I'd really like to have a way for the connection to repair itself (detect it's down, and hit the timeout).
What is your config? Push or pull, what is the other endpoint sw ?

/M

Post Reply