What configurations need to be changed in the playground after modifying the server IP?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 修改了服务器IP后,playground需要改哪些配置呢?

| username: 江湖故人

Starting component `playground`: /Users/home/.tiup/components/playground/v1.13.1/tiup-playground --db 2 --pd 3 --kv 3 --host 0.0.0.0 --tag test2023
Using the version v7.5.0 for version constraint "".

If you'd like to use a TiDB version other than v7.5.0, cancel and retry with the following arguments:
	Specify version manually:   tiup playground <version>
	Specify version range:      tiup playground ^5
	The nightly version:        tiup playground nightly

Start pd instance:v7.5.0
Start pd instance:v7.5.0
Start pd instance:v7.5.0
Start tikv instance:v7.5.0
Start tikv instance:v7.5.0
Start tikv instance:v7.5.0
Start tidb instance:v7.5.0
Start tidb instance:v7.5.0
Waiting for tidb instances ready
192.168.1.8:4000 ... Error
192.168.1.8:4001 ... Error
tidb quit: exit status 1
tidb quit: exit status 1
[2024/01/20 12:16:37.061 +08:00] [WARN] [pd_service_discovery.go:452] ["[pd] failed to get cluster id"] [url=http://192.168.1.8:2382] [error="[PD:client:ErrClientGetMember]error:rpc error: code = Unavailable desc = connection error: desc = \"error reading server preface: read tcp 192.168.1.8:51630->192.168.1.8:2382: use of closed network connection\" target:192.168.1.8:2382 status:TRANSIENT_FAILURE: error:rpc error: code = Unavailable desc = connection error: desc = \"error reading server preface: read tcp 192.168.1.8:51630->192.168.1.8:2382: use of closed network connection\" target:192.168.1.8:2382 status:TRANSIENT_FAILURE"]
| username: changpeng75 | Original post link

First, the IP addresses of each node in the configuration file need to be changed.

| username: 江湖故人 | Original post link

The configuration file just couldn’t be found.

| username: ShawnYan | Original post link

Is this the IP address before the change?

Check the IP address information in the ~/.tiup/data/test2023 directory.

But since it’s a playground, the quickest way is to rebuild it.

| username: 江湖故人 | Original post link

Already created.

I have already changed the following configurations, but it still won’t start :joy:
./dsn
./tikv-0/data/last_tikv.toml
./tikv-1/data/last_tikv.toml
./tikv-2/data/last_tikv.toml
./tiflash-0/proxy_data/last_tikv.toml

| username: changpeng75 | Original post link

What were the IP addresses before and after the change?
Please paste the contents of the ~/config/pd.toml file for us to check.

| username: changpeng75 | Original post link

For specific deployment of the playground, you can refer to this document:

| username: 江湖故人 | Original post link

Thank you.

A new tag has already been created, so the experimental data needs to be regenerated.

| username: 江湖故人 | Original post link

I’ve already changed the following configurations, but it still won’t start up :joy:
./dsn
./tikv-0/data/last_tikv.toml
./tikv-1/data/last_tikv.toml
./tikv-2/data/last_tikv.toml
./tiflash-0/proxy_data/last_tikv.toml

I used grep -r -l to check many files containing the old IP, there might be other things like entries in sqlite that haven’t been modified.

| username: wangccsy | Original post link

Use parameter configuration.

| username: 哈喽沃德 | Original post link

Clean up the environment and start a new one.

| username: dba远航 | Original post link

Originally created anew.

| username: 春风十里 | Original post link

Isn’t the IP of the playground 127.0.0.1? What adjustments did you make to change it to 192.x?

| username: 哈喽沃德 | Original post link

There is no problem with the local loopback address.

| username: 江湖故人 | Original post link

Didn’t adjust anything, default installation.

| username: zhanggame1 | Original post link

Tinkering, it’s much better to install a standalone TiDB. Use 127.0.0.1 for the IP, and then you can connect no matter how you change it.

| username: 哈喽沃德 | Original post link

Indeed, getting a high-spec virtual machine can also work, 32GB of memory is more than enough. I can still play with 8GB of memory.

| username: zhanggame1 | Original post link

With 32G, you can set up 3 TiKV instances; with 8G, you can set up one TiKV instance.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.