GNU bug report logs - #48240
“guix copy” to host with daemon listening on TCP fails

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Wed, 5 May 2021 16:05:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 48240 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#48240: [PATCH 2/4] ssh: 'connect-to-remote-daemon' raises a nicer message upon error.
Date: Wed,  5 May 2021 23:32:03 +0200
* guix/ssh.scm (connect-to-remote-daemon): Catch
'store-connection-error?' and rethrow.
---
 guix/ssh.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/guix/ssh.scm b/guix/ssh.scm
index 457d1890f9..b39b90f733 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -302,8 +302,13 @@ EXP never returns or calls 'primitive-exit' when it's done."
                                     "/var/guix/daemon-socket/socket"))
   "Connect to the remote build daemon listening on SOCKET-NAME over SESSION,
 an SSH session.  Return a <store-connection> object."
-  (open-connection #:port (remote-daemon-channel session socket-name)))
-
+  (guard (c ((store-connection-error? c)
+             ;; Raise a more focused error condition.
+             (raise (formatted-message
+                     (G_ "failed to connect over SSH to daemon at '~a', socket ~a")
+                     (session-get session 'host)
+                     socket-name))))
+    (open-connection #:port (remote-daemon-channel session socket-name))))
 
 (define (store-import-channel session)
   "Return an output port to which archives to be exported to SESSION's store
-- 
2.31.1





This bug report was last modified 4 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.