-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: "connectex: invalid argument" when dialing an Artifactory server over IPv6 #42395
Comments
That error likely comes from here: Line 112 in d55e0c1
|
This looks to me like a bug in the (There may also be a bug in |
That means ConnectEx Windows API https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex returned WSAEINVAL. We can add error numbers, for example, WSAEINVAL is 10022 https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2 But I find it is not difficult to search Windows errors by their text. And we cannot replace error text with a number, because text is usually helpful. This error text is not helpful. Alex |
@alexbrainman, I say (We can't tell from that error whether the |
@bcmills I agree that error message is not helpful. But WSAEINVAL is the only information we get from ConnectEx - Windows does not tell us anything else about what is wrong with ConnectEx arguments. If you read documentation https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex it adds
Maybe it helps. But you need to read this information in Microsoft documentation. Windows API does not provide any information but WSAEINVAL. Alex |
Working from home on a company-owned laptop (no admin rights) with Windows 10. From the office everything is OK, from home office the situation is different. The GOPROXY URL is IPv6 and then it gets redirected by the server. I can connect just fine to artifactory (the GOPROXY we use) both from shell and from browser, but "go get" fails with "connectex: invalid argument". The error is very vague and hard to debug.
Here you can see the output from curl, proving everything is ok server side:
curl -vk https://artifactory.domain.com
OutputTCP_NODELAY set
Connected to artifactory.domain.com (ffff:eeee:dddd:cccc::aaa:333) port 443 (#0)
ALPN, offering h2
ALPN, offering http/1.1
successfully set certificate verify locations:
CAfile: C:/PortableGit/mingw64/ssl/certs/ca-bundle.crt
CApath: none
} [5 bytes data]
} [512 bytes data]
{ [108 bytes data]
{ [1719 bytes data]
{ [333 bytes data]
{ [4 bytes data]
} [70 bytes data]
} [1 bytes data]
} [16 bytes data]
{ [16 bytes data]
SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
ALPN, server accepted to use http/1.1
Server certificate:
subject: CN=artifactory.domain.com
start date: Sep 25 02:47:51 2020 GMT
expire date: Sep 24 02:47:51 2024 GMT
issuer: DC=loc; DC=A2; CN=LGTSubCA23
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
} [5 bytes data]
{ [5 bytes data]
< HTTP/1.1 302 Moved Temporarily
< Server: nginx/1.16.1
< Date: Thu, 05 Nov 2020 09:45:45 GMT
< Content-Type: text/html
< Content-Length: 145
< Location: https://artifactory.domain.com/ui/
< Connection: keep-alive
<
{ [145 bytes data]
100 145 100 145 0 0 523 0 --:--:-- --:--:-- --:--:-- 525
<title>302 Found</title>302 Found
nginx/1.16.1
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
(or any go get command)What did you expect to see?
go modules downloaded
What did you see instead?
The text was updated successfully, but these errors were encountered: