在cherryserver上下载Go的问题

huangapple go评论88阅读模式
英文:

Issues downloading Go on cherryserver

问题

我通过terraform在cherryservers上部署了一个Ubuntu服务器,我的公共IP是5.199.161.113。我正在尝试在上面设置Kubernetes,但在下载某些资源时遇到了问题。

执行以下命令:
wget https://storage.googleapis.com/golang/getgo/installer_linux
出现403错误。

然后我尝试了:

curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
同样返回403错误。以下是输出内容:
curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 142.250.74.81:443...
* TCP_NODELAY set
* Connected to golang.org (142.250.74.81) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [10110 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [79 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=misc-sni.google.com
*  start date: Mar 20 08:22:21 2023 GMT
*  expire date: Jun 12 08:22:20 2023 GMT
*  subjectAltName: host "golang.org" matched cert's "golang.org"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x5565d93edb10)
} [5 bytes data]
> GET /dl/go1.20.3.linux-amd64.tar.gz HTTP/2
> Host: golang.org
> user-agent: curl/7.68.0
> accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
< HTTP/2 403 
< content-type: text/html; charset=UTF-8
< referrer-policy: no-referrer
< content-length: 1609
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< 
{ [5 bytes data]
100  1609  100  1609    0     0   5685      0 --:--:-- --:--:-- --:--:--  5705
* Connection #0 to host golang.org left intact


当我尝试以下命令时也遇到了相同的问题:
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg
同样返回403错误。这可能是什么原因导致的?

注意:昨天我在cherryservers上部署了另一台服务器,并没有遇到这个问题,但从那以后每次部署服务器都会出现这个问题。

英文:

I've deployed a server on cherryservers via terraform. It's a ubuntu server and I am behind public IP 5.199.161.113. I'm trying to setup kubernetes on it, but having troubles with downloading some resources.

Executing : wget https://storage.googleapis.com/golang/getgo/installer_linux
returns 403 for some reason

Then I tried :

curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz 
And I get 403 as well. Here is the output : 
curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 142.250.74.81:443...
* TCP_NODELAY set
* Connected to golang.org (142.250.74.81) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [10110 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [79 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=misc-sni.google.com
*  start date: Mar 20 08:22:21 2023 GMT
*  expire date: Jun 12 08:22:20 2023 GMT
*  subjectAltName: host "golang.org" matched cert's "golang.org"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x5565d93edb10)
} [5 bytes data]
> GET /dl/go1.20.3.linux-amd64.tar.gz HTTP/2
> Host: golang.org
> user-agent: curl/7.68.0
> accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
< HTTP/2 403 
< content-type: text/html; charset=UTF-8
< referrer-policy: no-referrer
< content-length: 1609
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< 
{ [5 bytes data]
100  1609  100  1609    0     0   5685      0 --:--:-- --:--:-- --:--:--  5705
* Connection #0 to host golang.org left intact


I had the same issue when trying :
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg
Again 403. What can be the root cause of this

Note*: Yesterday I deployed one other server on cherryservers and didn't have this issue, but from there on each server I deployed had this isse

答案1

得分: 3

您可能因为各种原因遇到了403错误。尝试访问https://stackoverflow.com/questions/19439765/is-there-a-way-to-construct-an-object-using-pyyaml-construct-mapping-after-all-n 获取可能的解决方案。

英文:

You may be experiencing a 403 error for various reasons. Try https://stackoverflow.com/questions/19439765/is-there-a-way-to-construct-an-object-using-pyyaml-construct-mapping-after-all-n for a possible solution.

huangapple
  • 本文由 发表于 2023年4月13日 00:25:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75997793.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定