database - BTrDB 连接失败

标签 database go time-series

我有一个在我的 VM 上运行的 BTrDB 容器的副本和一个 Go 程序,该程序试图通过从 CSV 中获取数据并将其插入来测试它。不幸的是,我在尝试连接时遇到错误

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

我做错了什么?

最佳答案

看起来您正在使用带有 v4 绑定(bind)库的 v3 服务器容器。

绝对推荐使用 v4,因此您可以按照 smartgrid.store 上的指南尝试设置 v4 堆栈。

该堆栈假设您使用的是 kubernetes 和 ceph,但您也可以使用 minikube 而不使用 ceph 来设置开发部署,尽管那里的文档有点薄。

要获得更快的回复,您还可以发送电子邮件至 btrdb@googlegroups.com

编辑:过时的自述文件似乎确实让您误入歧途。我现在就更新。谢谢

关于database - BTrDB 连接失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42795775/

相关文章:

java - 数据库与spring roo的关系

go - 为什么当函数返回一个函数时 Go 泛型会失败?

string - 如何从 Golang Strings.Builder 对象中修剪最后一个字符?

python - 存储时间序列数据的最佳开源解决方案是什么?

r - 如何在合并的动物园对象中滞后一列

php - "Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource"

database - 数据库导入后 Postgres autovacuum 高 cpu/磁盘

Mysql 查询不适用于空列

go - 寻找相当于 scanf 的 Go

python - 如何在Python 3.7中读取时间序列数据