Bug 36063 - Disconnect after period of time over SSH
Summary: Disconnect after period of time over SSH
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
Depends on:
Reported: 2015-11-19 14:57 UTC by Cody Beyer (MSFT)
Modified: 2017-07-24 18:33 UTC (History)
12 users (show)

Tags: _XVS1215
Is this bug a regression?: ---
Last known good build:

additional logs for disconnect issue (23.40 KB, application/octet-stream)
2015-11-25 13:15 UTC, mfulker
logs from diagnostic build (421.10 KB, application/octet-stream)
2015-11-25 18:59 UTC, mfulker

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Cody Beyer (MSFT) 2015-11-19 14:57:03 UTC
### Description

After working within VS for multiple hours, the SSH connection to Mac appears to disconnect, and does not recover upon attempting to reconnect

### Logs


### Steps to Reproduce

1. Ensure both Mac and Windows are on Cycle 6
2. Connect to make using Name.local
3. Working within Visual Studio for ~2 hours

### Expected Results

The connection should stay current throughout that time frame

### Actual Results

The connection severs, and attempts to reconnect fail. mac needs to be added as a new server

### Versions

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Professional

Visual Basic 2015 00322-40000-00000-AA037
Microsoft Visual Basic 2015

Visual C# 2015 00322-40000-00000-AA037
Microsoft Visual C# 2015

Visual C++ 2015 00322-40000-00000-AA037
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013 5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest 1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio 1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JetBrains ReSharper Ultimate 2015.2 Build 103.0.20150818.200216
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright (c) 2015 JetBrains, Inc.

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager 3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps 14.0.23309.00 d14oob
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualSVN 5.0.0
Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
Copyright (c) 2005-2015 VisualSVN Ltd. All rights reserved.

VSdocman 7.0
Documentation generator and code commenter.
Copyright (c) Helixoft

Xamarin (f860fe4)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (3efa14c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (3c0ec35)
Visual Studio extension to enable development for Xamarin.iOS.


=== Xamarin Studio ===

Version 5.10 (build 871)
Installation UUID: 75d8af3d-55ad-4008-acaa-d516dac5380a
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.1.1 (9081)
Build 7B1005

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 3c0ec35
Branch: master
Build date: 2015-11-12 13:05:39-0500

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 510000871
Git revision: 4e9c5abb5ffdae12ba02ac49da83f8b2011dbb88
Build date: 2015-11-12 06:02:54-05
Xamarin addins: 55007ed0e56436f385d8e26394a45be563abc7e8
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.1
Darwin Codys-MBP.router 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-19 17:19:14 UTC
For reference, the original customer report was from:
Comment 8 mfulker 2015-11-25 13:15:03 UTC
Created attachment 13995 [details]
additional logs for disconnect issue
Comment 9 mfulker 2015-11-25 13:17:33 UTC
Seemingly unable to reproduce after using diagnostic build http://xvs.xamarin.com/Xamarin.VisualStudio_4.0.0.1692.msi 

I have a coworker that encounters the same or similar disconnect issues much more frequently, I had him install the same and his logs are attached above.
Comment 10 mfulker 2015-11-25 18:59:32 UTC
Created attachment 14001 [details]
logs from diagnostic build

Followup: Was eventually able to reproduce with that diagnostic build. Logs attached.
Comment 14 mfulker 2015-12-17 18:15:24 UTC
Are the improvements in the latest public build? (Xamarin.VisualStudio_4.0.0.1717.msi)
Or does "Please check" just refer to internal testing?
Comment 15 Jose Gallardo 2015-12-18 20:02:25 UTC
Just made @mag's comments private, as those improvements are not yet present in any public version.
That said, there are other improvements already on the latest public alpha (, addressing other issues that in some cases might end up with a similar error.
It might be worth a try.

Thanks for asking!
Comment 18 Jose Gallardo 2016-06-15 04:43:52 UTC
There were several improvements around SSH connectivity in our latest stable build (, which should address this issue.
Marking the bug as resolved, but please feel free to reopen it if you're still seeing this issue with latest builds.

Comment 19 steott 2017-07-24 07:32:44 UTC
This "disconnection" issue is still happening to me several times per day.

I've noticed that a lot of times the disconnection happens during a strange situation that I have with Parallels Desktop.
Every one or two hours, my Windows virtual machine changes automatically time just for a few seconds (e.g. if it's 8:30 AM, it goes to 10:30 AM), and then it goes automatically back to the right time. 
I haven't understood yet what is causing this problem, I've even opened a ticket on Parallels Forum, but I haven't solved yet the problem.

Anyway, when this issue happens, Visual Studio disconnects from the Mac Build Agent (hosted in the same physical machine), and there is no way to reconnect to it without closing Visual Studio.
As soon as I close Visual Studio and open again the project, it reconnects to the Mac Build Agent, but then I have to execute at least a rebuild (sometimes even more than one) to have the correct version compiled.

This "disconnection" issue is not a stopping one (I can solve it by closing Visual Studio, open again the project, do a rebuild), but it's quite frustrating, because it makes me lose some minutes and, worst of all, concentration :(  
If Visual Studio could reconnect automatically to the host, and don't require the rebuild, it would be way better.

I have the last stable version of every software (Windows 10, MacOS X, Visual Studio 2017, Xamarin iOS, ...).

This are the logs from Visual Studio:

Starting connection to Mac
Starting Broker in port 55066...
Connection successfully established with the Mac
Starting agents on Mac Stefano’s MacBookPro (
Starting Agent IDB
Starting Agent Build
Agent Build is running
Agent IDB is running
Connected to the Mac Stefano’s MacBookPro ( with Full support.
Disconnected from the Mac Stefano’s MacBookPro (
The underlying client has been disconnected by the remote host
Starting reconnection...
Starting connection to Mac
Disconnected from the Mac Stefano’s MacBookPro (
Starting connection to Mac
Starting Broker in port 52938...
Disconnected from the Mac Stefano’s MacBookPro (
Comment 20 Brendan Zagaeski (Xamarin Team, assistant) 2017-07-24 18:33:56 UTC
For Comment 19, note that this bug report can be considered closed at this time because the original report and the last comment on the bug (Comment 18) are both old.  For new appearances of similar symptoms, please file a new bug reports.

In short, for further investigation of the symptoms described in Comment 19, please re-file that comment in its own new bug report.  Thanks in advance!