help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix copy fails due to "Protocol error"


From: Ludovic Courtès
Subject: Re: guix copy fails due to "Protocol error"
Date: Tue, 12 Feb 2019 17:49:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Chris,

Chris Marusich <address@hidden> skribis:

> Chris Marusich <address@hidden> writes:
>
>> I'm trying to use "guix copy" to copy store items from host A to host B.
>> Host A and B are both on the same LAN.  Host A uses GuixSD, and host B
>> uses Guix installed on Debian.  No matter what I do, I get a message
>> like the following:
>>
>> $ /gnu/store/xfrqrgazg0y7qn6k2d6psg5ssws4zs5w-guix-0.16.0-9.4bddd12/bin/guix 
>> copy --to=192.168.1.105 /gnu/store/dpiq9gj0d8jd8qs0q9sdsm9npyjm684n-profile
>> guix copy: error: failed to connect to `#<input-output: channel (open) 
>> 26de6a0>': Protocol error
>
> This particular error was occurring because "guile" was not available in
> PATH.  If I SSH in normally, "guile" is there, but if I invoke a command
> like "ssh 192.168.1.105 guile --version", it would fail:
>
>   $ ssh 192.168.1.105 guile --version
>   bash: guile: command not found

Nowadays you also need to have ‘guix’ in $PATH in addition to ‘guile’.
Make sure:

  ssh HOST guix repl --version

also works.

> $ guix copy --to=192.168.1.105 asunder
> sending 26 store items (95 MiB) to '192.168.1.105'...
> ;;; [2019/02/12 04:40:42.475803, 0] write_to_channel_port: [GSSH ERROR] 
> Remote channel is closed: #<input-output: channel (open) 296e0a0>
> Backtrace:
>            8 (primitive-load "/home/marusich/.config/guix/current/bi…")
> In guix/ui.scm:
>   1647:12  7 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>     829:9  6 (catch _ _ #<procedure 7f2e5aaf39b0 at guix/ui.scm:617…> …)
>     829:9  5 (catch _ _ #<procedure 7f2e5aaf39c8 at guix/ui.scm:743…> …)
> In guix/status.scm:
>     807:4  4 (call-with-status-report _ _)
> In guix/scripts/copy.scm:
>     81:27  3 (send-to-remote-host _ _)
> In guix/ssh.scm:
>     313:4  2 (send-files #<store-connection 256.99 2ba4f00> _ _ # _ # …)
> In guix/store.scm:
>    1504:7  1 (export-paths #<store-connection 256.99 2ba4f00> _ #<i…> …)
> In unknown file:
>            0 (put-bytevector #<input-output: channel (open) 296e0a0> …)
>
> ERROR: In procedure put-bytevector:
> Throw to key `guile-ssh-error' with args `("write_to_channel_port" "Remote 
> channel is closed" #<input-output: channel (open) 296e0a0> #f)'.
>
>
> On the daemon side, I see messages like the following, so I know the
> connection is succeeding, at least at first:
>
> accepted connection from pid 20301, user marusich
> accepted connection from pid 20305, user marusich
>
> I suppose I'll have to debug the guile process running on the remote end
> to figure out why the remote end seems to have closed.  The details seem
> to be in the remote-daemon-channel procedure in (guix ssh).

Hmm.  You could “strace -f -p $(pidof sshd)” on the remote machine, and
then start ‘guix copy’.  That’ll show you what processes get started and
how they fail.

The conclusion is that error handling in ‘guix copy’ is… lacking.  ‘guix
offload test’ greatly helps troubleshoot this kind of issues, but only
if you have a machines.scm file at hand.

HTH,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]