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

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:4007' (61) #158

Open
Willendless opened this issue Jul 18, 2022 · 0 comments

Comments

@Willendless
Copy link

Willendless commented Jul 18, 2022

When following the instructions to run copr-test locally, I fail to connect tidb (WithPushDown)

...
...
+ Launching TiDB for WithPushDown test using config /Users/lijiarui/Works/pingcap/internship/tikv-test/copr-test/push-down-test/build/config/with_push_down/tidb.toml

  - Config content:
port = 4007
store = "tikv"
path = "127.0.0.1:4479"
socket = ""

[status]
report-status = false
  - Starting process...
/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/bin/tidb-server -config /Users/lijiarui/Works/pingcap/internship/tikv-test/copr-test/push-down-test/build/config/with_push_down/tidb.toml -log-file /Users/lijiarui/Works/pingcap/internship/tikv-test/copr-test/push-down-test/build/tidb_with_push_down.log -L warn
  - Sleep 10s to wait for TiDB to start

+ Waiting TiDB start up (NoPushDown)
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| mysql              |
| test               |
+--------------------+
  - TiDB startup successfully (NoPushDown)

+ Waiting TiDB start up (WithPushDown)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:4007' (61)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:4007' (61)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:4007' (61)

// pd log

[2022/07/17 20:16:12.722 -04:00] [WARN] [server.go:298] ["exceeded recommended request limit"] [max-request-bytes=157286400] [max-request-size="157 MB"] [recommended-request-bytes=1$
[2022/07/17 20:16:12.913 -04:00] [WARN] [store.go:1317] ["simple token is not cryptographically signed"]
[2022/07/17 20:16:12.992 -04:00] [WARN] [metrics.go:193] ["failed to get file descriptor usage"] [error="cannot get FDUsage on darwin"]
[2022/07/17 20:16:13.785 -04:00] [FATAL] [versioninfo.go:57] ["version string is illegal"] [error="[PD:semver:ErrSemverNewVersion]51ad29c is not in dotted-tri format: 51ad29c is not$

// tidb log

...
...
 100 [2022/07/17 20:17:56.024 -04:00] [WARN] [base_client.go:251] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:4479] [error="[PD:client:ErrClientGetMember]error:rpc            error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" target:127.0.0.1:4479 status:       TRANSIENT_FAILURE: error:rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\"        target:127.0.0.1:4479 status:TRANSIENT_FAILURE"]
 101 [2022/07/17 20:17:57.029 -04:00] [WARN] [base_client.go:251] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:4479] [error="[PD:client:ErrClientGetMember]error:rpc            error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" target:127.0.0.1:4479 status:       TRANSIENT_FAILURE: error:rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\"        target:127.0.0.1:4479 status:TRANSIENT_FAILURE"]
 102 [2022/07/17 20:17:58.034 -04:00] [WARN] [base_client.go:251] ["[pd] failed to get cluster id"] [url=http://127.0.0.1:4479] [error="[PD:client:ErrClientGetMember]error:rpc            error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" target:127.0.0.1:4479 status:       TRANSIENT_FAILURE: error:rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\"        target:127.0.0.1:4479 status:TRANSIENT_FAILURE"]
 103 [2022/07/17 20:17:59.035 -04:00] [WARN] [store.go:82] ["new store with retry failed"] [error="[pd] failed to get cluster id"]
 104 [2022/07/17 20:17:59.035 -04:00] [FATAL] [terror.go:298] ["unexpected error"] [error="[pd] failed to get cluster id"] [stack="github.com/pingcap/tidb/parser/terror.MustNil\n\t/      Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/parser/terror/terror.go:298\nmain.createStoreAndDomain\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/tidb-        server/main.go:299\nmain.main\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/tidb-server/main.go:204\nruntime.main\n\t/opt/homebrew/Cellar/go/1.18.2/libexec/src/         runtime/proc.go:250"] [stack="github.com/pingcap/tidb/parser/terror.MustNil\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/parser/terror/terror.go:298\nmain.             createStoreAndDomain\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/tidb-server/main.go:299\nmain.main\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/        tidb-server/main.go:204\nruntime.main\n\t/opt/homebrew/Cellar/go/1.18.2/libexec/src/runtime/proc.go:250"]

I tried to modify server/versioninfo/MustParseVersion to directly return semver.New(featuresDict[Version5_0]). However, the tidb still can not be connected. And the logs are as follows

// pd log

   1 [2022/07/17 20:26:40.544 -04:00] [WARN] [server.go:298] ["exceeded recommended request limit"] [max-request-bytes=157286400] [max-request-            size="157 MB"] [recommended-request-bytes=10485760] [recommended-request-size="10 MB"]
   2 [2022/07/17 20:26:40.738 -04:00] [WARN] [store.go:1317] ["simple token is not cryptographically signed"]
   3 [2022/07/17 20:26:40.819 -04:00] [WARN] [metrics.go:193] ["failed to get file descriptor usage"] [error="cannot get FDUsage on darwin"]
   4 [2022/07/17 20:26:45.041 -04:00] [WARN] [dynamic_config_manager.go:164] ["Dynamic config does not exist in etcd"]
   5 [2022/07/17 20:27:03.442 -04:00] [WARN] [grpclog.go:60] ["transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:4479-         >127.0.0.1:58610: use of closed network connection"]
   6 [2022/07/17 20:27:03.443 -04:00] [WARN] [grpclog.go:60] ["transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:4479-         >127.0.0.1:58609: use of closed network connection"]
   7 [2022/07/17 20:27:03.443 -04:00] [WARN] [grpclog.go:60] ["transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:4479-         >127.0.0.1:58625: use of closed network connection"]
   8 [2022/07/17 20:27:03.443 -04:00] [WARN] [grpclog.go:60] ["transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:4479-         >127.0.0.1:58626: use of closed network connection"]

// tidb log

...
[2022/07/17 20:27:23.480 -04:00] [ERROR] [kv.go:243] ["fail to load safepoint from pd"] [error="context deadline exceeded"]
  26 [2022/07/17 20:27:23.481 -04:00] [ERROR] [client.go:907] ["[pd] update connection contexts failed"] [dc=global] [error="rpc error: code =             Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\""]
  27 [2022/07/17 20:27:23.951 -04:00] [ERROR] [base_client.go:144] ["[pd] failed updateMember"] [error="[PD:client:ErrClientGetLeader]get leader from      [http://127.0.0.1:4479] error"]
  28 [2022/07/17 20:27:26.819 -04:00] [ERROR] [base_client.go:144] ["[pd] failed updateMember"] [error="[PD:client:ErrClientGetLeader]get leader from      [http://127.0.0.1:4479] error"]
  29 [2022/07/17 20:27:29.481 -04:00] [ERROR] [kv.go:243] ["fail to load safepoint from pd"] [error="context deadline exceeded"]
  30 [2022/07/17 20:27:29.482 -04:00] [ERROR] [client.go:907] ["[pd] update connection contexts failed"] [dc=global] [error="rpc error: code =             Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\""]
  31 [2022/07/17 20:27:29.482 -04:00] [ERROR] [client.go:792] ["[pd] create tso stream error"] [dc-location=global] [error="[PD:client:                    ErrClientCreateTSOStream]create TSO stream failed, retry timeout"]
  32 [2022/07/17 20:27:29.482 -04:00] [ERROR] [pd.go:236] ["updateTS error"] [txnScope=global] [error="[PD:client:ErrClientCreateTSOStream]create TSO      stream failed, retry timeout"]
  33 [2022/07/17 20:27:29.482 -04:00] [ERROR] [base_client.go:144] ["[pd] failed updateMember"] [error="[PD:client:ErrClientGetLeader]get leader from      [http://127.0.0.1:4479] error"]
  34 [2022/07/17 20:27:29.746 -04:00] [ERROR] [base_client.go:144] ["[pd] failed updateMember"] [error="[PD:client:ErrClientGetLeader]get leader from      [http://127.0.0.1:4479] error"]
  35 [2022/07/17 20:27:32.737 -04:00] [ERROR] [base_client.go:144] ["[pd] failed updateMember"] [error="[PD:client:ErrClientGetLeader]get leader from      [http://127.0.0.1:4479] error"]
  36 [2022/07/17 20:27:32.737 -04:00] [WARN] [backoff.go:158] ["pdRPC backoffer.maxSleep 40000ms is exceeded, errors:\nloadRegion from PD failed,          key: \"6D426F6F7473747261FF704B657900000000FB0000000000000073\", err: rpc error: code = Unavailable desc = connection error: desc = \"transport:      Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" at 2022-07-17T20:27:23.951276-04:00\nloadRegion from PD failed, key:       \"6D426F6F7473747261FF704B657900000000FB0000000000000073\", err: rpc error: code = Unavailable desc = connection error: desc = \"transport:           Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" at 2022-07-17T20:27:26.819438-04:00\nloadRegion from PD failed, key:       \"6D426F6F7473747261FF704B657900000000FB0000000000000073\", err: rpc error: code = Unavailable desc = connection error: desc = \"transport:           Error while dialing dial tcp 127.0.0.1:4479: connect: connection refused\" at 2022-07-17T20:27:29.746725-04:00\nlongest sleep type: pdRPC, time:      29039ms"]
  37 [2022/07/17 20:27:32.737 -04:00] [FATAL] [session.go:2951] ["check bootstrapped failed"] [error="[tikv:9001]PD server timeout"] [stack="github.       com/pingcap/tidb/session.getStoreBootstrapVersion\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/session/session.go:2951\ngithub.com/     pingcap/tidb/session.BootstrapSession\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/session/session.go:2719\nmain.                       createStoreAndDomain\n\t/Users/lijiarui/Works/pingcap/internship/tikv-test/tidb/tidb-server/main.go:301\nmain.main\n\t/Users/lijiarui/Works/          pingcap/internship/tikv-test/tidb/tidb-server/main.go:204\nruntime.main\n\t/opt/homebrew/Cellar/go/1.18.2/libexec/src/runtime/proc.go:250"]
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