From: "Claes Wallin" <gnu@clacke.user.lysator.liu.se>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 20402@debbugs.gnu.org
Subject: bug#20402: HTTP and FTP proxies for guix package / guix-daemon
Date: Wed, 1 Jul 2015 16:53:15 +0200 [thread overview]
Message-ID: <CAGv_=BoJ76W5znwb0A845r2r1GSpw4ij46GU7T+KrEbpGcESiA@mail.gmail.com> (raw)
In-Reply-To: <87h9poq6mc.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 4340 bytes --]
Ludovic, sorry for duplicate mail again.
On Jul 1, 2015 4:45 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
> > Yes. This is why the proxy is required. There is no internet DNS for
> > the VM, because it is on an isolated lab network.
>
> Hmm, when using Guile 2.0.11 or later, ‘open-socket-for-uri’ connects to
> the proxy (so its name must be available in DNS lookup), not to the
> target server. The code in (web client) goes like this:
The proxy is in the DNS.
> Do you see the same DNS issue when running:
>
> http_proxy=http://... guix download http://...
Nope. guix download works. It successfully looks up and connects to the
proxy.
When I next have the chance I will report:
1) Results with guix-compiled guix-daemon
2) Results with dev-compiled guix-daemon
3) /gnu/store hash of 1)
On Jul 1, 2015 4:45 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
> "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:
>
> > On Wed, Jul 1, 2015 at 10:19 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> >
> >> To test, I first run the daemon like this:
> >>
> >> sudo sh -c 'export http_proxy=foobar ; ./pre-inst-env guix-daemon
> --build-users-group=guixbuild'
> >
> > Could there be a difference because you are testing with the
> > checked-out, semi-manually built guix and I was checking with a
> > freshly packaged (pull, package -i guix) guix? Like I said in
> > http://lists.gnu.org/archive/html/bug-guix/2015-06/msg00036.html ,
> > guix-daemon as compiled by guix seems to be using guile-2.0.9. Maybe
> > that only happens due to guix rewriting hashbangs etc, and on a build
> > outside guix (even when using guix environment) it uses whatever guile
> > happens to be in the paths?
>
> Could you send the store file name of Guix that is being used?
> For instance, I have:
>
> --8<---------------cut here---------------start------------->8---
> $ sudo deco status guix-daemon
> Pasvorto:
> Status of guix-daemon:
> It is started.
> Running value is 31316.
> It is enabled.
> Provides (guix-daemon).
> Requires (user-processes).
> Conflicts with ().
> Will be respawned.
> $ ps 31316
> PID TTY STAT TIME COMMAND
> 31316 ? Ss 0:00
> /gnu/store/zg6j61inmmk5kyqgyfjnj7rdxl79i9ps-guix-0.8.2.684bf7c/bin/guix-daemon
> --build-users-group guixbu
> --8<---------------cut here---------------end--------------->8---
>
> That means I’m using commit 684bf7c of Guix, which has the fix, which
> came up after the http_proxy commit (commit 0d88313.)
>
> >>> No. Whenever the daemon is doing the downloading, http_proxy is
> >>> ignored and I get "Temporary failure in name resolution" because the
> >>> VM doesn't have an internet DNS.
> >>
> >> [...]
> >>
> >>> `/gnu/store/2zkyyw4bq0wzsxdysncrf9lmwl44w5wh-binutils-2.25.tar.bz2'
> >>> from `http://ftpmirror.gnu.org/binutils/binutils-2.25.tar.bz2'...
> >>> ERROR: In procedure getaddrinfo: Temporary failure in name resolution
> >>
> >> That’s another, unrelated issue, probably in your network or on your
> >> machine.
> >
> > Yes. This is why the proxy is required. There is no internet DNS for
> > the VM, because it is on an isolated lab network.
>
> Hmm, when using Guile 2.0.11 or later, ‘open-socket-for-uri’ connects to
> the proxy (so its name must be available in DNS lookup), not to the
> target server. The code in (web client) goes like this:
>
> --8<---------------cut here---------------start------------->8---
> (define (open-socket-for-uri uri-or-string)
> "Return an open input/output port for a connection to URI."
> (define http-proxy (current-http-proxy))
> (define uri (ensure-uri (or http-proxy uri-or-string))) ;← proxy
> (define addresses
> (let ((port (uri-port uri)))
> (delete-duplicates
> (getaddrinfo (uri-host uri)
> (cond (port => number->string)
> (else (symbol->string (uri-scheme uri))))
> (if port
> AI_NUMERICSERV
> 0))
> ;; ...
> --8<---------------cut here---------------end--------------->8---
>
> Do you see the same DNS issue when running:
>
> http_proxy=http://... guix download http://...
>
> ?
>
> Thanks,
> Ludo’.
>
[-- Attachment #2: Type: text/html, Size: 5622 bytes --]
prev parent reply other threads:[~2015-07-01 14:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 22:03 HTTP and FTP proxies for guix package / guix-daemon Claes Wallin (韋嘉誠)
2015-06-09 1:11 ` Claes Wallin (韋嘉誠)
2015-06-09 1:14 ` Claes Wallin (韋嘉誠)
2015-06-10 19:35 ` Ludovic Courtès
[not found] ` <CAGv_=BriLNSHy2MgPioh_hv4xQJSyVXKniOCVTgOsdUTGpU2eA@mail.gmail.com>
[not found] ` <87616uzfd8.fsf@gnu.org>
[not found] ` <CAGv_=Bo3rdx1GQ3n7mZrT6io9giiSPU0g8SLDZ_BgNVWJrmuPg@mail.gmail.com>
2015-06-13 17:44 ` bug#20402: " Ludovic Courtès
2015-06-17 16:46 ` Claes Wallin
2015-06-17 16:51 ` Claes Wallin
2015-07-01 8:19 ` Ludovic Courtès
2015-07-01 13:08 ` Claes Wallin
2015-07-01 14:45 ` Ludovic Courtès
2015-07-01 14:53 ` Claes Wallin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGv_=BoJ76W5znwb0A845r2r1GSpw4ij46GU7T+KrEbpGcESiA@mail.gmail.com' \
--to=gnu@clacke.user.lysator.liu.se \
--cc=20402@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.