horizon does not start in devstack

Bug #1216333 reported by gordon chung
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned

Bug Description

in devstack environment i get the following in horizon screen:

openstack@plwdevstack:~/devstack$ cd /opt/stack/horizon && sudo tail -f /var/log/apache2/horizon_error.log || echo "horizon failed to start" | tee "/opt/stack/status/stack/horizon.failure"
tail: cannot open `/var/log/apache2/horizon_error.log' for reading: No such file or directory
horizon failed to start

if i manually create horizon_error.log, it just hangs there.

Revision history for this message
Julie Pichon (jpichon) wrote :

I ran a fresh devstack in a new F19 VM and ./stack.sh completed successfully, with Horizon working fine.

Do the other services run from the command line? What's the output from the end of the stack.sh script run, as it's not always obvious when it failed to complete successfully? Thanks.

Changed in horizon:
status: New → Incomplete
Revision history for this message
gordon chung (chungg) wrote :
Download full text (4.4 KiB)

every service appears to run fine. here's the last few lines of stack.sh script (apologies if this isn't helpful... don't really debug devstack/horizon much):

++ set +o errexit
++ init_tempest
++ local base_image_name=cirros-0.3.1-x86_64
++ local image_dir=/home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec
++ local kernel=/home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-vmlinuz
++ local ramdisk=/home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-initrd
++ local disk_image=/home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-blank.img
++ '[' -f /home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-vmlinuz -a -f /home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-initrd -a -f /home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-blank.img -a libvirt '!=' openvz -a '(' qemu '!=' lxc -o libvirt '!=' libvirt ')' ']'
++ echo 'Prepare aki/ari/ami Images'
Prepare aki/ari/ami Images
++ cat
++ source /home/openstack/devstack/accrc/demo/demo
+++ export EC2_ACCESS_KEY=3bf92b88e94d4cefa5a18c081c44c250
+++ EC2_ACCESS_KEY=3bf92b88e94d4cefa5a18c081c44c250
+++ export EC2_SECRET_KEY=838485dec1404a428ddcaf6a22914a63
+++ EC2_SECRET_KEY=838485dec1404a428ddcaf6a22914a63
+++ export EC2_URL=http://10.0.2.15:8773/services/Cloud
+++ EC2_URL=http://10.0.2.15:8773/services/Cloud
+++ export S3_URL=http://10.0.2.15:3333
+++ S3_URL=http://10.0.2.15:3333
+++ export OS_USERNAME=demo
+++ OS_USERNAME=demo
+++ export OS_TENANT_NAME=demo
+++ OS_TENANT_NAME=demo
+++ export OS_AUTH_URL=http://10.0.2.15:35357/v2.0
+++ OS_AUTH_URL=http://10.0.2.15:35357/v2.0
+++ export EC2_CERT=/home/openstack/devstack/accrc/demo/demo-cert.pem
+++ EC2_CERT=/home/openstack/devstack/accrc/demo/demo-cert.pem
+++ export EC2_PRIVATE_KEY=/home/openstack/devstack/accrc/demo/demo-pk.pem
+++ EC2_PRIVATE_KEY=/home/openstack/devstack/accrc/demo/demo-pk.pem
+++ export EC2_USER_ID=42
+++ EC2_USER_ID=42
+++ export EUCALYPTUS_CERT=/home/openstack/devstack/accrc/cacert.pem
+++ EUCALYPTUS_CERT=/home/openstack/devstack/accrc/cacert.pem
+++ export NOVA_CERT=/home/openstack/devstack/accrc/cacert.pem
+++ NOVA_CERT=/home/openstack/devstack/accrc/cacert.pem
++ euca-bundle-image -i /home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-vmlinuz --kernel true -d /home/openstack/devstack/files/images/s3-materials/cirros-0.3.1
Checking image
Encrypting image
Splitting image...
Part: cirros-0.3.1-x86_64-vmlinuz.part.00
Generating manifest /home/openstack/devstack/files/images/s3-materials/cirros-0.3.1/cirros-0.3.1-x86_64-vmlinuz.manifest.xml
++ euca-bundle-image -i /home/openstack/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-initrd --ramdisk true -d /home/openstack/devstack/files/images/s3-materials/cirros-0.3.1
Checking image
Encrypting image
Splitting image...
Part: cirros-0.3.1-x86_64-initrd.part.00
Generating manifest /home/openstack/devstack/files/images/s3-materials/cirros-0.3.1/cirros-0.3.1-x86_64-initrd.manifest.xml
++ euca-bundle-image -i /home/openstack/devstack/files/images/cirros-0....

Read more...

Revision history for this message
gordon chung (chungg) wrote :

i've confirm this happens on a colleague's machine as -- we both started from the same ubuntu 12.04 image at the beginning of the year. is there a place to check logs to debug the issue or is horizon_error.log(the file not created) the only error source?

Revision history for this message
Jarek Miszczyk (6-jarek) wrote :

Here's how to fix this issue:

1. Check the content of the /etc/apache2/sites-enabled directory. You will see two files:
horizon
horizon.conf
2. Remove the file named horizon
sudo rm /etc/apache2/sites-enabled/horizon

3. Start Apache
sudo /etc/init.d/apache2 start

4. Restart horizon

screen -r stack

Navigate to the Horizon screen (CTL-A then press 2)
Rerun the last command. Should be something like this:
/opt/stack/horizon$ cd /opt/stack/horizon && sudo tail -f /var/log/apache2/horizon_error.log || echo "horizon failed to start" | tee "/opt/stack/status/stack/horizon.failure"

This fixes the issue on my two separate Ubuntu systems.

Revision history for this message
gordon chung (chungg) wrote :

awesome, that fixed my issue. not sure how i got the extra horizon file but Jarek's steps worked for me. thanks.

Revision history for this message
Martijn Evers (mevers) wrote :

FYI

Every time I executed ./stack I got the same error and had to repeat Jarek's steps again. Both horizon and horizon.conf contained similar content so I removed them both:
sudo rm /etc/apache2/sites-available/horizon* && sudo rm /etc/apache2/sites-enabled/horizon*

When I run ./stack on the master branch of DevStack the "horizon.conf" file is created. Then when I perform:
git fetch https://review.openstack.org/openstack-dev/devstack refs/changes/59/40759/13 && git checkout FETCH_HEAD

to install Docker as Nova hypervisor (see: http://blog.docker.io/2013/06/openstack-docker-manage-linux-containers-with-nova/) and run ./stack, then "horizon" is created. Because of this apache fails to start because I got duplicate configuration.

Revision history for this message
Sukhdev Kapur (sukhdev-8) wrote :

I am hitting the same issue, but the steps described above do not seem to help

Revision history for this message
Ravi Chunduru (ravivsn) wrote :

I see the same issue. Devstack needs fix.

Changed in horizon:
status: Incomplete → Opinion
status: Opinion → Confirmed
Revision history for this message
Ravi Chunduru (ravivsn) wrote :

I deleted horizon file in /etc/apache2/sites-enabled, ./unstack.sh and ./stack.sh solved issue for me.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

This is not a bug of Horizon, so i marked it as "Invalid".

Talking about devstack, devstack does not consider the backward compatibility due to its nature of the development tool.
AFAIK, apache horizon configuration files was found at /etc/apache2/site-available/horizon and it is changed to horizon.conf to support Fedora environment. (See the commit log of devstack for the background.) We need to clean up orphaned files like this manually.

If you still have a fresh install of your OS (Fedora or Ubuntu), please report a bug to devstack not Horizon.

Changed in horizon:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.