Open xn3cr0nx opened 4 years ago
@xn3cr0nx Yes, it's not easy with docker-compose, would you like to try the deployment with kind? Which is easy to use and you can follow the doc here https://docs.pingcap.com/tidb-in-kubernetes/v1.1/get-started#create-a-kubernetes-cluster-using-kind.
Hi everyone,
maybe I'm not getting the point, but I really cannot deal with connecting with pd deployed with docker-compose. I'm using github.com/pingcap/tidb/kv go lib, and the problem is clearly the host. I read you can set host mode to expose services but I'm on ubuntu and the docs says it's not required.
I'm getting this error you probably already expect.
[2020/07/03 09:50:55.167 +00:00] [WARN] [base_client.go:170] ["[pd] failed to get cluster id"] [url=http://pd0:2379] [error="error:rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: lookup pd.tikv on 127.0.0.11:53: no such host\" target:pd.tikv:2379 status:TRANSIENT_FAILURE"] [errorVerbose="error:rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: lookup pd.tikv on 127.0.0.11:53: no such host\" target:pd.tikv:2379 status:TRANSIENT_FAILURE\ngithub.com/pingcap/pd/v4/client.(baseClient).getMembers\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:208\ngithub.com/pingcap/pd/v4/client.(baseClient).initClusterID\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:167\ngithub.com/pingcap/pd/v4/client.(baseClient).initRetry\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:103\ngithub.com/pingcap/pd/v4/client.newBaseClient\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:84\ngithub.com/pingcap/pd/v4/client.NewClientWithContext\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/client.go:150\ngithub.com/pingcap/pd/v4/client.NewClient\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/client.go:144\ngithub.com/pingcap/tidb/store/tikv.Driver.Open\n\t/go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20200701091151-ceec9d9c63c8/store/tikv/kv.go:86\ngithub.com/xn3cr0nx/bitgodine/pkg/tikv.NewTiKV\n\t/bitgodine/pkg/tikv/tikv.go:39\ngithub.com/xn3cr0nx/bitgodine/pkg/tikv/storage.NewKV\n\t/bitgodine/pkg/tikv/storage/kv.go:34\nmain.start\n\t/bitgodine/cmd/server/serve.go:63\ngithub.com/spf13/cobra.(Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846\ngithub.com/spf13/cobra.(Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.Execute\n\t/bitgodine/cmd/server/root.go:33\nmain.main\n\t/bitgodine/cmd/server/main.go:4\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373\ngithub.com/pingcap/pd/v4/client.(baseClient).getMembers\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:209\ngithub.com/pingcap/pd/v4/client.(baseClient).initClusterID\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:167\ngithub.com/pingcap/pd/v4/client.(baseClient).initRetry\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:103\ngithub.com/pingcap/pd/v4/client.newBaseClient\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/base_client.go:84\ngithub.com/pingcap/pd/v4/client.NewClientWithContext\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/client.go:150\ngithub.com/pingcap/pd/v4/client.NewClient\n\t/go/pkg/mod/github.com/pingcap/pd/v4@v4.0.0-rc.2.0.20200520083007-2c251bd8f181/client/client.go:144\ngithub.com/pingcap/tidb/store/tikv.Driver.Open\n\t/go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20200701091151-ceec9d9c63c8/store/tikv/kv.go:86\ngithub.com/xn3cr0nx/bitgodine/pkg/tikv.NewTiKV\n\t/bitgodine/pkg/tikv/tikv.go:39\ngithub.com/xn3cr0nx/bitgodine/pkg/tikv/storage.NewKV\n\t/bitgodine/pkg/tikv/storage/kv.go:34\nmain.start\n\t/bitgodine/cmd/server/serve.go:63\ngithub.com/spf13/cobra.(Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846\ngithub.com/spf13/cobra.(Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.Execute\n\t/bitgodine/cmd/server/root.go:33\nmain.main\n\t/bitgodine/cmd/server/main.go:4\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373"].
Why is it so hard to bootstrap the infrastructure with docker-compose and simply connect with the client?