TiDB修改日志级别报错

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:2.1.6
  • 【问题描述】:动态修改TiDB日志级别时报错。目前TiDB业务流量正常,希望不重启可以解决,多谢。

执行命令./tidb-server -L warn后出现以下报错:

2019/12/27 17:34:13.577 printer.go:39: [info] Welcome to TiDB.
2019/12/27 17:34:13.577 printer.go:40: [info] Release Version: v2.1.6
2019/12/27 17:34:13.577 printer.go:41: [info] Git Commit Hash: 66e639e8e127f71662f37287eb984dd84d169cba
2019/12/27 17:34:13.577 printer.go:42: [info] Git Branch: HEAD
2019/12/27 17:34:13.577 printer.go:43: [info] UTC Build Time: 2019-03-15 09:09:07
2019/12/27 17:34:13.577 printer.go:44: [info] GoVersion: go version go1.11.2 linux/amd64
2019/12/27 17:34:13.577 printer.go:45: [info] Race Enabled: false
2019/12/27 17:34:13.577 printer.go:46: [info] Check Table Before Drop: false
2019/12/27 17:34:13.577 printer.go:47: [info] TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
2019/12/27 17:34:13.578 printer.go:52: [info] Config: {“host”:“0.0.0.0”,“advertise-address”:“”,“port”:4000,“store”:“mocktikv”,“path”:“/tmp/tidb”,“socket”:“”,“lease”:“45s”,“run-ddl”:true,“split-table”:true,“token-limit”:1000,“oom-action”:“log”,“mem-quota-query”:34359738368,“enable-streaming”:false,“txn-local-latches”:{“enabled”:false,“capacity”:10240000},“lower-case-table-names”:2,“log”:{“level”:“warn”,“format”:“text”,“disable-timestamp”:false,“file”:{“filename”:“”,“log-rotate”:true,“max-size”:300,“max-days”:0,“max-backups”:0},“slow-query-file”:“”,“slow-threshold”:300,“expensive-threshold”:10000,“query-log-max-len”:2048},“security”:{“skip-grant-table”:false,“ssl-ca”:“”,“ssl-cert”:“”,“ssl-key”:“”,“cluster-ssl-ca”:“”,“cluster-ssl-cert”:“”,“cluster-ssl-key”:“”},“status”:{“report-status”:true,“status-port”:10080,“metrics-addr”:“”,“metrics-interval”:15},“performance”:{“max-procs”:0,“tcp-keep-alive”:true,“cross-join”:true,“stats-lease”:“3s”,“run-auto-analyze”:true,“stmt-count-limit”:5000,“feedback-probability”:0.05,“query-feedback-limit”:1024,“pseudo-estimate-ratio”:0.8,“force-priority”:“NO_PRIORITY”},“xprotocol”:{“xserver”:false,“xhost”:“”,“xport”:0,“xsocket”:“”},“prepared-plan-cache”:{“enabled”:false,“capacity”:100},“opentracing”:{“enable”:false,“sampler”:{“type”:“const”,“param”:1,“sampling-server-url”:“”,“max-operations”:0,“sampling-refresh-interval”:0},“reporter”:{“queue-size”:0,“buffer-flush-interval”:0,“log-spans”:false,“local-agent-host-port”:“”},“rpc-metrics”:false},“proxy-protocol”:{“networks”:“”,“header-timeout”:5},“tikv-client”:{“grpc-connection-count”:16,“grpc-keepalive-time”:10,“grpc-keepalive-timeout”:3,“commit-timeout”:“41s”},“binlog”:{“enable”:false,“write-timeout”:“15s”,“ignore-error”:false,“binlog-socket”:“”},“compatible-kill-query”:false,“check-mb4-value-in-utf8”:true}
2019/12/27 17:34:13.595 server.go:194: [warning] Secure connection is NOT ENABLED
2019/12/27 17:34:13.597 terror.go:327: [fatal] listen tcp 0.0.0.0:4000: bind: address already in use
github.com/pingcap/errors.AddStack
/home/jenkins/workspace/release_tidb_2.1-ga/go/pkg/mod/github.com/pingcap/errors@v0.11.0/errors.go:174
github.com/pingcap/errors.Trace
/home/jenkins/workspace/release_tidb_2.1-ga/go/pkg/mod/github.com/pingcap/errors@v0.11.0/juju_adaptor.go:12
github.com/pingcap/tidb/server.NewServer
/home/jenkins/workspace/release_tidb_2.1-ga/go/src/github.com/pingcap/tidb/server/server.go:177
main.createServer
/home/jenkins/workspace/release_tidb_2.1-ga/go/src/github.com/pingcap/tidb/tidb-server/main.go:447
main.main
/home/jenkins/workspace/release_tidb_2.1-ga/go/src/github.com/pingcap/tidb/tidb-server/main.go:141
runtime.main
/usr/local/go/src/runtime/proc.go:201
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1333

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

建议参考下下述连接:

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。