Thanks for the tip. Some print diagnostics of sys.path revealed the problem: incorrect
access permissions on /usr/lib/python2.6 resulted in it being omitted from the python
path. Meanwhile, most of the modules were being picked up from /usr/lib64/python2.6,
meaning that it mostly worked.
Regards,
Mike.
From: cobbler-bounces(a)lists.fedorahosted.org
[mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of James Cammarata
Sent: 15 August 2013 14:35
To: cobbler mailing list
Subject: Re: [cobbler] ImportError: No module named cobbler.services
From the python CLI, can you do:
>> from cobbler.services import CobblerSvc
If not there's something going on with your python path. Beyond that, it may be an
issue with httpd seeing the python path correctly, though I'm not sure why. Look for
other things that may have changed recently on your system, like package upgrades, etc.
On Tue, Aug 13, 2013 at 10:00 AM, Pacey, Mike
<m.pacey@lancaster.ac.uk<mailto:m.pacey@lancaster.ac.uk>> wrote:
Hi folks,
I've been using the EPEL yum package of cobbler on Scientific Linux 6.4 for a few
weeks now without a problem. This week, a system build failed with the error "Unable
to download the kickstart file". Looking through various logs, I think I can trace
the problem to /var/log/httpd/error_logs:
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] mod_wsgi (pid=2544): Target WSGI
script '/var/www/cobbler/svc/services.py' cannot be loaded as Python module.
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] mod_wsgi (pid=2544): Exception
occurred processing WSGI script '/var/www/cobbler/svc/services.py'.
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] Traceback (most recent call last):
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] File
"/var/www/cobbler/svc/services.py", line 27, in <module>
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] from cobbler.services import
CobblerSvc
[Tue Aug 13 15:27:42 2013] [error] [client 10.41.6.6] ImportError: No module named
cobbler.services
If I understand that correctly, python isn't finding the cobbler/services* files
located in /usr/lib/python2.6/site-packages. I can run "python
/var/www/cobbler/svc/services.py" happily from the command line, so I'm puzzled
as to why httpd/wsgi can't find it. There's a few ways I could hack the setup to
ensure it finds it, but I'd prefer to work out what exactly has broken and why.
I installed a fresh version of cobbler on a test machine, but can't see any
difference. Specifically, the cobbler.conf and wsgi.conf in /etc/httpd/conf.d and the main
httpd.conf file are identical.
Can anyone suggest any further diagnostics I can run?
Regards,
Mike.
-----
Dr Mike Pacey, Email:
M.Pacey@lancaster.ac.uk<mailto:M.Pacey@lancaster.ac.uk>
HPC Manager, Phone: 01524 510659
Information Systems Services, Fax: 01524 594459
ISS Building, Lancaster University,
Lancaster LA1 4WA
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org<mailto:cobbler@lists.fedorahosted.org>
https://lists.fedorahosted.org/mailman/listinfo/cobbler