BTrDB 连接失败

huangapple go评论82阅读模式
英文:

BTrDB Failure to connect

问题

我有一个在我的虚拟机上运行的BTrDB容器副本,以及一个试图通过从CSV中获取数据并插入来测试它的Go程序。不幸的是,当我尝试连接时出现错误。

ctx, _ := context.WithDeadline(context.TODO(), time.Now().Add(time.Duration(30)*time.Second))
_, err := btrdb.Connect(ctx, "192.168.99.100:4410")
if err != nil {
    log.Fatal("Unexpected connection error: %v", err)
}

产生的错误信息如下:

2017/03/14 14:09:17 transport: http2Client.notifyError got notified that the client transport was broken read tcp 192.168.99.1:54212->192.168.99.100:4410: read: connection reset by peer.
2017/03/14 14:09:17 Unexpected connection error: %vCould not connect to cluster via provided endpoints
attempt to obtain MASH from 192.168.99.100:4410 yielded rpc error: code = Internal desc = transport is closing

我按照GitHub页面上的说明安装了容器,并进行了一些修改。

docker network create mynet
docker run -d --net mynet --name btrmongo mongo:3.2
docker run -it --net mynet -v /Users/keithnordstrom/btrdata:/srv -e BTRDB_MONGO_SERVER=btrmongo.mynet btrdb/release:3.4 makedb
docker run -d --name btrdb --net mynet -v /Users/keithnordstrom/btrdata:/srv -p 4410:4410 -e BTRDB_MONGO_SERVER=btrmongo.mynet btrdb/release:3.4

这是来自BTrDB端的并发日志示例:

2017/03/14 20:08:28 main.go:114 ▶ Still alive
2017/03/14 20:08:28 blockcache.go:20 ▶ Cachestats: 0 misses, 0 hits, NaN %
2017/03/14 20:08:28 main.go:47 ▶ Num goroutines: 16
2017/03/14 20:08:29 main.go:47 ▶ Num goroutines: 16
2017/03/14 20:08:30 main.go:47 ▶ Num goroutines: 16
2017/03/14 20:08:31 main.go:47 ▶ Num goroutines: 16
2017/03/14 20:08:32 cpinterface.go:59 ▶ cpnp connection
2017/03/14 20:08:32 cpinterface.go:64 ▶ ERR (%v) :: %v 192.168.99.1:54212 capn: too much data in stream
2017/03/14 20:08:32 cpinterface.go:59 ▶ cpnp connection
2017/03/14 20:08:32 cpinterface.go:64 ▶ ERR (%v) :: %v 192.168.99.1:54213 EOF
2017/03/14 20:08:32 main.go:47 ▶ Num goroutines: 16
2017/03/14 20:08:33 main.go:114 ▶ Still alive

我做错了什么?

英文:

I have a copy of the BTrDB container running on my VM and a Go program that's trying to test it by taking data from a CSV and inserting it. Unfortunately, I get errors when trying to connect

ctx, _ := context.WithDeadline(context.TODO(), time.Now().Add(time.Duration(30)*time.Second))
_, err := btrdb.Connect(ctx, "192.168.99.100:4410")
if err != nil {
	log.Fatal("Unexpected connection error: %v", err)
}

yields

> 2017/03/14 14:09:17 transport: http2Client.notifyError got notified that the client transport was broken read tcp 192.168.99.1:54212->192.168.99.100:4410: read: connection reset by peer.
2017/03/14 14:09:17 Unexpected connection error: %vCould not connect to cluster via provided endpoints
attempt to obtain MASH from 192.168.99.100:4410 yielded rpc error: code = Internal desc = transport is closing

I have the container installed per the instructions on the GitHub page, with a few modifications

docker network create mynet
docker run -d --net mynet --name btrmongo mongo:3.2
docker run -it --net mynet -v /Users/keithnordstrom/btrdata:/srv -e BTRDB_MONGO_SERVER=btrmongo.mynet btrdb/release:3.4 makedb
docker run -d --name btrdb --net mynet -v /Users/keithnordstrom/btrdata:/srv -p 4410:4410 -e BTRDB_MONGO_SERVER=btrmongo.mynet btrdb/release:3.4

Here's a concurrent sample of the log from the BTrDB side

> 2017/03/14 20:08:28 main.go:114 ▶ Still alive
> 2017/03/14 20:08:28 blockcache.go:20 ▶ Cachestats: 0 misses, 0 hits, NaN %
> 2017/03/14 20:08:28 main.go:47 ▶ Num goroutines: 16
> 2017/03/14 20:08:29 main.go:47 ▶ Num goroutines: 16
> 2017/03/14 20:08:30 main.go:47 ▶ Num goroutines: 16
> 2017/03/14 20:08:31 main.go:47 ▶ Num goroutines: 16
> 2017/03/14 20:08:32 cpinterface.go:59 ▶ cpnp connection
> 2017/03/14 20:08:32 cpinterface.go:64 ▶ ERR (%v) :: %v 192.168.99.1:54212 capn: too much data in stream
> 2017/03/14 20:08:32 cpinterface.go:59 ▶ cpnp connection
> 2017/03/14 20:08:32 cpinterface.go:64 ▶ ERR (%v) :: %v 192.168.99.1:54213 EOF
> 2017/03/14 20:08:32 main.go:47 ▶ Num goroutines: 16
> 2017/03/14 20:08:33 main.go:114 ▶ Still alive

What am I doing wrong?

答案1

得分: 0

看起来你正在使用v3服务器容器和v4绑定库。

强烈建议使用v4,你可以按照smartgrid.store上的指南设置v4堆栈。

该堆栈假设你正在使用Kubernetes和Ceph,但你也可以使用Minikube和无Ceph进行开发部署,尽管文档可能相对较少。

为了获得更快的响应,你也可以发送电子邮件至btrdb@googlegroups.com。

编辑:看起来过时的自述文件误导了你。我现在会更新它。谢谢。

英文:

It seems like you are using the v3 server container with the v4 binding libraries.

It is definitely recommended to use v4, so you can try setting up the v4 stack by following the guide at smartgrid.store

That stack assumes you are using kubernetes and ceph, but you can also set up a development deployment using minikube and no ceph, although the documentation is a little thinner there.

To get faster responses, you can also email btrdb@googlegroups.com

EDIT: it does seem like the out of date readme led you astray. I'll update that now. Thanks

huangapple
  • 本文由 发表于 2017年3月15日 04:19:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/42795775.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定