openstack控制节点关闭ipv6后登陆dashboard提示出错

1.查看httpd日志发现cache不可用

[root@controller ~]# cat /var/log/httpd/error_log
[Thu Dec 26 15:04:17.709174 2019] [:error] [pid 5282] return handler(request, *args, **kwargs)
[Thu Dec 26 15:04:17.709175 2019] [:error] [pid 5282] File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py", line 183, in post
[Thu Dec 26 15:04:17.709176 2019] [:error] [pid 5282] return self.form_valid(form)
[Thu Dec 26 15:04:17.709177 2019] [:error] [pid 5282] File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 119, in form_valid
[Thu Dec 26 15:04:17.709179 2019] [:error] [pid 5282] auth_login(self.request, form.get_user())
[Thu Dec 26 15:04:17.709180 2019] [:error] [pid 5282] File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 140, in login
[Thu Dec 26 15:04:17.709181 2019] [:error] [pid 5282] request.session.cycle_key()
[Thu Dec 26 15:04:17.709182 2019] [:error] [pid 5282] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 311, in cycle_key
[Thu Dec 26 15:04:17.709188 2019] [:error] [pid 5282] self.create()
[Thu Dec 26 15:04:17.709189 2019] [:error] [pid 5282] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 52, in create
[Thu Dec 26 15:04:17.709191 2019] [:error] [pid 5282] "Unable to create a new session key. "
[Thu Dec 26 15:04:17.709192 2019] [:error] [pid 5282] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

2.查看memcached发现服务没起来

[root@controller ~]# systemctl status memcached
● memcached.service - memcached daemon
   Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-12-26 13:44:54 CST; 1h 22min ago
  Process: 1678 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=exited, status=71)
 Main PID: 1678 (code=exited, status=71)

Dec 26 13:44:54 controller systemd[1]: Started memcached daemon.
Dec 26 13:44:54 controller systemd[1]: Starting memcached daemon...
Dec 26 13:44:54 controller memcached[1678]: bind(): Cannot assign requested address
Dec 26 13:44:54 controller memcached[1678]: failed to listen on TCP port 11211: Cannot assign requested address
Dec 26 13:44:54 controller systemd[1]: memcached.service: main process exited, code=exited, status=71/n/a
Dec 26 13:44:54 controller systemd[1]: Unit memcached.service entered failed state.
Dec 26 13:44:54 controller systemd[1]: memcached.service failed.

3.打开memcache配置文件,把,::1删除

[root@controller ~]# cat /etc/sysconfig/memcached 
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l controller,::1"

4.最后重启一下memcache就好了,打开dashboard直接可以登陆。

[root@controller ~]# systemctl restart memcached

转载请注明来源,谢谢:Linux备忘录 » openstack控制节点关闭ipv6后登陆dashboard提示出错

相关推荐

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址