Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译问题 #3

Open
w88700126 opened this issue Mar 21, 2018 · 1 comment
Open

编译问题 #3

w88700126 opened this issue Mar 21, 2018 · 1 comment

Comments

@w88700126
Copy link

新人,磕磕碰碰搞定了所有环境,但是卡在最后一步
编译managar 时候报错
../../common/dao/xhbase/xhbase.go:19:2: not enough arguments to return
have (hrpc.Scanner)
want (*hrpc.Result, error)

这个是不是hbase版本过久,函数都已经变动了啊?怎么解决呢?
另:有交流群吗?

@w88700126
Copy link
Author

w88700126 commented Mar 21, 2018

[root@localhost access]# ./access
panic: http: multiple registrations for /debug/requests

goroutine 1 [running]:
net/http.(*ServeMux).Handle(0xe99040, 0xacd92c, 0xf, 0xb38960, 0xaf25b8)
/usr/local/go/src/net/http/server.go:2353 +0x239
net/http.(*ServeMux).HandleFunc(0xe99040, 0xacd92c, 0xf, 0xaf25b8)
/usr/local/go/src/net/http/server.go:2368 +0x55
net/http.HandleFunc(0xacd92c, 0xf, 0xaf25b8)
/usr/local/go/src/net/http/server.go:2380 +0x4b
github.com/coreos/etcd/vendor/golang.org/x/net/trace.init.0()
/home/gopath/src/github.com/coreos/etcd/vendor/golang.org/x/net/trace/trace.go:115 +0x42

上面的看源码改了一下返回值,可以通过编译了,不知道有什么影响.
现在运行,每一个都这样报错,伤心.怎么回事啊?

===============
找到问题了,是因为/home/gopath/src/github.com/coreos/etcd/vendor/golang.org/x/net/trace/trace.go里面的初始化函数,全部都添加了http.HandleFunc("/debug/requests", Traces)
意味着每一个引用他的程序都在监听这个,同一台机器上只能有一个.我直接注释掉这句话就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant