<p>A VirtualHere client located on an Ubuntu VPS is seeing frequent disconnects from the VirtualHere server, located on a Synology NAS on a standard ISP connection. The disconnects do not match up with any recognized WAN outage at the server location, but perhaps there are micro-outages occurring. When the USB device disconnects, Ubuntu considers the device "busy," which means I get a lot of errors in the scripts that are trying to use it. Furthermore when I reconnect it, it comes back as a different /dev/sd*, which is also a pain.
</p>
<p>My question is whether there is anything I can do to make VirtualHere more tolerant of these connection failures. Client log follows:
</p>
<p>Date Time Program Messages<br />
8/19/16 10:11:01 VirtualHere IPC available at /tmp/vhclient<br />
8/19/16 10:11:01 VirtualHere Using config at /root/.vhui<br />
8/19/16 10:11:01 VirtualHere VirtualHere Client 3.7.0 starting (Compiled: Jul 13 2016 22:17:47)<br />
8/20/16 15:44:50 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/20/16 15:44:20 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/20/16 15:44:04 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/20/16 15:44:04 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/22/16 11:38:20 VirtualHere IPC available at /tmp/vhclient<br />
8/22/16 11:38:20 VirtualHere Using config at /root/.vhui<br />
8/22/16 11:38:20 VirtualHere VirtualHere Client 3.7.0 starting (Compiled: Jul 13 2016 22:17:47)<br />
8/22/16 8:06:43 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/22/16 8:06:33 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/22/16 7:25:01 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:24:31 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:24:01 VirtualHere message repeated 6 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:21:00 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:20:30 VirtualHere message repeated 6 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:17:30 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:17:00 VirtualHere message repeated 7 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:13:30 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:13:07 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/22/16 7:12:57 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/23/16 16:49:07 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/23/16 16:48:57 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/23/16 9:22:46 VirtualHere IPC available at /tmp/vhclient<br />
8/23/16 9:22:46 VirtualHere Using config at /root/.vhui<br />
8/23/16 9:22:46 VirtualHere VirtualHere Client 3.7.1 starting (Compiled: Aug 23 2016 16:19:13)<br />
8/23/16 9:15:53 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/23/16 9:15:53 VirtualHere Caught SIGTERM, shutting down client</p>
Better log
<p>Sorry, the log timestamps got mixed up. See below:</p>
<p>Date Time Program Messages<br />
8/19/16 10:11:01 VirtualHere IPC available at /tmp/vhclient<br />
8/19/16 10:11:01 VirtualHere Using config at /root/.vhui<br />
8/19/16 10:11:01 VirtualHere VirtualHere Client 3.7.0 starting (Compiled: Jul 13 2016 22:17:47)<br />
8/20/16 15:44:04 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/20/16 15:44:04 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/20/16 15:44:20 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/20/16 15:44:50 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:12:57 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/22/16 7:13:07 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/22/16 7:13:30 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:17:00 VirtualHere message repeated 7 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:17:30 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:20:30 VirtualHere message repeated 6 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:21:00 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:24:01 VirtualHere message repeated 6 times: [ Could not connect to redacted.myds.me:17570]<br />
8/22/16 7:24:31 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 7:25:01 VirtualHere Could not connect to redacted.myds.me:17570<br />
8/22/16 8:06:33 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/22/16 8:06:43 VirtualHere Server ping timeout, shutting down connection 1...<br />
8/22/16 11:38:20 VirtualHere IPC available at /tmp/vhclient<br />
8/22/16 11:38:20 VirtualHere Using config at /root/.vhui<br />
8/22/16 11:38:20 VirtualHere VirtualHere Client 3.7.0 starting (Compiled: Jul 13 2016 22:17:47)<br />
8/23/16 9:15:53 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/23/16 9:15:53 VirtualHere Caught SIGTERM, shutting down client<br />
8/23/16 9:22:46 VirtualHere IPC available at /tmp/vhclient<br />
8/23/16 9:22:46 VirtualHere Using config at /root/.vhui<br />
8/23/16 9:22:46 VirtualHere VirtualHere Client 3.7.1 starting (Compiled: Aug 23 2016 16:19:13)<br />
8/23/16 16:48:57 VirtualHere Connection 1 remotely disconnected gracefully (rx)<br />
8/23/16 16:49:07 VirtualHere Server ping timeout, shutting down connection 1...</p>
The way VirtualHere works is
The way VirtualHere works is that the client pings the server every 3 seconds and the server pings the client every 3 seconds. If it misses a few pings the connection is considered broken and the server will close the connection and the client will close its connection. VirtualHere runs over TCP because packets cannot be missed in the USB Protocol. Im not sure what can be done to get a more reliable connection, are you running it over a VPN? Perhaps if you run it over vpn it might be a bit more tolerant of drops, but im not too sure about that but if you can it might be worth a try.
Pings
These are literal ICMP pings?
No they at the TCP level a
No they at the TCP level a packet of about 20 bytes