go mod初始化githubcomgin-gonicgin module githubcomgin-gonicgin Get http1017249218081repositorygolanggithubcomgin-gonicginvlist dial tcp 1017249218081 connect connection refused
The error message indicates that there is a connection issue when trying to initialize the Go module for the github.com/gin-gonic/gin package. It seems that the host 10.172.49.21 on port 8081 is refusing the connection.
Here are a few steps you can take to troubleshoot the issue:
-
Check if the host
10.172.49.21is accessible and running on port8081. Make sure there are no firewall rules or network restrictions preventing the connection. -
Ensure that the Go module proxy or repository server at
10.172.49.21:8081is properly configured and running. Verify that it supports the Go module protocol and can serve the required module versions. -
If you are behind a corporate network or using a proxy, make sure the necessary network configurations are in place for Go to access external resources. You might need to set environment variables like
HTTP_PROXYandHTTPS_PROXYto the appropriate values. -
If you have a local Go proxy or module mirror configured, ensure that it is correctly set up and reachable.
If none of the above steps resolve the issue, it might indicate a problem with the server hosting the module or a temporary network issue. In such cases, you can try again later or contact the server administrator for further assistance
原文地址: http://www.cveoy.top/t/topic/i0pl 著作权归作者所有。请勿转载和采集!