Git Product home page Git Product logo

Comments (10)

disksing avatar disksing commented on August 17, 2024

你好 @martinliyu
请问“出现片段信息”是什么意思?另外,能否提供一下完整的操作过程呢?包括pd-server的启动顺序及启动参数。

from docs-cn.

disksing avatar disksing commented on August 17, 2024

另外 pd-ctl member 的输入你似乎没有贴全。

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

@disksing 感谢关注。
我所谓的“片段信息”是member命令下返回的信息本应该看到{name:pd01 memberid:..}的信息。但是目前没有“name.."

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

pd-ctl -u http://192.168.20.158:2379
» member
{
"members": [
{
"member_id": 1989351853167724236,
"peer_urls": [
"http://192.168.20.157:2380"
]
},
{
"name": "pd02",
"member_id": 6114201539766314484,
"peer_urls": [
"http://192.168.20.158:2380"
],
"client_urls": [
"http://192.168.20.158:2379"
]
},
{
"name": "pd03",
"member_id": 11101889214173989475,
"peer_urls": [
"http://192.168.20.160:2380"
],
"client_urls": [
"http://192.168.20.160:2379"
]
}
]
}

»

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

启动命令及参数是:
nohup /usr/local/tidb/bin/pd-server --config="/usr/local/tidb/conf/pd.toml" >> pdserver.log &
其中pd.toml我作为附件

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

PD Configuration.

name = "pd01"
data-dir = "/TiDBDisk/pd01"

client-urls = "http://192.168.20.157:2379"

if not set, use ${client-urls}

advertise-client-urls = ""

peer-urls = "http://192.168.20.157:2380"

if not set, use ${peer-urls}

advertise-peer-urls = ""

#initial-cluster = "pd01=http://192.168.20.157:2380,pd02=http://192.168.20.158:2380,pd03=http://192.168.20.160:2380"
initial-cluster-state = "new"

lease = 3
log-level = "info"
tso-save-interval = "3s"

join="http://192.168.20.158:2379,http://192.168.20.160:2379"

[metric]

prometheus client push interval, set "0s" to disable prometheus.

interval = "15s"

prometheus pushgateway address, leaves it empty will disable prometheus.

address = ""

[schedule]
max-snapshot-count = 3
max-store-down-time = "1h"
leader-schedule-limit = 1024
region-schedule-limit = 16
replica-schedule-limit = 24

[replication]

The number of replicas for each region.

max-replicas = 3

The label keys specified the location of a store.

The placement priorities is implied by the order of label keys.

For example, ["zone", "rack"] means that we should place replicas to

different zones first, then to different racks if we don't have enough zones.

location-labels = []

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

启动是这样的:集群中存在2台pd-server,分别是pd02,pd03。之前的pd01因为某些原因通过member delete删除了。接下去重新启动pd01,以jion的方式加入。 执行启动命令前,删除了本地的pd数据文件,重新做了数据目录并赋予可读写权限。而后,执行启动命令”nohup /usr/local/tidb/bin/pd-server --config="/usr/local/tidb/conf/pd.toml" >> pdserver.log &“ 此时报告端口2380被占用,才发现既有的pd-server守护进程没有kill。接下去kill该既有进程,而后继续启动。启动中报错” [fatal] join error etcdserver: re-configuration failed due to not enough started members“,查看pd member信息,发现信息中已经存在上述片段,但是明显未能完成所有信息的登记(缺少了name的项目)”。现在就很尴尬,pd01所持有的ip不能改变,也无法再加入集群中。以上,希望能得到反馈、关注!

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

再补充一下,出现上述问题后,对member中的pd02,执行member delete pd02 同样报错:“» member delete pd02
Failed to delete member pd02: [500] "etcdserver: re-configuration failed due to not enough started members"

from docs-cn.

nolouch avatar nolouch commented on August 17, 2024

你好@martinliyu
pd 中内嵌了etcd, join 的过程分为两步。之前我们做了一些处理但没考虑到这种情况, 端口被占用使得只完成了第一步。谢谢你的反馈,我们会尽快修复这个问题。
目前 pd 只提供了通过 name 删除 member 的接口,修复这个集群可以尝试通过 etcdctl 删除
没有名字的 member, 然后正常 join.

from docs-cn.

martinliyu avatar martinliyu commented on August 17, 2024

谢谢 @disksing @nolouch

from docs-cn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.