OpenStack: Unable to Connect to Horizon Dashboard

Aug 10, 2016 Cloud Computing

Packstack Error: Command exceeded timeout
Pretty often after rebooting Controller node or powering it on after shutdown, the Horizon (OpenStack Dashboard) is not responding, but we know that it worked before reboot. This issue may be caused by httpd service (Apache), which entered failed state right after powering on the Controller node.

This results in browser’s connection problem to the Horizon:

chrome_unable to connect

To fix the issue, check Apache HTTP Server status:

[root@controller ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: failed (Result: timeout) since Wed 2016-08-10 20:11:13 CEST; 15min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 6054 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
  Process: 826 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)

Aug 10 20:11:03 controller python[6054]: ERROR:scss.ast:Function not found: function-exists:1
Aug 10 20:11:13 controller python[6054]: Found 'compress' tags in:
Aug 10 20:11:13 controller python[6054]: /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_conf.html
Aug 10 20:11:13 controller python[6054]: /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html
Aug 10 20:11:13 controller python[6054]: /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_scripts.html
Aug 10 20:11:13 controller python[6054]: Compressing... done
Aug 10 20:11:13 controller python[6054]: Compressed 5 block(s) from 3 template(s) for 2 context(s).
Aug 10 20:11:13 controller systemd[1]: Failed to start The Apache HTTP Server.
Aug 10 20:11:13 controller systemd[1]: Unit httpd.service entered failed state.
Aug 10 20:11:13 controller systemd[1]: httpd.service failed.

Above logs show that Apache failed to start, try to restart Apache:

[root@controller ~]# systemctl restart httpd

Now check the Apache status again:

[root@controller ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: active (running) since Wed 2016-08-10 20:27:24 CEST; 11s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 10417 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
  Process: 10397 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)
 Main PID: 10442 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─10442 /usr/sbin/httpd -DFOREGROUND
           ├─10444 /usr/sbin/httpd -DFOREGROUND
           ├─10445 /usr/sbin/httpd -DFOREGROUND
           ├─10446 /usr/sbin/httpd -DFOREGROUND
           ├─10447 /usr/sbin/httpd -DFOREGROUND
           ├─10448 /usr/sbin/httpd -DFOREGROUND
           ├─10449 /usr/sbin/httpd -DFOREGROUND
           ├─10450 /usr/sbin/httpd -DFOREGROUND
           ├─10451 /usr/sbin/httpd -DFOREGROUND
           ├─10452 /usr/sbin/httpd -DFOREGROUND
           ├─10453 keystone-admin  -DFOREGROUND
           ├─10454 keystone-admin  -DFOREGROUND
           ├─10455 keystone-admin  -DFOREGROUND
           ├─10456 keystone-admin  -DFOREGROUND
           ├─10457 keystone-main   -DFOREGROUND
           ├─10458 keystone-main   -DFOREGROUND
           ├─10459 keystone-main   -DFOREGROUND
           ├─10460 keystone-main   -DFOREGROUND
           ├─10461 /usr/sbin/httpd -DFOREGROUND
           ├─10462 /usr/sbin/httpd -DFOREGROUND
           ├─10463 /usr/sbin/httpd -DFOREGROUND
           ├─10464 /usr/sbin/httpd -DFOREGROUND
           ├─10465 /usr/sbin/httpd -DFOREGROUND
           ├─10466 /usr/sbin/httpd -DFOREGROUND
           ├─10467 /usr/sbin/httpd -DFOREGROUND
           ├─10468 /usr/sbin/httpd -DFOREGROUND
           ├─10469 /usr/sbin/httpd -DFOREGROUND
           ├─10470 /usr/sbin/httpd -DFOREGROUND
           └─10471 /usr/sbin/httpd -DFOREGROUND

Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/jquery.ui.tooltip.css'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/animated-overlay.gif'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png'
Aug 10 20:27:02 controller python[10397]: Copying '/usr/share/javascript/jquery_ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png'
Aug 10 20:27:24 controller systemd[1]: Started The Apache HTTP Server.

Apache Server is now fully operational and we can try to login to the Horizon via web browser:

dashboard_splash_screen

One thought on “OpenStack: Unable to Connect to Horizon Dashboard”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.