LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-30-2011, 02:58 AM   #1
physnastr
LQ Newbie
 
Registered: Jan 2011
Posts: 26

Rep: Reputation: 0
505- Internal server error - The server encountered an internal error or misconfigura


I am trying to install a software called indico on a red hat machie which needs mod_python and python. I have installed all the packages and all the modules properly and have modified the content of httpd.conf with the following content. Apache restarts properly but then i try to access it on the http://localhost/indico/index.py I get the 505 error. Can some one help me in resolving the issue and where am i making the mistake. Here is what I have added to the httpd.conf.


LoadModule python_module modules/mod_python.so

PythonInterpreter main_interpreter
PythonImport MaKaC::setEnvironment main_interpreter

<Directory "/opt/indico/htdocs">
AddHandler python-program .py
PythonHandler mod_python.publisher
Allow from All
</Directory>

<Directory "/opt/indico/htdocs/services">
SetHandler python-program
PythonHandler MaKaC.services.handler
PythonInterpreter main_interpreter
Allow from All
</Directory>



Alias /indico/images "/opt/indico/htdocs/images"
Alias /indico "/opt/indico/htdocs"


Here is the output of the apache error-log.


[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 296, in import_module\n log, i
mport_path)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 680, in import_module\n execfi
le(file, module.__dict__)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/opt/indico/htdocs
/index.py", line 21, in <module>\n import MaKaC.webinterface.rh.welcome as we
lcome
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/webinterface/rh/welcome.py", li
ne 21, in <module>\n import MaKaC.webinterface.rh.base as base
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/webinterface/rh/base.py", line
39, in <module>\n from MaKaC.common import fossilize
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/__init__.py", line 28, i
n <module>\n from db import DBMgr
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/db.py", line 38, in <mod
ule>\n from MaKaC.common.logger import Logger
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 196, in
<module>\n class Logger:
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 224, in
Logger\n LoggerUtils.configFromFile(logConfFilepath, defaultArgs, filters)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 42, in
configFromFile\n handlers = cls._install_handlers(cp, defaultArgs, formatters
, filters)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 88, in
_install_handlers\n h = apply(klass, args)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/logging/__init__.py", line 827, in __init__\n StreamHandler.__init__(self,
self._open())
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/logging/__init__.py", line 846, in _open\n stream = open(self.baseFilename
, self.mode)
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] IOError: [Errno 13] Permis
sion denied: '/opt/indico/log/indico.log'
[Sun Oct 30 02:52:20 2011] [error] [client 127.0.0.1] File does not exist: /usr/
local/apache2/htdocs/favicon.ico


Thank you.
 
Old 10-30-2011, 05:02 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
Code:
[Sun Oct 30 02:52:16 2011] [error] [client 127.0.0.1] IOError: [Errno 13] Permission denied: '/opt/indico/log/indico.log'
try changing ownership to the apache user or chmod to 777
 
Old 10-30-2011, 02:46 PM   #3
physnastr
LQ Newbie
 
Registered: Jan 2011
Posts: 26

Original Poster
Rep: Reputation: 0
I tried changing the ownership to apache and chmod to 777 for the indico directory and it still shows up the same 501 error message.
 
Old 10-31-2011, 03:32 AM   #4
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
but did you check the error log, did anything change there? please post it again
 
Old 10-31-2011, 09:34 AM   #5
physnastr
LQ Newbie
 
Registered: Jan 2011
Posts: 26

Original Poster
Rep: Reputation: 0
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n def
ault=default_handler, arg=req, silent=hlist.silent)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 1229, in _process_target\n res
ult = _execute_target(config, req, object, arg)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 1128, in _execute_target\n res
ult = object(arg)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/publisher.py", line 204, in handler\n module = pa
ge_cache[req]
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 1059, in __getitem__\n return
import_module(req.filename)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 296, in import_module\n log, i
mport_path)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/site-packages/mod_python/importer.py", line 680, in import_module\n execfi
le(file, module.__dict__)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/opt/indico/htdocs
/index.py", line 21, in <module>\n import MaKaC.webinterface.rh.welcome as we
lcome
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/webinterface/rh/welcome.py", li
ne 21, in <module>\n import MaKaC.webinterface.rh.base as base
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/webinterface/rh/base.py", line
39, in <module>\n from MaKaC.common import fossilize
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/__init__.py", line 28, i
n <module>\n from db import DBMgr
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/db.py", line 38, in <mod
ule>\n from MaKaC.common.logger import Logger
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 196, in
<module>\n class Logger:
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 224, in
Logger\n LoggerUtils.configFromFile(logConfFilepath, defaultArgs, filters)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 42, in
configFromFile\n handlers = cls._install_handlers(cp, defaultArgs, formatters
, filters)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib/python2.6
/site-packages/cds_indico-0.97.1-py2.6.egg/MaKaC/common/logger.py", line 88, in
_install_handlers\n h = apply(klass, args)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/logging/__init__.py", line 827, in __init__\n StreamHandler.__init__(self,
self._open())
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] File "/usr/lib64/python2
.6/logging/__init__.py", line 846, in _open\n stream = open(self.baseFilename
, self.mode)
[Sun Oct 30 14:52:25 2011] [error] [client 127.0.0.1] IOError: [Errno 13] Permis
sion denied: '/opt/indico/log/indico.log'
[Sun Oct 30 14:52:28 2011] [error] [client 127.0.0.1] File does not exist: /usr/
local/apache2/htdocs/favicon.ico
[Sun Oct 30 14:52:29 2011] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /opt/indico/htdocs/




I dont find much of the changes in the apache error-logs.
 
Old 11-01-2011, 05:10 AM   #6
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
it's the same permission denied error. can you try and chmod to 777 the log file?

also I can see this:
[Sun Oct 30 14:52:29 2011] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /opt/indico/htdocs/

that needs fixing as well
 
Old 11-01-2011, 11:31 PM   #7
physnastr
LQ Newbie
 
Registered: Jan 2011
Posts: 26

Original Poster
Rep: Reputation: 0
Problem solved. It was not the permissions issue but some misconfiguration in the httpd.conf.
It seems to be working fine now. Thanks for the response.
 
Old 11-17-2011, 04:57 PM   #8
Soleantelada
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
same thing

Can you please post the solution about the configuration error?

I'm having the same issue

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal Server Error 500 but no error log Sly Phy Programming 1 08-10-2010 10:51 PM
Additionally, a 500 Internal Server Error error was encountered while trying to use a ukrainet Linux - General 10 06-24-2005 02:23 AM
Internal Server Error ukrainet Linux - Newbie 10 11-30-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration