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

日志报错 #166

Open
Myshiner opened this issue Aug 4, 2022 · 7 comments
Open

日志报错 #166

Myshiner opened this issue Aug 4, 2022 · 7 comments

Comments

@Myshiner
Copy link

Myshiner commented Aug 4, 2022

主节点xenon启动之后日志报错:

2022/08/04 20:55:44.287645 [ERROR] server.mysql.start.slave.error[Error 1200: The server is not configured as slave; fix in config file or with
CHANGE MASTER TO]
2022/08/04 20:55:44.287653 [INFO] server.mysql.check.replication.user...
2022/08/04 20:55:44.287816 [INFO] server.mysql.setup.done
2022/08/04 20:55:44.287821 [INFO] server.prepare.setup.RPC
2022/08/04 20:55:44.288128 [INFO] server.RPC.setup.done
2022/08/04 20:55:44.288148 [INFO] mysqld[/data/etc/my3306.cnf].monitor.start...
2022/08/04 20:55:44.288163 [INFO] mysql[127.0.0.1:3306].startping...
2022/08/04 20:55:44.288168 [INFO] FOLLOWER[ID:192.168.248.134:8801, V:0, E:0].raft.start...
2022/08/04 20:55:44.288213 [WARNING] xrpc.Start.listening.on[192.168.248.134:8801]
2022/08/04 20:55:44.288217 [INFO] server.start.success...
2022/08/04 20:55:44.288219 [INFO] xenon.start.success...
2022/08/04 20:55:44.288392 [INFO] FOLLOWER[ID:192.168.248.134:8801, V:0, E:0].start.CheckBrainSplit
2022/08/04 20:55:44.288482 [WARNING] FOLLOWER[ID:192.168.248.134:8801, V:0, E:0].state.init
2022/08/04 20:55:44.295962 [ERROR] FOLLOWER[ID:192.168.248.134:8801, V:0, E:0].leaderStopShellCommand[[-c sudo /usr/sbin/ip a d 192.168.248.100/
24 dev ens33]].out[bash -c sudo /usr/sbin/ip a d 192.168.248.100/24 dev ens33RTNETLINK answers: Cannot assign requested address
].error[exit status 2]

2022/08/04 20:55:44.295975 [ERROR] FOLLOWER[ID:192.168.248.134:8801, V:0, E:0].stopShellCommand.error[exit status 2]

注:启动顺序是挨个节点启动的,然后用xenoncli cluster add 192.168.248.134:8801,192.168.248.135:8801,192.168.248.136:8801添加集群
image
但是就是因为vip没挂载起来,所有节点都为readonly状态
根据报错提示,vip为啥挂载不起来呢?

@Myshiner
Copy link
Author

Myshiner commented Aug 4, 2022

用xenon配置里面的arping -c 3 -A 192.168.248.100 -I ens33测试
ARPING 192.168.248.100 from 192.168.248.100 ens33
Sent 3 probes (3 broadcast(s))
Received 0 response(s)

1 similar comment
@Myshiner
Copy link
Author

Myshiner commented Aug 4, 2022

用xenon配置里面的arping -c 3 -A 192.168.248.100 -I ens33测试
ARPING 192.168.248.100 from 192.168.248.100 ens33
Sent 3 probes (3 broadcast(s))
Received 0 response(s)

@Myshiner
Copy link
Author

Myshiner commented Aug 4, 2022

附上我的xenon.json配置文件(不同之处为三节点的IP地址)
{
"server":
{
"endpoint":"192.168.248.134:8801"
},

"raft":
{
    "meta-datadir":"raft.meta",
    "heartbeat-timeout":1000,
    "election-timeout":3000,
    "admit-defeat-hearbeat-count": 5,
    "purge-binlog-disabled": true,
    "leader-start-command":"sudo /usr/sbin/ip a a 192.168.248.100/24 dev ens33 && arping -c 3 -A 192.168.248.100 -I ens33",
    "leader-stop-command":"sudo /usr/sbin/ip a d 192.168.248.100/24 dev ens33"
},

"mysql":
{
    "admin":"root",
    "passwd":"root",
    "host":"127.0.0.1",
    "port":3306,
    "basedir":"/usr/local/mysql",
    "defaults-file":"/data/etc/my3306.cnf",
    "ping-timeout":1000,
    "master-sysvars":"super_read_only=0;read_only=0;sync_binlog=default;innodb_flush_log_at_trx_commit=default",
    "slave-sysvars": "super_read_only=1;read_only=1;sync_binlog=1000;innodb_flush_log_at_trx_commit=2"
},

"replication":
{
    "user":"repl",
    "passwd":"repl"
},

"backup":
{
    "ssh-host":"192.168.248.134",
    "ssh-user":"mysql",
    "ssh-passwd":"mysql",
    "ssh-port":22,
    "basedir":"/usr/local/mysql",
    "backupdir":"/data/backups",
    "xtrabackup-bindir":"/bin",
    "backup-iops-limits":100000,
    "mysqld-monitor-interval": 5000,
    "backup-use-memory": "128M",
    "backup-parallel": 2
},

"rpc":
{
    "request-timeout":500
},

"log":
{
    "level":"INFO"
}

}

@Myshiner
Copy link
Author

Myshiner commented Aug 4, 2022

image

@Myshiner
Copy link
Author

Myshiner commented Aug 4, 2022

手动执行sudo /usr/sbin/ip a a 192.168.248.100/24 dev ens33是可以拉起来vip地址的

@KID-G
Copy link

KID-G commented Aug 9, 2022

手动执行sudo /usr/sbin/ip a a 192.168.248.100/24 dev ens33是可以拉起来vip地址的

不好意思,我们近期会尽快恢复 Xenon 项目的维护工作。

@KID-G KID-G closed this as completed Aug 9, 2022
@KID-G KID-G reopened this Aug 9, 2022
@caphash
Copy link

caphash commented Sep 5, 2022

你好,
通过部分你贴的日志可以看出:

  1. 这里的问题在于 CANDIDATE 节点无法当选为主节点,逻辑上当选后才会挂上 VIP (日志里面是FOLLOWER 尝试删除VIP,不是主节点挂不上VIP)。
  2. 至于 IP 后缀为 134 的节点无法当选为主节点的原因,根据已知信息推测:a)各节点初始数据是否都预先拿到了?b)网络是否互通?c) cluster add 是否在每个节点上执行过?
  3. 具体哪种原因可以查看各节点 xenon 日志。

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

3 participants