如题所示。
具体错误信息如下:
[2025/01/17 12:40:27.407 +08:00] [INFO] [main.go:85] [“got signal to exit”] [signal=hangup]
[2025/01/17 12:40:27.418 +08:00] [INFO] [server.go:293] [“closing server”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [election.go:189] [“election is closing”] [component=election] [“current member”=“{"id":"master1","addr":"10.246.97.38:8261"}”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [keepalive.go:198] [“watch keepalive worker quit due to context canceled”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [election.go:334] [“retire from leader”] [component=election] [“current member”=“{"id":"master1","addr":"10.246.97.38:8261"}”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [scheduler.go:2575] [“observeLoadTask will quit now”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [pessimist.go:121] [“pessimist will quit now”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [election.go:239] [“break campaign loop, context is done”] [component=election] [“current member”=“{"id":"master1","addr":"10.246.97.38:8261"}”] [error=“context canceled”]
[2025/01/17 12:40:27.418 +08:00] [INFO] [scheduler.go:2120] [“observeWorkerEvent will quit now”]
[2025/01/17 12:40:28.170 +08:00] [WARN] [util.go:170] [“apply request took too long”] [component=“embed etcd”] [took=317.405994ms] [expected-duration=100ms] [prefix=] [request=“header:<ID:14359890628870085242 > lease_revoke:id:47489471eb430b04”] [response=size:27]
[2025/01/17 12:40:28.208 +08:00] [WARN] [interceptor.go:197] [“request stats”] [component=“embed etcd”] [“start time”=2025/01/17 12:40:27.610 +08:00] [“time spent”=597.825584ms] [remote=10.246.97.38:40090] [“response type”=/etcdserverpb.Lease/LeaseRevoke] [“request count”=-1] [“request size”=-1] [“response count”=-1] [“response size”=-1] [“request content”=]
[2025/01/17 12:40:28.208 +08:00] [INFO] [election.go:197] [“election is closed”] [component=election] [“current member”=“{"id":"master1","addr":"10.246.97.38:8261"}”]
[2025/01/17 12:40:28.208 +08:00] [WARN] [serve.go:160] [“stopping insecure grpc server due to error”] [component=“embed etcd”] [error=“accept tcp 10.246.97.38:8261: use of closed network connection”]
[2025/01/17 12:40:28.211 +08:00] [WARN] [serve.go:162] [“stopped insecure grpc server due to error”] [component=“embed etcd”] [error=“accept tcp 10.246.97.38:8261: use of closed network connection”]
[2025/01/17 12:40:28.277 +08:00] [INFO] [server.go:295] [“server closed”]
[2025/01/17 12:40:28.277 +08:00] [INFO] [main.go:92] [“dm-master exit”]
上面的日志也打点
为什么这样部署呢,为什么不用官方推荐的 tiup 方式部署呢
你可以用 nohup & 直接的方式直接讲任务放到后台
或者用 disown 命令也可以
当前shell关闭时,会发送 signup 信号,可能是dm-master程序里有对signup信号的处理(程序退出)。使用disown可以将dm-master任务和当前shell解绑,shell关闭时,不会再收到signup关闭信号,也就不会自动退出了。
一开始用的nohup,不管用,signup信号还是会传递到dm-master程序上,用disown解决的