diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index 7b01740d..940aeab6 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -615,7 +615,10 @@ class DockerVM(BaseNode): raise DockerError("Please install TigerVNC server (recommended) or Xvfb + x11vnc before using VNC support") await self._start_vnc_process() x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display)) - await wait_for_file_creation(x11_socket) + try: + await wait_for_file_creation(x11_socket) + except asyncio.TimeoutError: + raise DockerError('x11 socket file "{}" does not exist'.format(x11_socket)) if not hasattr(sys, "_called_from_test") or not sys._called_from_test: # Start vncconfig for tigervnc clipboard support, connection available only after socket creation. diff --git a/gns3server/utils/asyncio/__init__.py b/gns3server/utils/asyncio/__init__.py index 515f2d85..f0f6a626 100644 --- a/gns3server/utils/asyncio/__init__.py +++ b/gns3server/utils/asyncio/__init__.py @@ -126,7 +126,7 @@ def monitor_process(process, termination_callback): asyncio.ensure_future(_check_process(process, termination_callback)) -async def wait_for_file_creation(path, timeout=10): +async def wait_for_file_creation(path, timeout=60): while timeout > 0: if os.path.exists(path):