The connection to the server xx:6443 was refused - did you specify the right host or port?

今天打开数据库的时候发现无法连接,然后发现kubectl无法使用。kubelet服务是正常运行的。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第1张图片
尝试重启Docker服务。重启失败。

[root@liufeifei ~]# systemctl restart docker

Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
The connection to the server xx:6443 was refused - did you specify the right host or port?_第2张图片
根据提示,执行以下命令:journalctl -xe

imjournal: fclose() failed for path: ‘/var/lib/rsyslog/imjournal.state.tmp’: No space left on device [v8.24.0-5
The connection to the server xx:6443 was refused - did you specify the right host or port?_第3张图片
执行top命令,再输入大写M,按照内存排序。rsyslogd占用了23.1%的内存。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第4张图片
systemctl status rsyslog
查询rsyslog服务的运行状态。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第5张图片
我将/var/log/journal路径下的文件夹都删除掉。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第6张图片
重启rsyslog服务。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第7张图片
重启docker服务,正常运行。kubectl服务恢复,数据库连接恢复。
The connection to the server xx:6443 was refused - did you specify the right host or port?_第8张图片

参考:
rsyslog 占用内存高解决方法
解决rsyslog服务占用内存过高

你可能感兴趣的:(kubernetes)