V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
opsonly
V2EX  ›  Linux

CentOS7.2 ssh 登录太慢,经排查是一个 systemd-logind 服务没起来,但是 restart 报错,各位遇到过吗

  •  
  •   opsonly · Oct 8, 2019 · 10698 views
    This topic created in 2399 days ago, the information mentioned may be changed or developed.

    Oct 8 15:43:27 dbus[1049]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out Oct 8 15:43:27 systemd-logind: Failed to enable subscription: Connection timed out Oct 8 15:43:27 dbus-daemon: dbus[1049]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out Oct 8 15:43:27 systemd-logind: Failed to fully start up daemon: Connection timed out Oct 8 15:43:27 systemd: systemd-logind.service: main process exited, code=exited, sta

    15 replies    2021-03-11 15:47:45 +08:00
    shakespark
        1
    shakespark  
       Oct 8, 2019   ❤️ 4
    一般来说,ssh 登录慢是因为配置里的 dns 解析没设置为 off
    shyy06
        2
    shyy06  
       Oct 8, 2019
    @shakespark #1 同意。
    qwerthhusn
        3
    qwerthhusn  
       Oct 8, 2019   ❤️ 2
    UseDNS=no
    wodexiaogou
        4
    wodexiaogou  
       Oct 8, 2019
    可以用 journalctl -f 再重启看看,报错会详细些
    opsonly
        5
    opsonly  
    OP
       Oct 8, 2019
    dns 是 no 的,经排查说是登录认证的时候用到了 session 管理器,就是 systemd-logind 服务,但是这个服务器依赖了 org.freedesktop.systemd1 这个,没人遇到过吗
    ytlm
        6
    ytlm  
       Oct 8, 2019 via Android
    1. dns 的问题
    2. GSSAPIAuthentication no 这个配置试一下呢
    3. ssh -vvv 看一下日志
    xfspace
        7
    xfspace  
       Oct 9, 2019 via Android
    systemctl get-default
    opsonly
        8
    opsonly  
    OP
       Oct 9, 2019
    @xfspace multi-user.target
    xfspace
        9
    xfspace  
       Oct 9, 2019 via Android
    UID 0 改名没
    ps1aniuge
        10
    ps1aniuge  
       Oct 9, 2019
    yum update kernel openssh-server openssh-clients
    最后面,有没有 s,我忘了。
    更新内核后,重启下。若还不行,就重装新版。
    opsonly
        11
    opsonly  
    OP
       Oct 9, 2019
    @xfspace 改了 跟这个有关吗
    opsonly
        12
    opsonly  
    OP
       Oct 9, 2019
    @ps1aniuge 已经都更新了,但是感觉没变化
    xfspace
        13
    xfspace  
       Oct 9, 2019 via Android
    @opsonly root 改名确实会导致
    改回去 root 正常 不矢口 CentOS j8 原因

    GNU/Debian 无此问题
    opsonly
        14
    opsonly  
    OP
       Oct 9, 2019
    @xfspace 谢谢老哥!,这个折磨我好久了
    Shawns
        15
    Shawns  
       Mar 11, 2021
    遇到同样问题,翻到旧贴,append 一下解决方法
    systemctl daemon-reexec
    参考 https://access.redhat.com/discussions/3536621
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2363 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 10:33 · PVG 18:33 · LAX 03:33 · JFK 06:33
    ♥ Do have faith in what you're doing.