Go version
go version go1.21.4 darwin/amd64
Output of go env
in your module/workspace:
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/51pwn/Library/Caches/go-build'
GOENV='/Users/51pwn/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/51pwn/go/pkg/mod'
GONOPROXY='github.com/hktalent/zbServer'
GONOSUMDB='github.com/hktalent/zbServer'
GOOS='darwin'
GOPATH='/Users/51pwn/go'
GOPRIVATE='github.com/hktalent/zbServer'
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/go/'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/51pwn/MyWork/goSqlite_gorm/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/_l/pnb2t_9s0f192bqlz1348vpr0000gn/T/go-build1603043107=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
go tool pprof -seconds=600 -http=:9999 https://127.0.0.1:8081/debug/pprof/heap
What did you see happen?
Fetching profile over HTTP from https://127.0.0.1:8081/debug/pprof/heap?seconds=600 Please wait... (10m0s) https://127.0.0.1:8081/debug/pprof/heap: Get "https://127.0.0.1:8081/debug/pprof/heap?seconds=600": tls: failed to verify certificate: x509: “Cloudflare” certificate is not standards compliant failed to fetch any source profiles
What did you expect to see?
I expect to ignore the tls error and work properly. Moreover, this certificate is issued by Cloudflare and can work in a formal environment.
ok
now run
go tool pprof -seconds=1800 -http=:9999 https+insecure://127.0.0.1:8081/debug/pprof/heap
is ok
Comment From: gabyhelp
Related Issues
- tls: failed to verify certificate: x509: “CloudFlare Origin Certificate” certificate is not standards compliant #62361 (closed)
- net/http/pprof: pprof over HTTPS #16073 (closed)
- cmd/pprof: add HTTPS support with client certificates #20939 (closed)
- pprof: go tool pprof cannot read the pprof file normally #66227 (closed)
- cmd/go: TestScript/gotoolchain_issue66175 fails on tip locally #67277 (closed)
- crypto/x509: trust setting not inherited on Darwin #32891 (closed)
- cmd/compile: `PGO error: error opening profile: EOF` in `cmd/go.TestScript/build_pgo` as of CL 529738 #65220 (closed)
- crypto/x509: cannot parse certificate IP \& net/http cannot ignore this certificate error #65829 (closed)
- crypto/tls: panic: runtime error: slice bounds out of range [33554436:274] #64692 (closed)
- cmd/pprof: panics if profile is not found #67626 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: seankhliao
Duplicate of #51991