Bug 1119920 - http://ip/dashboard 404 from all-in-one rdo install on rhel7
Summary: http://ip/dashboard 404 from all-in-one rdo install on rhel7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-packstack
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ivan Chavero
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: 1129379
TreeView+ depends on / blocked
 
Reported: 2014-07-15 20:48 UTC by wes hayutin
Modified: 2019-08-15 03:54 UTC (History)
10 users (show)

Fixed In Version: openstack-puppet-modules-2014.1.1-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1129379 (view as bug list)
Environment:
Last Closed: 2016-03-30 23:07:55 UTC


Attachments (Terms of Use)
horizon config (50.00 KB, application/x-tar)
2014-07-15 20:48 UTC, wes hayutin
no flags Details
httpd configuration (1.12 KB, text/plain)
2014-07-16 14:59 UTC, Julie Pichon
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 113257 0 None MERGED Remove ServerAlias definitions 2020-04-01 04:43:54 UTC
OpenStack gerrit 113607 0 None MERGED Fixed remote DB installations 2020-04-01 04:43:54 UTC

Description wes hayutin 2014-07-15 20:48:46 UTC
Created attachment 918249 [details]
horizon config

Description of problem:

Horizon is installed, port 80 is listening.

python-django-horizon-2014.1.1-3.el7.noarch
[root@packstack httpd]# getenforce 
Permissive

[root@packstack httpd]# service httpd status -l
Redirecting to /bin/systemctl status  -l httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: active (running) since Tue 2014-07-15 16:23:19 EDT; 13min ago
  Process: 31469 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 31477 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─31477 /usr/sbin/httpd -DFOREGROUND
           ├─31478 /usr/sbin/httpd -DFOREGROUND
           ├─31479 /usr/sbin/httpd -DFOREGROUND
           ├─31480 /usr/sbin/httpd -DFOREGROUND
           ├─31481 /usr/sbin/httpd -DFOREGROUND
           ├─31482 /usr/sbin/httpd -DFOREGROUND
           ├─31483 /usr/sbin/httpd -DFOREGROUND
           ├─31484 /usr/sbin/httpd -DFOREGROUND
           ├─31485 /usr/sbin/httpd -DFOREGROUND
           ├─31486 /usr/sbin/httpd -DFOREGROUND
           ├─31487 /usr/sbin/httpd -DFOREGROUND
           └─31488 /usr/sbin/httpd -DFOREGROUND

Jul 15 16:23:19 packstack.example.com httpd[31477]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/ports.conf:7
Jul 15 16:23:19 packstack.example.com systemd[1]: Started The Apache HTTP Server.
[root@packstack httpd]# 


==== access log====

10.10.48.50 - - [15/Jul/2014:16:23:39 -0400] "GET / HTTP/1.1" 200 278 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
10.10.48.50 - - [15/Jul/2014:16:23:39 -0400] "GET /icons/blank.gif HTTP/1.1" 404 213 "http://10.8.52.163/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
10.10.48.50 - - [15/Jul/2014:16:35:31 -0400] "GET /dashboard HTTP/1.1" 404 207 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"

=== error log ===
[Tue Jul 15 16:21:41.658731 2014] [suexec:notice] [pid 31115] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jul 15 16:21:41.675097 2014] [auth_digest:notice] [pid 31115] AH01757: generating secret for digest authentication ...
[Tue Jul 15 16:21:41.692101 2014] [mpm_prefork:notice] [pid 31115] AH00163: Apache/2.4.6 (Red Hat) PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Tue Jul 15 16:21:41.692175 2014] [core:notice] [pid 31115] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue Jul 15 16:23:18.390984 2014] [mpm_prefork:notice] [pid 31115] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Jul 15 16:23:19.451547 2014] [core:notice] [pid 31477] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Jul 15 16:23:19.452557 2014] [suexec:notice] [pid 31477] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jul 15 16:23:19.467166 2014] [auth_digest:notice] [pid 31477] AH01757: generating secret for digest authentication ...
[Tue Jul 15 16:23:19.480598 2014] [mpm_prefork:notice] [pid 31477] AH00163: Apache/2.4.6 (Red Hat) PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Tue Jul 15 16:23:19.480642 2014] [core:notice] [pid 31477] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[root@packstack httpd]#

Comment 1 Matthias Runge 2014-07-16 07:10:05 UTC
Is this an unmodified config from packstack? Did you enable SSL?

Please attach /etc/httpd/conf.d/openstack-dashboard.conf

Thanks.

Comment 2 Julie Pichon 2014-07-16 14:58:28 UTC
Wes gave me access to the system, I'm leaving the needinfo for the other information request though (re: unmodified config?).

There was no /etc/httpd/conf.d/openstack-dashboard.conf file but a /etc/httpd/conf.d/15-horizon_vhost.conf (attached). I noticed this bit at the end:

  ServerAlias 172.16.7.12
  ServerAlias packstack.novalocal
  ServerAlias localhost

Horizon is accessible from localhost but not using http://10.8.52.163/. Adding a new line with:

  ServerAlias 10.8.52.163

and restarting httpd fixed the problem.

This is just a workaround though, we should still figure out how to get this configured correctly from the start.

Comment 3 Julie Pichon 2014-07-16 14:59:03 UTC
Created attachment 918448 [details]
httpd configuration

Comment 4 Julie Pichon 2014-07-16 15:57:26 UTC
Looking at a machine I set up a while back that has /etc/httpd/conf.d/openstack-dashboard.conf, it used to be we didn't have any ServerAlias attribute, which I take it made the dashboard accessible with any URL by default.

Comment 5 Matthias Runge 2014-07-17 06:08:01 UTC
Do I get it right, the system was set up by packstack, configs were not modified after setup, and trying to access the dashboard just gave a 404?

Comment 6 Julie Pichon 2014-08-06 14:08:13 UTC
I think someone else hit this issue again: https://ask.openstack.org/en/question/44151/red-hat-rdo-horizon-dashboard-will-not-load-from-internet/

I'm moving this to packstack as I think this is where the new 15-horizon_vhost.conf is set up. I'd like to suggest removing the ServerAlias definitions altogether if possible, to avoid this kind of confusion.

Comment 7 Ivan Chavero 2014-08-12 15:24:47 UTC
in order to avoid this problem we should set: ServerAlias * to accept from all ip's or names. This way if there's some kind of redirection (NAT, load balancer, reverse proxy, etc...) connections always be accepted.

Comment 8 Ivan Chavero 2014-08-12 18:29:01 UTC
icehouse backport created: https://review.openstack.org/#/c/113607/

Comment 9 Alan Pevec 2014-08-14 20:37:24 UTC
(In reply to Ivan Chavero from comment #8)
> icehouse backport created: https://review.openstack.org/#/c/113607/

Is that right patch for this _horizon_ issue?

"Fixed remote DB installations
This patch fixes host resolution for MySQL/MariaDB remote installation...."

Comment 10 wes hayutin 2014-09-03 18:53:16 UTC
We need this fix pushed into RDO

python-django-horizon-2014.1.2-1.el7ost.noarch
openstack-packstack-2014.1.1-0.37.dev1238.el7ost.noarch

Comment 11 Kal McFate 2015-07-20 16:00:56 UTC
This is still happening because the default vhost overrides the vhost with no ServerAlias:

VirtualHost configuration:
192.0.2.10:80          is a NameVirtualHost
         default server default (/etc/httpd/conf.d/15-default.conf:6)
         port 80 namevhost default (/etc/httpd/conf.d/15-default.conf:6)
         port 80 namevhost overcloud-controller-0.localdomain (/etc/httpd/conf.d/15-horizon_vhost.conf:6)
                 alias overcloud-controller-0.localdomain

Comment 12 Matthias Runge 2015-07-21 05:57:13 UTC
yepp, that happens, e.g. when installing horizon inside an openstack install, i.e. you can not know the floating ip of the instance.

Comment 13 sudhir agarwal 2018-06-07 05:44:56 UTC
Hi,
I have installed queens multi node setup. I can see that this bug is still there. i am not able to login to the openstack dashboard. i tried removing all the ServerAlias and also tried giving ServerAlias * . but nothing worked.

I don't have openstack-dashboard.conf, instead i have 15-horizon-vhost.conf and 15-horizon-ssl-vhost.conf.


Note You need to log in before you can comment on or make changes to this bug.