unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53904: Using an http proxy, derivation failed
@ 2022-02-09 19:21 dal-blazej--- via Bug reports for GNU Guix
  2022-02-12 11:21 ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: dal-blazej--- via Bug reports for GNU Guix @ 2022-02-09 19:21 UTC (permalink / raw)
  To: 53904


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@gnu.org>.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53904: Using an http proxy, derivation failed
  2022-02-09 19:21 bug#53904: Using an http proxy, derivation failed dal-blazej--- via Bug reports for GNU Guix
@ 2022-02-12 11:21 ` Josselin Poiret via Bug reports for GNU Guix
  2022-03-02 14:50   ` dal-blazej--- via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2022-02-12 11:21 UTC (permalink / raw)
  To: dal-blazej, 53904

Hello,
dal-blazej--- via Bug reports for GNU Guix <bug-guix@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53904: Using an http proxy, derivation failed
  2022-02-12 11:21 ` Josselin Poiret via Bug reports for GNU Guix
@ 2022-03-02 14:50   ` dal-blazej--- via Bug reports for GNU Guix
  2022-03-08  8:42     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: dal-blazej--- via Bug reports for GNU Guix @ 2022-03-02 14:50 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 53904


Hi debbugs,

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


* 1 dal to jpoiret

Hi Josselin,

Josselin Poiret <dev@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@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@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53904: Using an http proxy, derivation failed
  2022-03-02 14:50   ` dal-blazej--- via Bug reports for GNU Guix
@ 2022-03-08  8:42     ` Ludovic Courtès
  2022-03-08 19:35       ` dal-blazej--- via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2022-03-08  8:42 UTC (permalink / raw)
  To: dal-blazej; +Cc: 53904

Hi,

dal-blazej@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53904: Using an http proxy, derivation failed
  2022-03-08  8:42     ` Ludovic Courtès
@ 2022-03-08 19:35       ` dal-blazej--- via Bug reports for GNU Guix
  0 siblings, 0 replies; 5+ messages in thread
From: dal-blazej--- via Bug reports for GNU Guix @ 2022-03-08 19:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Josselin Poiret, 53904


Hi,

Ludovic Courtès <ludo@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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-08 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 19:21 bug#53904: Using an http proxy, derivation failed dal-blazej--- via Bug reports for GNU Guix
2022-02-12 11:21 ` Josselin Poiret via Bug reports for GNU Guix
2022-03-02 14:50   ` dal-blazej--- via Bug reports for GNU Guix
2022-03-08  8:42     ` Ludovic Courtès
2022-03-08 19:35       ` dal-blazej--- via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).