在cherryserver上下载Go的问题

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

Issues downloading Go on cherryserver

问题

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

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

然后我尝试了:

  1. curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  2. 同样返回403错误。以下是输出内容:
  3. curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  4. % Total % Received % Xferd Average Speed Time Time Time Current
  5. Dload Upload Total Spent Left Speed
  6. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 142.250.74.81:443...
  7. * TCP_NODELAY set
  8. * Connected to golang.org (142.250.74.81) port 443 (#0)
  9. * ALPN, offering h2
  10. * ALPN, offering http/1.1
  11. * successfully set certificate verify locations:
  12. * CAfile: /etc/ssl/certs/ca-certificates.crt
  13. CApath: /etc/ssl/certs
  14. } [5 bytes data]
  15. * TLSv1.3 (OUT), TLS handshake, Client hello (1):
  16. } [512 bytes data]
  17. * TLSv1.3 (IN), TLS handshake, Server hello (2):
  18. { [122 bytes data]
  19. * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  20. { [15 bytes data]
  21. * TLSv1.3 (IN), TLS handshake, Certificate (11):
  22. { [10110 bytes data]
  23. * TLSv1.3 (IN), TLS handshake, CERT verify (15):
  24. { [79 bytes data]
  25. * TLSv1.3 (IN), TLS handshake, Finished (20):
  26. { [52 bytes data]
  27. * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  28. } [1 bytes data]
  29. * TLSv1.3 (OUT), TLS handshake, Finished (20):
  30. } [52 bytes data]
  31. * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  32. * ALPN, server accepted to use h2
  33. * Server certificate:
  34. * subject: CN=misc-sni.google.com
  35. * start date: Mar 20 08:22:21 2023 GMT
  36. * expire date: Jun 12 08:22:20 2023 GMT
  37. * subjectAltName: host "golang.org" matched cert's "golang.org"
  38. * issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
  39. * SSL certificate verify ok.
  40. * Using HTTP2, server supports multi-use
  41. * Connection state changed (HTTP/2 confirmed)
  42. * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  43. } [5 bytes data]
  44. * Using Stream ID: 1 (easy handle 0x5565d93edb10)
  45. } [5 bytes data]
  46. > GET /dl/go1.20.3.linux-amd64.tar.gz HTTP/2
  47. > Host: golang.org
  48. > user-agent: curl/7.68.0
  49. > accept: */*
  50. >
  51. { [5 bytes data]
  52. * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  53. { [282 bytes data]
  54. * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  55. { [282 bytes data]
  56. * old SSL session ID is stale, removing
  57. { [5 bytes data]
  58. * Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
  59. } [5 bytes data]
  60. < HTTP/2 403
  61. < content-type: text/html; charset=UTF-8
  62. < referrer-policy: no-referrer
  63. < content-length: 1609
  64. < alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  65. <
  66. { [5 bytes data]
  67. 100 1609 100 1609 0 0 5685 0 --:--:-- --:--:-- --:--:-- 5705
  68. * 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 :

  1. curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  2. And I get 403 as well. Here is the output :
  3. curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  4. % Total % Received % Xferd Average Speed Time Time Time Current
  5. Dload Upload Total Spent Left Speed
  6. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 142.250.74.81:443...
  7. * TCP_NODELAY set
  8. * Connected to golang.org (142.250.74.81) port 443 (#0)
  9. * ALPN, offering h2
  10. * ALPN, offering http/1.1
  11. * successfully set certificate verify locations:
  12. * CAfile: /etc/ssl/certs/ca-certificates.crt
  13. CApath: /etc/ssl/certs
  14. } [5 bytes data]
  15. * TLSv1.3 (OUT), TLS handshake, Client hello (1):
  16. } [512 bytes data]
  17. * TLSv1.3 (IN), TLS handshake, Server hello (2):
  18. { [122 bytes data]
  19. * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  20. { [15 bytes data]
  21. * TLSv1.3 (IN), TLS handshake, Certificate (11):
  22. { [10110 bytes data]
  23. * TLSv1.3 (IN), TLS handshake, CERT verify (15):
  24. { [79 bytes data]
  25. * TLSv1.3 (IN), TLS handshake, Finished (20):
  26. { [52 bytes data]
  27. * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  28. } [1 bytes data]
  29. * TLSv1.3 (OUT), TLS handshake, Finished (20):
  30. } [52 bytes data]
  31. * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  32. * ALPN, server accepted to use h2
  33. * Server certificate:
  34. * subject: CN=misc-sni.google.com
  35. * start date: Mar 20 08:22:21 2023 GMT
  36. * expire date: Jun 12 08:22:20 2023 GMT
  37. * subjectAltName: host "golang.org" matched cert's "golang.org"
  38. * issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
  39. * SSL certificate verify ok.
  40. * Using HTTP2, server supports multi-use
  41. * Connection state changed (HTTP/2 confirmed)
  42. * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  43. } [5 bytes data]
  44. * Using Stream ID: 1 (easy handle 0x5565d93edb10)
  45. } [5 bytes data]
  46. > GET /dl/go1.20.3.linux-amd64.tar.gz HTTP/2
  47. > Host: golang.org
  48. > user-agent: curl/7.68.0
  49. > accept: */*
  50. >
  51. { [5 bytes data]
  52. * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  53. { [282 bytes data]
  54. * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  55. { [282 bytes data]
  56. * old SSL session ID is stale, removing
  57. { [5 bytes data]
  58. * Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
  59. } [5 bytes data]
  60. < HTTP/2 403
  61. < content-type: text/html; charset=UTF-8
  62. < referrer-policy: no-referrer
  63. < content-length: 1609
  64. < alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  65. <
  66. { [5 bytes data]
  67. 100 1609 100 1609 0 0 5685 0 --:--:-- --:--:-- --:--:-- 5705
  68. * 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:

确定