Installation fails when apache is not running as apache.apache

Bug #797726 reported by Yongqin Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Dashboard (deprecated)
Invalid
Undecided
Unassigned
django-debian
Confirmed
Medium
Unassigned

Bug Description

after installed launch-control with the Instructions, an "Internal Server Error" occurs when access "http://localhost/launch-control/".

> sudo apt-get install libapache2-mod-wsgi
> sudo a2enmod wsgi
> sudo add-apt-repository ppa:zkrynicki/lava
> sudo apt-get update
> sudo apt-get install launch-control-sqlite launch-control

> Afterwards the system will ask you some questions. The only important
> one is the database backend question, please make sure to select the
> one that corresponds to the package selection made earlier. When
> prompted for database password just use the default automatically
> generated value.
>
> The dashboard should now be available at
> http://localhost/launch-control
> Note: the system is available to anyone that can connect to your host,
> that is, it listens on 0.0.0.0, not on 127.0.0.1.

The reason is that i have changed the apache instance's user and group to apache in "/etc/apache2/envvars" as bellow:

#export APACHE_RUN_USER=www-data
#export APACHE_RUN_GROUP=www-data
export APACHE_RUN_GROUP=apache
export APACHE_RUN_USER=apache

and the process about chat and resolution,please chech the attachment.Including irc chat log and mails

Revision history for this message
Yongqin Liu (liuyq0307) wrote :
Changed in lava-dashboard:
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

To fix this we'd need to detect unsupported installation attempt and notify the user.

Alternatively we could somehow adapt to the proper user (instead of www-data) but I don't know any interface to query apache for such information.

summary: - "Internal Server Error" occurs when access "http://localhost/launch-
- control/"
+ Installation fails when apache is not running as apache.apache
Changed in django-debian:
status: New → Confirmed
importance: Undecided → Medium
Changed in lava-dashboard:
status: New → Invalid
assignee: Zygmunt Krynicki (zkrynicki) → nobody
Revision history for this message
Yongqin Liu (liuyq0307) wrote :
Download full text (3.5 KiB)

when i move the "/usr/local/lib" back with command "sudo mv /usr/local/lib.old/ /usr/local/lib",
"Internal Server Error" happens again.

but if i move /usr/local/lib to /usr/local/lib.old, the error does not happen, and it becames normal.

log info in "/var/log/apache2/error.log" is as bellow, can you help me to resolve this error?

[Thu Jun 16 01:44:33 2011] [error] /usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/contrib/csrf/middleware.py:6: DeprecationWarning: This import for CSRF functionality is deprecated. Please use django.middleware.csrf for the middleware and django.views.decorators.csrf for decorators.
615 [Thu Jun 16 01:44:33 2011] [error] DeprecationWarning
616 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] mod_wsgi (pid=3810): Exception occurred processing WSGI script '/etc/launch-control/web-server/apache2/standard.wsgi'.
617 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] Traceback (most recent call last):
618 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/handlers/wsgi.py", line 273, in __call_ _
619 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] response = self.get_response(request)
620 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py", line 169, in get_res ponse
621 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
622 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py", line 214, in handle_ uncaught_exception
623 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] if resolver.urlconf_module is None:
624 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/urlresolvers.py", line 274, in _get_url conf_module
625 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] self._urlconf_module = import_module(self.urlconf_name)
626 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/utils/importlib.py", line 35, in import_modu le
627 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] __import__(name)
628 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/lib/pymodules/python2.6/dashboard_server/urls.py", line 25, in <module>
629 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] from dashboard_app.views import dashboard_xml_rpc_handler
630 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/lib/pymodules/python2.6/dashboard_app/views.py", line 33, in <module>
631 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] from dashboard_app.models import (Attachment, BundleStream, TestRun, TestResult, DataReport)
632 [Thu Jun 16 01:44:33 2011] [error] [client 127.0.0.1] File "/usr/lib/pymodules/python2.6/dashboard_app/models.py", line 41, in <module>
633 [Thu Jun 16 01:44:33 2011] [error] [c...

Read more...

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Your /usr/local/lib has lots of incompatible dashboard libraries installed. You need to remove them first.

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

but can you tell me which dashboard libraries are incompatible, and how to remove them?

In the "/usr/local/lib/python2.6/dist-packages/", there are libraries for other applications,
for example, there are Babel-0.9.5-py2.6.egg and Trac-0.12.2-py2.6.egg in the directory.

below is the libraries list in "/usr/local/lib/python2.6/dist-packages/":
17:48:32 liuyq:record_replay$ ll /usr/local/lib/python2.6/dist-packages/
总用量 3864
drwxrwsr-x 10 root staff 4096 2011-06-15 09:41 ./
drwxrwsr-x 4 root staff 4096 2010-04-29 22:18 ../
drwxr-sr-x 4 root staff 4096 2011-03-10 09:38 Babel-0.9.5-py2.6.egg/
-rw-r--r-- 1 root root 375129 2011-06-15 09:41 distribute-0.6.19-py2.6.egg
drwxr-sr-x 4 root staff 4096 2011-06-15 09:35 Django-1.3-py2.6.egg/
drwxr-sr-x 4 root staff 4096 2011-06-10 19:51 docutils-0.7-py2.6.egg/
-rw-r--r-- 1 root staff 623 2011-06-15 09:41 easy-install.pth
-rw-r--r-- 1 root staff 261064 2011-03-10 13:18 Genshi-0.6-py2.6.egg
drwxr-sr-x 4 root staff 4096 2011-06-10 19:51 Jinja2-2.5.5-py2.6.egg/
-rw-r--r-- 1 root staff 34562 2011-06-15 09:40 linaro_dashboard_bundle-1.5-py2.6.egg
drwxr-sr-x 4 root staff 4096 2011-06-15 09:31 linaro_django_pagination-2.0-py2.6.egg/
-rw-r--r-- 1 root staff 36243 2011-06-14 21:56 linaro_json-2.0-py2.6.egg
-rw-r--r-- 1 root staff 80104 2011-06-14 21:02 linaro_python_json-1.1-py2.6.egg
drwxr-sr-x 4 root staff 4096 2011-06-10 19:52 Pygments-1.4-py2.6.egg/
drwxr-sr-x 3 root staff 4096 2011-06-15 09:41 setuptools-0.6c11-py2.6.egg/
-rw-r--r-- 1 root staff 144 2011-06-15 09:41 setuptools-0.6c11-py2.6.egg-info
-rw-r--r-- 1 root staff 333453 2011-03-10 13:46 setuptools-0.6c11-py2.6.egg.OLD.1308102081.33
-rw-r--r-- 1 root staff 34 2011-06-15 09:41 setuptools.pth
-rw-r--r-- 1 root root 115903 2011-06-14 21:03 simplejson-2.1.6-py2.6-linux-i686.egg
drwxr-sr-x 4 root staff 4096 2011-06-10 19:50 Sphinx-1.0.7-py2.6.egg/
-rw-r--r-- 1 root staff 2651054 2011-03-10 09:44 Trac-0.12.2-py2.6.egg
17:48:41 liuyq:record_replay$

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: [Bug 797726] Re: Installation fails when apache is not running as apache.apache

W dniu 16.06.2011 11:50, Liu Yongqin pisze:
> but can you tell me which dashboard libraries are incompatible, and how
> to remove them?

If you need to use your local libraries please do so with virtualenv not
to mess with system-installed libraries.

 From the list below I would remove everything except for Babel and
Track. In general as soon as you start putting python libraries in
/usr/local we cannot support you.

Best regards
ZK

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.