标题: Ubuntu 18.04 ubuntu用户无法连接或连接异常fork rejected by pids controller [打印本页] 作者: mahan 时间: 2024-9-29 14:53 标题: Ubuntu 18.04 ubuntu用户无法连接或连接异常fork rejected by pids controller vim /var/log/kern.log
Jun 17 15:58:39 xxx-test kernel: [18331086.218947] cgroup: fork rejected by pids controller in /user.slice/user-1
000.slice/session-32191.scope
vim /var/log/syslog
Jun 17 15:13:09 xxx-test systemd[1]: Started Session 32154 of user ubuntu.
Jun 17 15:13:09 xxx-test kernel: [18328355.716497] cgroup: fork rejected by pids controller in /user.slice/user-1
000.slice/session-32154.scope
user-1000对应的用户是ubuntu
查看ubuntu用户的状态
root@xxx-test:~# systemctl status user-1000.slice
● user-1000.slice - User Slice of ubuntu
Loaded: loaded (/run/systemd/transient/user-1000.slice; transient)
Transient: yes
Active: active since Fri 2022-06-17 17:04:36 CST; 1s ago
Tasks: 2 (limit: 10813)
CGroup: /user.slice/user-1000.slice
└─user@1000.service
└─init.scope
├─22238 /lib/systemd/systemd --user
└─22240 (sd-pam)
修改ubuntu用户的TasksMax
root@xxx-test:~# cat /run/systemd/transient/user-1000.slice
# This is a transient unit file, created programmatically via the systemd API. Do not edit.
[Unit]
Description=User Slice of ubuntu
After=systemd-logind.service
After=systemd-user-sessions.service