Bug 430589

Summary: ipa server returns "internal error" to WebUI with default ipa-server install
Product: [Retired] freeIPA Reporter: Yi Zhang <yzhang>
Component: ipa-serverAssignee: Karl MacMillan <kmacmill>
Status: CLOSED NOTABUG QA Contact: Chandrasekar Kannan <ckannan>
Severity: high Docs Contact:
Priority: high    
Version: 1.0CC: benl, ckannan, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-29 02:52:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yi Zhang 2008-01-28 21:42:18 UTC
Description of problem: When install IPA server with default command
"ipa-server-install", the WebUI returns "internal error"


Version-Release number of selected component (if applicable): Based on 1/25/2008
build


How reproducible: always


Steps to Reproduce:
1. yum install ipa-server ipa-admintools
2. ipa-server-install
3. kinit admin
4. open firefox browser, go to http://<ipa server>
  
Actual results: Web UI reports "internal error"

Expected results: show browser configuration page, and can allow user login later on


Additional info: log message from /var/log/ipa_error.log post below

==================

[Mon Jan 28 06:34:26 2008] [info] Connection to child 3 established (server
f7d.ipaqa.com:443, client 172.16.142.133)
[Mon Jan 28 06:34:26 2008] [info] Initial (No.1) HTTPS request received for
child 3 (server f7d.ipaqa.com:443)
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1435): [client
172.16.142.133] kerb_authenticate_user entered with user (NULL) and auth_type
Kerberos
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1148): [client
172.16.142.133] Acquiring creds for HTTP.com
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1270): [client
172.16.142.133] Verifying client data using KRB5 GSS-API
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1286): [client
172.16.142.133] Verification returned code 0
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1304): [client
172.16.142.133] GSS-API token of length 156 bytes will be sent back
[Mon Jan 28 06:34:26 2008] [debug] src/mod_auth_kerb.c(1351): [client
172.16.142.133] set cached name admin for connection
[Mon Jan 28 06:34:27 2008] [info] Connection to child 3 closed (server
f7d.ipaqa.com:443, client 172.16.142.133)
[Mon Jan 28 06:34:27 2008] [info] Connection to child 0 established (server
f7d.ipaqa.com:443, client 172.16.142.133)
[Mon Jan 28 06:34:27 2008] [info] Initial (No.1) HTTPS request received for
child 0 (server f7d.ipaqa.com:443)
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1435): [client
172.16.142.133] kerb_authenticate_user entered with user (NULL) and auth_type
Kerberos
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1148): [client
172.16.142.133] Acquiring creds for HTTP.com
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1270): [client
172.16.142.133] Verifying client data using KRB5 GSS-API
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1286): [client
172.16.142.133] Verification returned code 0
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1304): [client
172.16.142.133] GSS-API token of length 156 bytes will be sent back
[Mon Jan 28 06:34:27 2008] [debug] src/mod_auth_kerb.c(1351): [client
172.16.142.133] set cached name admin for connection
[Mon Jan 28 06:34:27 2008] [info] Connection to child 0 closed (server
f7d.ipaqa.com:443, client 172.16.142.133)

Broadcast message from root (tty1) (Mon Jan 28 07:53:59 2008):

The system is going down for system halt NOW!
[Mon Jan 28 07:54:10 2008] [warn] child process 2883 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:10 2008] [warn] child process 2886 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:10 2008] [warn] child process 2887 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:10 2008] [warn] child process 2888 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:10 2008] [warn] child process 2889 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:10 2008] [warn] child process 2890 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2883 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2886 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2887 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2888 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2889 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:12 2008] [warn] child process 2890 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2883 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2886 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2887 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2888 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2889 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:14 2008] [warn] child process 2890 still did not exit, sending
a SIGTERM
[Mon Jan 28 07:54:16 2008] [notice] caught SIGTERM, shutting down
Connection to 172.16.142.133 closed by remote host.
Connection to 172.16.142.133 closed.
[yi@localhost ~]$ ssh root.142.133
root.142.133's password:
Last login: Mon Jan 28 06:34:01 2008 from 172.16.142.1
[root@f7d ~]# tail -f /var/log/ipa_error.log
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined

































2008-01-28 10:40:36,645 cherrypy.msg INFO HTTP: Page handler: <bound method
Root.index of <ipagui.controllers.Root object at 0x8d2430c>>
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 105, in
_run
    self.main()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 254, in
main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in index
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 344,
in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 312, in
so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 359,
in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 399,
in _execute_func
    return _process_output(output, template, format, content_type, mapping,
fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 86, in
_process_output
    fragment=fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 129, in
render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/turbokid/kidsupport.py", line 186, in
render
    data.update(self.get_extra_vars())
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 329, in
stdvars
    locale = get_locale(),
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 51, in
get_locale
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined

2008-01-28 10:40:36,646 ipagui.controllers ERROR CherryPy 500 error (500 -
Internal Server Error) for request 'GET /'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 105, in
_run
    self.main()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 254, in
main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in index
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 344,
in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 312, in
so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 359,
in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 399,
in _execute_func
    return _process_output(output, template, format, content_type, mapping,
fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 86, in
_process_output
    fragment=fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 129, in
render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/turbokid/kidsupport.py", line 186, in
render
    data.update(self.get_extra_vars())
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 329, in
stdvars
    locale = get_locale(),
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 51, in
get_locale
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined
2008-01-28 10:40:36,646 ipagui.controllers ERROR CherryPy 500 error (500 -
Internal Server Error) for request 'GET /'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 105, in
_run
    self.main()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 254, in
main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in index
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 344,
in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 312, in
so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 359,
in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 399,
in _execute_func
    return _process_output(output, template, format, content_type, mapping,
fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 86, in
_process_output
    fragment=fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 129, in
render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/turbokid/kidsupport.py", line 186, in
render
    data.update(self.get_extra_vars())
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 329, in
stdvars
    locale = get_locale(),
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 51, in
get_locale
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined
2008-01-28 10:40:36,648 ipagui.controllers ERROR Error handler failed: global
name 'filePath' is not defined
Traceback (most recent call last):
  File
"/var/tmp/ipa-server-0.6.0-4-root-root/usr/share/ipa/ipagui/controllers.py",
line 97, in handle_error
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 86, in
_process_output
    fragment=fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 129, in
render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/turbokid/kidsupport.py", line 186, in
render
    data.update(self.get_extra_vars())
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 329, in
stdvars
    locale = get_locale(),
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 51, in
get_locale
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined
2008-01-28 10:40:36,648 ipagui.controllers ERROR Error handler failed: global
name 'filePath' is not defined
Traceback (most recent call last):
  File
"/var/tmp/ipa-server-0.6.0-4-root-root/usr/share/ipa/ipagui/controllers.py",
line 97, in handle_error
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 86, in
_process_output
    fragment=fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 129, in
render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/turbokid/kidsupport.py", line 186, in
render
    data.update(self.get_extra_vars())
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 329, in
stdvars
    locale = get_locale(),
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 51, in
get_locale
    locale = get_locale_f()
  File "/usr/lib/python2.5/site-packages/turbogears/i18n/utils.py", line 65, in
_get_locale
    locale = cherrypy.session.get(locale_key)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 448, in __getattr__
    data = sess.session_storage.load(sess.session_id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 268, in load
    file_path = self._get_file_path(id)
  File "/usr/lib/python2.5/site-packages/cherrypy/filters/sessionfilter.py",
line 329, in _get_file_path
    if not os.path.normpath(filePath).startswith(storagePath):
NameError: global name 'filePath' is not defined

==================

Comment 1 Rob Crittenden 2008-01-29 02:52:31 UTC
This is a bug in python-cherrypy-2.2.1-8.

I re-opened the bug this was introduced in
https://bugzilla.redhat.com/show_bug.cgi?id=427664

The solution is to use 2.3.0 from testing or back down to 2.2.1-7.

Comment 2 Yi Zhang 2008-01-29 17:28:49 UTC
I get reply form Rob. This problem can be solved by update the python-cherrypy
pkg from 2.2.1 to 2.3. 
The 2.3 version can be download from here:
http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/python-cherrypy-2.3.0-3.fc7.noarch.rpm

Just do "rpm -Uvh python-cherrypy-2.3.0-3.fc7.noarch.rpm" and restart httpd,
problem will be solved. 

Shall we declare the pkg dependency into ipa-server?