next up previous contents
Next: 其他及問題解決 Up: Dashboard Previous: 測試   Contents

除錯

  1. dashboard 登入畫面沒有 domain 可選,無法登入,檢查 memcached 服務啟動失敗。
    Image queens-dashboard-wrong
    [root@controller ~]# systemctl status memcached.service 
    ● memcached.service - memcached daemon
       Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2018-09-18 19:34:49 CST; 5s ago
      Process: 177450 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} 
    -c ${MAXCONN} $OPTIONS (code=exited, status=71)
     Main PID: 177450 (code=exited, status=71)
    
    Sep 18 19:34:49 controller systemd[1]: Started memcached daemon.
    Sep 18 19:34:49 controller systemd[1]: Starting memcached daemon...
    Sep 18 19:34:49 controller memcached[177450]: bind(): Cannot assign requested address
    Sep 18 19:34:49 controller memcached[177450]: failed to listen on TCP port 11211: 
    Cannot assign requested address
    Sep 18 19:34:49 controller systemd[1]: memcached.service: main process exited, 
    code=exited, status=71/n/a
    Sep 18 19:34:49 controller systemd[1]: Unit memcached.service entered failed state.
    Sep 18 19:34:49 controller systemd[1]: memcached.service failed.
    
  2. /usr/bin/memcached 執行命令的參數在 /etc/sysconfig/memcached
    [root@controller ~]# cat /etc/sysconfig/memcached 
    PORT="11211"
    USER="memcached"
    MAXCONN="1024"
    CACHESIZE="64"
    OPTIONS="-l 163.17.10.112,::1"
    
  3. 問題出在 /etc/sysconfig/memcached 中 OPTIONS 參數不對,修改如下:
    [root@controller ~]# grep OPTION /etc/sysconfig/memcached 
    OPTIONS="-l 163.17.10.112"
    
  4. 重新啟動 memcached 服務,狀態正常。
    [root@controller ~]# systemctl restart memcached.service 
    [root@controller ~]# systemctl status memcached.service 
    ● memcached.service - memcached daemon
       Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
       Active: active (running) since Tue 2018-09-18 19:40:44 CST; 4s ago
     Main PID: 178062 (memcached)
        Tasks: 10
       CGroup: /system.slice/memcached.service
               └─178062 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 163.17.10.112
    
    Sep 18 19:40:44 controller systemd[1]: Started memcached daemon.
    Sep 18 19:40:44 controller systemd[1]: Starting memcached daemon...
    


De-Yu Wang 2018-12-12