Re: go modules fetching problem

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Mon, 08 Aug 2022 10:39:21 UTC
Hi,

First it is nice that you have working ipv6 now. 👍

But I'm still surprised that the download of distfiles choose the IPv6 address while you did not have IPv6 enabled.
This port uses some golang code to fetch the file:
47794  0  S+       0:00.04 | |     `-- make fetch
47899  0  S+       0:03.71 | |       `-- /usr/local/bin/go119 mod download -x all (go)

And the download site has both IPv4 and IPv6 configured.
$ host proxy.golang.com
proxy.golang.com has address 172.217.168.241
proxy.golang.com has IPv6 address 2a00:1450:400e:802::2011
...

These addresses change now and than so it looks like a pool of servers.

The go code seems to have logic to handle the dualstack situation and prefer ipv4 over ipv6 (as far as I understand the code).
https://github.com/golang/go/blob/0f6ee42fe063a48d7825bc03097bbb714aafdb7d/src/net/dial.go#L421

So a possibility for the cause of the problem can be that a server in the pool was not reachable by ipv4 which made the go code fall back to ipv6.
This idea is also strengthened by the fact that the first couple of downloads succeeded.

If you want to dive deeper you might cc the go@FreeBSD.org mailinglist.

Regards,

Ronald.

 
Van: Nuno Teixeira <eduardo@freebsd.org>
Datum: zaterdag, 6 augustus 2022 18:45
Aan: Larry Rosenman <ler@lerctr.org>
CC: Ronald Klop <ronald-lists@klop.ws>, FreeBSD Mailing List <freebsd-ports@freebsd.org>
Onderwerp: Re: go modules fetching problem
> 
> Hi Larry,
>  
> That's a possibility and as always they never notify clients about changes.
>  
> Before I switched to ipv6 on local machine I've tried to disable router ipv6 but thats not possible because there is no option to configured it on web interface nor cmd line interface:
> ---
> /cli> lan/ipv6/show
> +-------------------------+
> |LAN IPV6                 |
> +------------+------------+
> |IPv6        |Status      |
> +------------+------------+
> |Enabled     |Up          |
> +------------+------------+
> ---
>  
> I'm happy that I'm using ipv6 for the first time :)
>  
> Cheers and thanks,
>  
> Larry Rosenman <ler@lerctr.org> escreveu no dia sábado, 6/08/2022 à(s) 16:46:
>> 
>> Is it possible your ISP just enabled IPv6?
>> 
>>  
>> 
>> On 08/06/2022 10:34 am, Nuno Teixeira wrote:
>>> 
>>> Hello,
>>>  
>>> I've found a fix: configure ethernet to ipv6
>>> ---
>>> ifconfig_re0="DHCP"
>>> ifconfig_re0_ipv6="inet6 accept_rtadv"
>>> rtsold_enable="YES"
>>> ---
>>>  
>>> This is very strange because I've never used ipv6 before, and until a couple days 14 current was running fine in ipv4 using re0/iwlwifi0.
>>> Maybe something change in CURRENT?
>>> I'm at latest 1ffd352bc25b
>>>  
>>> Now I need to find a way of using ipv6 on iwlwifi0 because it crashes using "ifconfig_wlan0_ipv6="inet6 accept_rtadv"...
>>>  
>>> Thanks,
>>>  
>>> Nuno Teixeira <eduardo@freebsd.org> escreveu no dia sábado, 6/08/2022 à(s) 11:58:
>>>> 
>>>> Hi Ronald,
>>>>  
>>>> I don't use ipv6.
>>>> ---
>>>> wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>>>>         ether 6c:6a:77:df:09:21
>>>>         inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255
>>>>         groups: wlan
>>>>         ssid MEO-3637C0 channel 60 (5300 MHz 11a) bssid 00:06:91:36:37:c1
>>>>         regdomain ETSI country PT authmode WPA2/802.11i privacy ON
>>>>         deftxkey UNDEF AES-CCM 2:128-bit txpower 24 bmiss 7 mcastrate 6
>>>>         mgmtrate 6 scanvalid 60 wme roaming MANUAL
>>>>         parent interface: iwlwifi0
>>>>         media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
>>>>         status: associated
>>>>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>>> ---
>>>>  
>>>> Ronald Klop <ronald-lists@klop.ws> escreveu no dia sábado, 6/08/2022 à(s) 10:49:
>>>>> 
>>>>> You get an ipv6 address for the host. But the host is not reachable. 
>>>>>  
>>>>> " dial tcp [2a00:1450:4003:80c::2011]:443: conn
>>>>> ect: no route to host"
>>>>>  
>>>>> Is ipv6 properly configured in your network?
>>>>>  
>>>>> Regards,
>>>>> Ronald
>>>>>  
>>>>> Van: Nuno Teixeira <eduardo@freebsd.org>
>>>>> Datum: 6 augustus 2022 00:16
>>>>> Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>
>>>>> Onderwerp: Re: go modules fetching problem
>>>>>> 
>>>>>> (...)
>>>>>>  
>>>>>> Same with poudriere testport, but after some tries modules fetch is complete.
>>>>>>  
>>>>>> Nuno Teixeira <eduardo@freebsd.org> escreveu no dia sexta, 5/08/2022 à(s) 22:31:
>>>>>>> 
>>>>>>> Hello,
>>>>>>>  
>>>>>>> For the first time I can't fetch go modules from a port.
>>>>>>> I've tried several ports that uses go:modules and problem is the same.
>>>>>>> What could be the problem?
>>>>>>>  
>>>>>>> ---
>>>>>>> $ make distclean makesum:
>>>>>>>  
>>>>>>> ===>  Cleaning for gomplate-3.11.2
>>>>>>> ===>  Cleaning Go module cache
>>>>>>> ===>  Deleting distfiles for gomplate-3.11.2
>>>>>>> ===>  License MIT accepted by the user
>>>>>>> ===>  License MIT accepted by the user
>>>>>>> ===>   gomplate-3.11.2 depends on file: /usr/local/sbin/pkg - found
>>>>>>> ===>   gomplate-3.11.2 depends on file: /usr/local/bin/go119 - found
>>>>>>> ===>   gomplate-3.11.2 depends on package: ca_root_nss>0 - found
>>>>>>> => v3.11.2.mod doesn't seem to exist in /tmp/go/sysutils_gomplate/gomplate-v3.11.2.
>>>>>>> => Attempting to fetch https://proxy.golang.org/github.com/hairyhenderson/gomplate/v3/@v/v3.11.2.mod
>>>>>>> v3.11.2.mod                                           7063  B   51 MBps    00s
>>>>>>> => v3.11.2.zip doesn't seem to exist in /tmp/go/sysutils_gomplate/gomplate-v3.11.2.
>>>>>>> => Attempting to fetch https://proxy.golang.org/github.com/hairyhenderson/gomplate/v3/@v/v3.11.2.zip
>>>>>>> v3.11.2.zip                                            671 kB 6855 kBps    00s
>>>>>>> ===> Fetching all distfiles required by gomplate-3.11.2 for building
>>>>>>> ===> Fetching github.com/hairyhenderson/gomplate/v3 dependencies
>>>>>>> # get https://proxy.golang.org/github.com/%21shopify/ejson/@v/v1.3.3.mod
>>>>>>> # get https://proxy.golang.org/github.com/%21proton%21mail/go-crypto/@v/v0.0.0-20220517143526-88bb52951d5b.mod
>>>>>>> # get https://proxy.golang.org/github.com/armon/go-radix/@v/v1.0.0.mod
>>>>>>> # get https://proxy.golang.org/cloud.google.com/go/compute/@v/v1.6.1.mod
>>>>>>> # get https://proxy.golang.org/github.com/acomagu/bufpipe/@v/v1.0.3.mod
>>>>>>> # get https://proxy.golang.org/github.com/%21microsoft/go-winio/@v/v0.5.2.mod
>>>>>>> # get https://proxy.golang.org/cloud.google.com/go/@v/v0.102.0.mod
>>>>>>> # get https://proxy.golang.org/github.com/armon/go-metrics/@v/v0.4.0.mod
>>>>>>> # get https://proxy.golang.org/cloud.google.com/go/storage/@v/v1.22.1.mod
>>>>>>> # get https://proxy.golang.org/github.com/apparentlymart/go-cidr/@v/v1.1.0.mod
>>>>>>> # get https://proxy.golang.org/github.com/%21masterminds/goutils/@v/v1.1.1.mod
>>>>>>> # get https://proxy.golang.org/cloud.google.com/go/iam/@v/v0.3.0.mod
>>>>>>> # get https://proxy.golang.org/github.com/acomagu/bufpipe/@v/v1.0.3.mod: Get "https://proxy.golang.org/github.com/acomagu/bufpipe/@v/v1.0.3.mod": dial tcp [2a00:1450:4003:80c::2011]:443: conn
>>>>>>> ect: no route to host
>>>>>>> # get https://proxy.golang.org/cloud.google.com/go/iam/@v/v0.3.0.mod: Get "https://proxy.golang.org/cloud.google.com/go/iam/@v/v0.3.0.mod": dial tcp [2a00:1450:4003:80c::2011]:443: connect: n
>>>>>>> o route to host
>>>>>>> # get https://proxy.golang.org/github.com/apparentlymart/go-cidr/@v/v1.1.0.mod: Get "https://proxy.golang.org/github.com/apparentlymart/go-cidr/@v/v1.1.0.mod": dial tcp [2a00:1450:4003:80c::2
>>>>>>> 011]:443: connect: no route to host
>>>>>>> # get https://proxy.golang.org/github.com/aws/aws-sdk-go-v2/@v/v1.16.4.mod
>>>>>>> # get https://proxy.golang.org/github.com/%21masterminds/goutils/@v/v1.1.1.mod: Get "https://proxy.golang.org/github.com/%21masterminds/goutils/@v/v1.1.1.mod": dial tcp [2a00:1450:4003:80c::2
>>>>>>> 011]:443: connect: no route to host
>>>>>>> ---
>>>>>>>  
>>>>>>> Thanks in advance,
>>>>>>> --
>>>>>>> Nuno Teixeira
>>>>>>> FreeBSD Committer (ports)
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Nuno Teixeira
>>>>>> FreeBSD Committer (ports)
>>>>> 
>>>>> 
>>>>>  
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Nuno Teixeira
>>>> FreeBSD Committer (ports)
>>> 
>>> 
>>> 
>>> --
>>> Nuno Teixeira
>>> FreeBSD Committer (ports)
>> 
>>  
>> 
>> -- 
>> Larry Rosenman                     http://www.lerctr.org/~ler
>> Phone: +1 214-642-9640                 E-Mail: ler@lerctr.org
>> US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106
> 
> 
> 
> --
> Nuno Teixeira
> FreeBSD Committer (ports)