diff --git a/gns3server/compute/dynamips/dynamips_hypervisor.py b/gns3server/compute/dynamips/dynamips_hypervisor.py index 1eb9ae77..1973522a 100644 --- a/gns3server/compute/dynamips/dynamips_hypervisor.py +++ b/gns3server/compute/dynamips/dynamips_hypervisor.py @@ -276,6 +276,9 @@ class DynamipsHypervisor: log.warning("Connection reset received while reading Dynamips response: {}".format(e)) continue if not chunk: + if self.is_running(): + log.warning("No data returned from {host}:{port}".format(host=self._host, port=self._port)) + continue raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}" .format(host=self._host, port=self._port, run=self.is_running())) buf += chunk.decode("utf-8", errors="ignore") diff --git a/gns3server/ubridge/ubridge_hypervisor.py b/gns3server/ubridge/ubridge_hypervisor.py index 6299d22c..37533750 100644 --- a/gns3server/ubridge/ubridge_hypervisor.py +++ b/gns3server/ubridge/ubridge_hypervisor.py @@ -222,7 +222,16 @@ class UBridgeHypervisor: # task has been canceled but continue to read # any remaining data sent by the hypervisor continue + except ConnectionResetError as e: + # Sometimes WinError 64 (ERROR_NETNAME_DELETED) is returned here on Windows. + # These happen if connection reset is received before IOCP could complete + # a previous operation. Ignore and try again.... + log.warning("Connection reset received while reading uBridge response: {}".format(e)) + continue if not chunk: + if self.is_running(): + log.warning("No data returned from {host}:{port}".format(host=self._host, port=self._port)) + continue raise UbridgeError("No data returned from {host}:{port}, uBridge process running: {run}" .format(host=self._host, port=self._port, run=self.is_running())) buf += chunk.decode("utf-8")