当前位置: 首页 > article >正文

【排错记录】免密、nginx、cgroup、sshd

1、免密登录回显很慢。

现象:

免密登录超级慢,而且巡检脚本跑不起来

在这里插入图片描述

解决:

vi /etc/ssh/sshd_config


GSSAPIAuthentication no
UseDNS no

systemctl restart sshd

2、nginx服务起不来

现象:

Redirecting to /bin/systemctl restart nginx.service
Not running (pidfile not found)
Started [2796]
Restarting php-fpm (via systemctl):  Job for php-fpm.service failed because the control process exited with error code. See "systemctl statu
s php-fpm.service" and "journalctl -xe" for details.
[FAILED]
Connection to 172.25.44.70 closed.
[2025-01-09 15:15:15][Error] Launching worker at 172.25.44.70 Failed

[root@qingtengserver data]# systemctl restart php-fpm.service
Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -x
e" for details.
[root@qingtengserver data]# systemctl status php-fpm.service
● php-fpm.service - LSB: starts php-fpm
   Loaded: loaded (/etc/rc.d/init.d/php-fpm; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2025-01-09 15:17:19 CST; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3935 ExecStart=/etc/rc.d/init.d/php-fpm start (code=exited, status=1/FAILURE)

Jan 09 15:17:19 qingtengserver php-fpm[3935]: Starting php-fpm [09-Jan-2025 15:17:19] NOTICE: [pool www] 'user' directive is ignor...as root
Jan 09 15:17:19 qingtengserver php-fpm[3935]: [09-Jan-2025 15:17:19] NOTICE: [pool www] 'group' directive is ignored when FPM is n...as root
Jan 09 15:17:19 qingtengserver php-fpm[3935]: [09-Jan-2025 15:17:19] ERROR: unable to bind listening socket for address '/dev/shm/...ed (13)
Jan 09 15:17:19 qingtengserver php-fpm[3935]: [09-Jan-2025 15:17:19] ERROR: FPM initialization failed
Jan 09 15:17:19 qingtengserver runuser[3940]: pam_unix(runuser:session): session closed for user nginx
Jan 09 15:17:19 qingtengserver php-fpm[3935]: [16B blob data]
Jan 09 15:17:19 qingtengserver systemd[1]: php-fpm.service: control process exited, code=exited status=1
Jan 09 15:17:19 qingtengserver systemd[1]: Failed to start LSB: starts php-fpm.
Jan 09 15:17:19 qingtengserver systemd[1]: Unit php-fpm.service entered failed state.
Jan 09 15:17:19 qingtengserver systemd[1]: php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

解决:

错误信息:

ERROR: unable to bind listening socket for address '/dev/shm/...ed (13)
ERROR: FPM initialization failed
ls -ld /dev/shm
chmod 777 /dev/shm

3、安装k3s出现CPU cgroup问题。

现象:

在这里插入图片描述

Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.241955022+08:00" level=warning msg="Unable to find cpu cgroup in mounts"
Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.241974743+08:00" level=warning msg="Unable to find blkio cgroup in mounts"
Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.241988963+08:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.242001892+08:00" level=warning msg="Unable to find pids cgroup in mounts"
Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.242483541+08:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcont
Jan 10 10:17:49 qingtengserver dockerd[4747]: time="2025-01-10T10:17:49.242505783+08:00" level=info msg="stopping event stream following graceful shutdown" error="contex
Jan 10 10:17:50 qingtengserver dockerd[4747]: failed to start daemon: Devices cgroup isn't mounted
Jan 10 10:17:50 qingtengserver systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jan 10 10:17:50 qingtengserver systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Jan 10 10:17:50 qingtengserver systemd[1]: Unit docker.service entered failed state.
Jan 10 10:17:50 qingtengserver systemd[1]: docker.service failed.
Jan 10 10:17:50 qingtengserver systemd[1]: docker.service holdoff time over, scheduling restart.
Jan 10 10:17:50 qingtengserver systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has finished shutting down.
Jan 10 10:17:50 qingtengserver systemd[1]: start request repeated too quickly for docker.service
Jan 10 10:17:50 qingtengserver systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Jan 10 10:17:50 qingtengserver systemd[1]: Unit docker.service entered failed state.
Jan 10 10:17:50 qingtengserver systemd[1]: docker.service failed.

解决:

echo 'none  /sys/fs/cgroup  cgroup  defaults    0   0' >> /etc/fstab
reboot

4、ssh服务启动失败

现象:

[root@qingtengserver x86_64]# systemctl status sshd
● sshd.service - SYSV: OpenSSH server daemon
   Loaded: loaded (/etc/rc.d/init.d/sshd; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2025-01-10 17:28:31 CST; 1min 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 485146 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=1/FAILURE)

Jan 10 17:28:31 qingtengserver sshd[485146]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Jan 10 17:28:31 qingtengserver sshd[485146]: Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.
Jan 10 17:28:31 qingtengserver sshd[485146]: It is required that your private key files are NOT accessible by others.
Jan 10 17:28:31 qingtengserver sshd[485146]: This private key will be ignored.
Jan 10 17:28:31 qingtengserver sshd[485146]: sshd: no hostkeys available -- exiting.
Jan 10 17:28:31 qingtengserver sshd[485146]: [FAILED]
Jan 10 17:28:31 qingtengserver systemd[1]: sshd.service: control process exited, code=exited status=1
Jan 10 17:28:31 qingtengserver systemd[1]: Failed to start SYSV: OpenSSH server daemon.
Jan 10 17:28:31 qingtengserver systemd[1]: Unit sshd.service entered failed state.
Jan 10 17:28:31 qingtengserver systemd[1]: sshd.service failed.

解决:

ls -l /etc/ssh/ssh_host_*_key

chmod 600 /etc/ssh/ssh_host_*_key

chown root:root /etc/ssh/ssh_host_*_key

systemctl restart sshd

firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload

http://www.kler.cn/a/506785.html

相关文章:

  • 镭速大文件传输视频文件预览实现原理
  • Redis延迟队列详解
  • Spring Boot 动态表操作服务实现
  • 单片机存储器和C程序编译过程
  • 【网络云SRE运维开发】2025第3周-每日【2025/01/15】小测-【第14章ospf高级配置】理论和实操解析
  • Java SpringBoot + Vue + Uniapp 集成JustAuth 最快实现多端三方登录!(QQ登录、微信登录、支付宝登录……)
  • css 原子化
  • iOS页面设计:UIScrollView布局问题与应对策略
  • 【promethues 9090占用端口】没有网络,如何杀掉9090端口暂用的进程
  • Android 后台线程
  • 4. 使用springboot做一个音乐播放器软件项目【数据库表的创建】
  • 国产linux系统(银河麒麟,统信uos)使用 PageOffice 实现后台批量生成PDF文档
  • Math Reference Notes: 矩阵性质
  • python管理工具:conda部署+使用
  • 《黄金像凶杀案-再起》V1.2.0+Dlcs官方中文学习版
  • VIVADO FIFO (同步和异步) IP 核详细使用配置步骤
  • GO语言实现KMP算法
  • 代码随想录算法训练营第 9 天(字符串2)| 151.翻转字符串里的单词 卡码网55.右旋转字符串 KMP(跳过) 总结
  • 【Python基础篇】——第3篇:从入门到精通:掌握Python数据类型与数据结构
  • kubernetes第九天
  • 如何解决Outlook无法连接到服务器的问题
  • CentOS 9 Stream 上安装 Node.js 18.20.5
  • 《零基础Go语言算法实战》【题目 5-1】按照给定条件构建二叉树
  • Android SystemUI——车载CarSystemUI加载(八)
  • Gateway怎么实现限流的
  • HTML中最基本的东西