APM Go agent install fails

Followed the 'go get' instruction to install the APM agent, but came back with dependency error, with a 3rd party website not being available. Can you confirm whether there is another way to install the Go agent module, without the dependency on the package on a 3rd party website?

Wholly new 'installation', to test instrumenting a Go program for APM.

Output:

# go get go.elastic.co/apm
go: finding go.elastic.co/apm v1.8.0
go: downloading go.elastic.co/apm v1.8.0
go: extracting go.elastic.co/apm v1.8.0
go get: go.elastic.co/apm@v1.8.0 requires
        github.com/elastic/go-sysinfo@v1.1.1 requires
        howett.net/plist@v0.0.0-20181124034731-591f970eefbb: invalid version: git fetch -f https://gitlab.howett.net/go/plist.git refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /root/go/pkg/mod/cache/vcs/c8e70a3b22313f6fedf9d36ced823fdeb2c8ba51480fd7c16ae40194977aa32a: exit status 128:
        fatal: unable to access 'https://gitlab.howett.net/go/plist.git/': Failed connect to gitlab.howett.net:443; Connection timed out

@vulcanfan welcome to the forum!

Which version of Go are you using? Go 1.13+ will use https://proxy.golang.org/ to fetch module dependencies. I've just confirmed that howett.net/plist is cached and available through the proxy.

I presume you're using an older version of Go, otherwise it should be using the proxy - unless you've explicitly disabled GOPROXY. If you upgrade Go or enable GOPROXY then it should resolve the issue.

That specific module is mirrored on GitHub at https://github.com/DHowett/go-plist/. If upgrading Go versions is out of the question, then you could add a replace clause in go.mod:

go mod edit -replace howett.net/plist=github.com/DHowett/go-plist@v0.0.0-20181124034731-591f970eefbb

Hi,

It’s Go 1.13 actually, but you were right about GOPROXY. It was disabled.

I didn’t know about that, many thanks for the tip. I can continue now.

Thanks again and regards

Andy

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.