[Top][All Lists]

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

Re: guix copy fails due to "Protocol error"

From: Chris Marusich
Subject: Re: guix copy fails due to "Protocol error"
Date: Tue, 12 Feb 2019 04:46:53 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


I'm replying to myself, since I have more information.

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= /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 guile --version", it would fail:

  $ ssh guile --version
  bash: guile: command not found

I can understand how this might result in a "protocol error" if Guix was
expecting to see guix-daemon protocol messages instead.  By the way, I'm
using "guile" installed via Guix on

I resolved the immediate issue by arranging for "guile" to be present (I
modified my ~/.bashrc file to put it on PATH):

  $ ssh guile --version
  guile (GNU Guile) 2.2.4
  Copyright (C) 2018 Free Software Foundation, Inc.

  License LGPLv3+: GNU LGPL 3 or later <>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

Now that guile is actually available, I get a different error when I try
to run "guix copy":

--8<---------------cut here---------------start------------->8---
$ guix copy --to= asunder
sending 26 store items (95 MiB) to ''...
;;; [2019/02/12 04:40:42.475803, 0] write_to_channel_port: [GSSH ERROR] Remote 
channel is closed: #<input-output: channel (open) 296e0a0>
           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)'.
--8<---------------cut here---------------end--------------->8---

On the daemon side, I see messages like the following, so I know the
connection is succeeding, at least at first:

--8<---------------cut here---------------start------------->8---
accepted connection from pid 20301, user marusich
accepted connection from pid 20305, user marusich
--8<---------------cut here---------------end--------------->8---

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).

By the way, I tried spinning up a Guix System VM, and when I use "guix
copy", it just works - so this problem is specific to my foreign
distribution (Debian 9).


Attachment: signature.asc
Description: PGP signature

reply via email to

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