GNU bug report logs - #53904
Using an http proxy, derivation failed

Previous Next

Package: guix;

Reported by: dal-blazej <at> onenetbeyond.org

Date: Wed, 9 Feb 2022 19:23:02 UTC

Severity: normal

To reply to this bug, email your comments to 53904 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#53904; Package guix. (Wed, 09 Feb 2022 19:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to dal-blazej <at> onenetbeyond.org:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 09 Feb 2022 19:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: bug-guix <at> gnu.org
Subject: Using an http proxy, derivation failed
Date: Wed, 09 Feb 2022 20:21:23 +0100
Hi,

I am trying to get Guix in a QubesOS/debian 11 template.  QubesOS expose a proxy
in its templates, used mostly by apt and dnf.

For some reason all my attempts to modify the systemd unit were
un-successful so I simply exported it on the command line. However as
you can see in the following backtrace, that is not working as expected.

$ export https_proxy=http://localhost:8082/ ; guix pull
hint: Consider installing the `glibc-locales' package and defining `GUIX_LOCPATH', along these lines:

     guix install glibc-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	515406f
Computing Guix derivation for 'x86_64-linux'... \substitute: hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and
substitute: defining `GUIX_LOCPATH', along these lines:
substitute: 
substitute:      guix install glibc-utf8-locales
substitute:      export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
substitute: 
substitute: See the "Application Setup" section in the manual, for more info.
substitute: 
hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and
defining `GUIX_LOCPATH', along these lines:

     guix install glibc-utf8-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

guix substitute: error: host name lookup error: Name or service not known
Backtrace:
          14 (primitive-load "/gnu/store/m8ipcivlnaqr4y9hpxiiqi2pn1wldcia-compute-guix-derivation")
In ice-9/eval.scm:
    155:9 13 (_ _)
    159:9 12 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (guile-u?> ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
In ice-9/boot-9.scm:
    152:2 11 (with-fluid* _ _ _)
    152:2 10 (with-fluid* _ _ _)
In ./guix/store.scm:
  2129:24  9 (run-with-store #<store-connection 256.99 7400779ab140> #<procedure 740061d42d20 at ./guix/self.scm:12?> ?)
   1966:8  8 (_ #<store-connection 256.99 7400779ab140>)
In ./guix/gexp.scm:
   296:22  7 (_ #<store-connection 256.99 7400779ab140>)
   1180:2  6 (_ #<store-connection 256.99 7400779ab140>)
   1046:2  5 (_ #<store-connection 256.99 7400779ab140>)
    892:4  4 (_ #<store-connection 256.99 7400779ab140>)
In ./guix/store.scm:
  2014:12  3 (_ #<store-connection 256.99 7400779ab140>)
   1406:5  2 (map/accumulate-builds #<store-connection 256.99 7400779ab140> #<procedure 740072c0d640 at ./guix/stor?> ?)
  1421:15  1 (_ #<store-connection 256.99 7400779ab140> ("/gnu/store/gmi62pbnf0jfish26chd7pvfzs2rzlxa-guile-ssh-?" ?) ?)
  1421:15  0 (loop #f)

./guix/store.scm:1421:15: In procedure loop:
ERROR:
  1. &store-protocol-error:
      message: "some substitutes for the outputs of derivation `/gnu/store/ak595vg1ij7vf3vxx3srk60dvwz6zxry-gnutls-3.7.2.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source "
      status: 1
guix pull: error: You found a bug: the program '/gnu/store/m8ipcivlnaqr4y9hpxiiqi2pn1wldcia-compute-guix-derivation'
failed to compute the derivation for Guix (version: "515406f20f0f2a69f8701ce3ece8121dbc4fb5dd"; system: "x86_64-linux";
host version: "4578ad78bee1dfd450962627ae66d3e15ebadad2"; pull-version: 1).
Please report the COMPLETE output above by email to <bug-guix <at> gnu.org>.




Information forwarded to bug-guix <at> gnu.org:
bug#53904; Package guix. (Sat, 12 Feb 2022 11:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 53904 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: dal-blazej <at> onenetbeyond.org, 53904 <at> debbugs.gnu.org
Subject: Re: bug#53904: Using an http proxy, derivation failed
Date: Sat, 12 Feb 2022 12:21:07 +0100
Hello,
dal-blazej--- via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:

> Hi,
>
> I am trying to get Guix in a QubesOS/debian 11 template.  QubesOS expose a proxy
> in its templates, used mostly by apt and dnf.
>
> For some reason all my attempts to modify the systemd unit were
> un-successful so I simply exported it on the command line. However as
> you can see in the following backtrace, that is not working as expected.

As noted in the manual, the guix daemon itself (and not the commands
that communicate with it) needs to have the https_proxy environment
variable set.  What went wrong while modifying the systemd unit?

Best,
-- 
Josselin Poiret




Information forwarded to bug-guix <at> gnu.org:
bug#53904; Package guix. (Wed, 02 Mar 2022 14:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 53904 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 53904 <at> debbugs.gnu.org
Subject: Re: bug#53904: Using an http proxy, derivation failed
Date: Wed, 02 Mar 2022 15:50:08 +0100
Hi debbugs,

The following mails was not CC to 53904 <at> debbugs.gnu.org so let's correct
that :


* 1 dal to jpoiret

Hi Josselin,

Josselin Poiret <dev <at> jpoiret.xyz> writes:
> What went wrong while modifying the systemd unit?

The systemd unit file from debian looks like that
(I only added the https_proxy, with localhost or 127.0.0.1, with or
without the leading http://):

#+begin_src conf :tangle "/etc/systemd/system/guix-daemon.service"
# This is a "service unit file" for the systemd init system to launch
# 'guix-daemon'.  Drop it in /etc/systemd/system or similar to have
# 'guix-daemon' automatically started.

[Unit]
Description=Build daemon for GNU Guix

[Service]
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
Environment='GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8 'https_proxy=http://localhost:8082/'
RemainAfterExit=yes
StandardOutput=syslog
StandardError=syslog

# See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>.
# Some package builds (for example, go <at> 1.8.1) may require even more than
# 1024 tasks.
TasksMax=8192

[Install]
WantedBy=multi-user.target
#+end_src

After reloading the daemons and restarting the daemon :

guix pull: error: failed to connect to `/var/guix/daemon-socket/socket': Connection refused

By the way, I previously tested the proxy itself via wget and it
works. I also tried some others variations on the unit file without more success.


* 2 jpoiret to dal

Hello,

dal-blazej <at> onenetbeyond.org writes:
> After reloading the daemons and restarting the daemon :
>
> guix pull: error: failed to connect to `/var/guix/daemon-socket/socket': Connection refused
>
> By the way, I previously tested the proxy itself via wget and it
> works. I also tried some others variations on the unit file without more success.

I'm not very familiar with the Debian Guix package, but can you check
that /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon does
indeed exist?  If not, you may need to log-in as root, and run `guix
pull` there.  Did the systemd unit ever work, and if not, how do you run
the Guix daemon?

Best,
-- 
Josselin Poiret


* 3 dal to jpoiret

Thanks for your help Josselin.

I precise that I am able to run guix in a debian standaloneVM without proxy.

I feared to have messed up something in that template so I started again
from scratch.

- I modified /usr/lib/systemd/system/guix-daemon.service and
  /usr/lib/systemd/system/guix-publish.service to use
  https_proxy=http:///127.0.0.1:8082

> I'm not very familiar with the Debian Guix package, but can you check
> that /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon does
> indeed exist?
- /var/guix/profiles/per-user/root/current-guix doesn't exist.

> If not, you may need to log-in as root, and run `guix pull` there.
- guix pull (as user or root) :

#+begin_exemple
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: Git error: failed to resolve address for
git.savannah.gnu.org: Temporary failure in name resolution
#+end_exemple


I am still able to use my proxy with wget.

> Did the systemd unit ever work, and if not, how do you run
> the Guix daemon?
- guix-daemon.service is now running without error.

- guix-publish.service throw an error (but I guess it is another issue):

#+begin_exemple
● guix-publish.service - Publish the GNU Guix store
     Loaded: loaded (/lib/systemd/system/guix-publish.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-02-17 16:44:00 CET; 7min ago
    Process: 7397 ExecStart=/usr/bin/guix publish --user=nobody --port=8181 (code=exited, status=1/FAILURE)
   Main PID: 7397 (code=exited, status=1/FAILURE)
        CPU: 184ms

Feb 17 16:44:00 localhost systemd[1]: Started Publish the GNU Guix store.
Feb 17 16:44:00 localhost guix[7397]: guix publish: error: open-file: No such file or directory: "/etc/guix/signing-key.pub"
Feb 17 16:44:00 localhost systemd[1]: guix-publish.service: Main process exited, code=exited, status=1/FAILURE
Feb 17 16:44:00 localhost systemd[1]: guix-publish.service: Failed with result 'exit-code'.
#+end_exemple




Information forwarded to bug-guix <at> gnu.org:
bug#53904; Package guix. (Tue, 08 Mar 2022 08:43:02 GMT) Full text and rfc822 format available.

Message #14 received at 53904 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: dal-blazej <at> onenetbeyond.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 53904 <at> debbugs.gnu.org
Subject: Re: bug#53904: Using an http proxy, derivation failed
Date: Tue, 08 Mar 2022 09:42:10 +0100
Hi,

dal-blazej <at> onenetbeyond.org skribis:

> The systemd unit file from debian looks like that
> (I only added the https_proxy, with localhost or 127.0.0.1, with or
> without the leading http://):

[...]

> [Service]
> ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
> Environment='GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8 'https_proxy=http://localhost:8082/'

Looks good to me.

> After reloading the daemons and restarting the daemon :
>
> guix pull: error: failed to connect to `/var/guix/daemon-socket/socket': Connection refused

This suggests that guix-daemon is not running.  Could it be that it
failed to start?  Does ‘journalctl -u guix-daemon.service’ contain any
clue?

BTW, according to the output you pasted earlier (in particular the noisy
locale warnings), it seems that your daemon needs an update.  Check out
<https://guix.gnu.org/manual/devel/en/html_node/Upgrading-Guix.html>.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#53904; Package guix. (Tue, 08 Mar 2022 19:37:02 GMT) Full text and rfc822 format available.

Message #17 received at 53904 <at> debbugs.gnu.org (full text, mbox):

From: dal-blazej <at> onenetbeyond.org
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 53904 <at> debbugs.gnu.org
Subject: Re: bug#53904: Using an http proxy, derivation failed
Date: Tue, 08 Mar 2022 20:35:55 +0100
Hi,

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

>> guix pull: error: failed to connect to `/var/guix/daemon-socket/socket': Connection refused
>
> This suggests that guix-daemon is not running.  Could it be that it
> failed to start?  Does ‘journalctl -u guix-daemon.service’ contain any
> clue?
>
> BTW, according to the output you pasted earlier (in particular the noisy
> locale warnings), it seems that your daemon needs an update.  Check out
> <https://guix.gnu.org/manual/devel/en/html_node/Upgrading-Guix.html>.

Yes It needs an update but it can't. That's the issue ;)

Sorry, I think my CC error has lead to some confusion.

My last mail stated I started from scratch (new virtual machine, new
guix installation) :
- with the https_proxy defined inside the systems service file.
- with the daemon running
So please, ignore the first errors.

In this case the error seems clearly that :
$ guix pull
use git, and _guix does not pass to git the https_proxy_.

Fortunately I can update by passing the https_proxy on the command:
$ https_proxy=https://127.0.0.1:8082 guix pull

To make it clear, both the variable in the systemd service file and on
the command line are necessary to successfully run guix pull.

But as you stated it shouldn't, it still looks like a bug.




This bug report was last modified 2 years and 50 days ago.

Previous Next


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