opencensus-go icon indicating copy to clipboard operation
opencensus-go copied to clipboard

thirft unreachable

Open neumachen opened this issue 5 years ago • 10 comments

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

go.opencensus.io v0.22.0

What version of Go are you using?

go 1.12

What did you do?

If possible, provide a recipe for reproducing the error. go get -u github.com/opencensus-go

What did you expect to see?

successful go get

What did you see instead?

go: git.apache.org/[email protected]: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/foo/projekts/pkg/mod/cache/vcs/83dba939f95a790e497d565fc4418400145a1a514f955fa052f662d56e920c3e: exit status 128:
        fatal: unable to access 'https://git.apache.org/thrift.git/': Failed to connect to git.apache.org port 443: Connection timed out

Additional context

Add any other context about the problem here.

neumachen avatar Sep 01 '19 10:09 neumachen

http://git.apache.org/ is downed...

but go get -u go.opencensus.io is fine. I'm having trouble with the same problem but I don't know where the package came from...

vvakame avatar Sep 02 '19 01:09 vvakame

We have same issue. In our case, the cause was the https://github.com/opencensus-integrations/gomongowrapper repository.

ryoya-fujimoto avatar Sep 02 '19 03:09 ryoya-fujimoto

Hello guys Our all deployments are stucked by unavailable apache.org/thrift packet... Now we can not make a build..

muratsplat avatar Sep 02 '19 09:09 muratsplat

Note the documentation https://thrift.apache.org/lib/go tells you to get it from github.com/apache/thrift/lib/go/thrift.

You can apply an override in your project similar to https://github.com/jenkins-x/jx/pull/3321/files

bboreham avatar Sep 02 '19 10:09 bboreham

Apparently a redirect was added per https://issues.apache.org/jira/browse/THRIFT-4542?focusedCommentId=16428186&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16428186

But that doesn't fix the issue for Docker builds. The https://github.com/jenkins-x/jx/pull/3321/files fix seems to be the way to go if you're trying to build with Docker.

Adding replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 to go.mod fixed it for me.

tmartinez-carecloud avatar Sep 03 '19 16:09 tmartinez-carecloud

Doing the replace git.apache.org/thrift.git => ... seems to only work if you don't have any other dependencies not referring to github.com/apache/thrift the proper way. I get the error github.com/apache/[email protected] used for two different module paths (git.apache.org/thrift.git and github.com/apache/thrift).

keitwb avatar Sep 03 '19 18:09 keitwb

The replace

replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20191002171323-e53d23c16c80

worked for me on go 1.12.7 but as of go1.13 I get this:

go: google.golang.org/[email protected] requires
        [email protected] requires
        github.com/apache/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-02-10T18:11:46Z)

how can I generate the version (the timestamp specifically) for go.mod?

pmalekn avatar Sep 03 '19 19:09 pmalekn

After fixing the timestamp to the following:

replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20190210181146-e53d23c16c80

with go 1.13 I get

go: github.com/apache/[email protected] used for two different module paths (git.apache.org/thrift.git and github.com/apache/thrift)

pmalekn avatar Sep 03 '19 19:09 pmalekn

Apparently a redirect was added

That was over a year ago. Apparently it has now gone away.

bboreham avatar Sep 04 '19 11:09 bboreham

In my case updating go.opencensus.io and cloud.google.com/go to certain versions (or newer) resolves this issue.

If you use go modules (have go.mod and go.sum),

go get -u [email protected] cloud.google.com/[email protected]
go mod tidy

What modules you need to update may varies. The key is finding which modules depend on git.apache.org/thrift.git. I couldn't find out a magical way to do this task, so stick following steps.

  • go mod tidy to remove noise from go.mod
  • go mod graph | grep " <module>[@version]" to know which modules are depend on certain module (and version if needed) until your main module.
  • googling module's github url and blaming prior change of the line of dependency in go.mod.

hiroshi avatar Sep 15 '19 07:09 hiroshi