Closed lhtlp1997 closed 4 years ago
我进行如下配置,但是总是报错,提示。host怎么换都没有用,一直报这个错 { "clickhouse": { "ch1": { "db": "test", "host": "127.0.0.1", "maxLifeTime": 300, "dnsLoop" : false, "password": "", "retryTimes" : 5, "port": 9000, "username": "default" } }, "kafka": { "kfk1": { "brokers": "localhost:9092", "sasl": { "password": "", "username": "" } } }, "common": { "bufferSize": 90000, "minBufferSize": 2000, "flushInterval": 5, "logLevel": "info" } }
2019/11/20 15:58:39 Initial [clickhouse_sinker] failure: [lookup : no such host] panic: lookup : no such host
goroutine 1 [running]: github.com/housepower/clickhouse_sinker/vendor/github.com/wswz/go_commons/app.Run(0x97ae75, 0x11, 0xc0000c7f20, 0xc00008b1d0, 0xc0000c7f00) /home/go/src/github.com/housepower/clickhouse_sinker/vendor/github.com/wswz/go_commons/app/app.go:28 +0x50a main.main() /home/go/src/github.com/housepower/clickhouse_sinker/bin/main.go:41 +0x12d
@lhtlp1997 确实是一个bug,已经修复,麻烦拉下最新代码
生产环境建议用域名访问 , 这样可以近似链接均衡
好的,目前这个版本没有再报错了。
我进行如下配置,但是总是报错,提示。host怎么换都没有用,一直报这个错 { "clickhouse": { "ch1": { "db": "test", "host": "127.0.0.1", "maxLifeTime": 300, "dnsLoop" : false, "password": "", "retryTimes" : 5, "port": 9000, "username": "default" } }, "kafka": { "kfk1": { "brokers": "localhost:9092", "sasl": { "password": "", "username": "" } } }, "common": { "bufferSize": 90000, "minBufferSize": 2000, "flushInterval": 5, "logLevel": "info" } }
2019/11/20 15:58:39 Initial [clickhouse_sinker] failure: [lookup : no such host] panic: lookup : no such host
goroutine 1 [running]: github.com/housepower/clickhouse_sinker/vendor/github.com/wswz/go_commons/app.Run(0x97ae75, 0x11, 0xc0000c7f20, 0xc00008b1d0, 0xc0000c7f00) /home/go/src/github.com/housepower/clickhouse_sinker/vendor/github.com/wswz/go_commons/app/app.go:28 +0x50a main.main() /home/go/src/github.com/housepower/clickhouse_sinker/bin/main.go:41 +0x12d