LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   505- Internal server error - The server encountered an internal error or misconfigura (https://www.linuxquestions.org/questions/linux-server-73/505-internal-server-error-the-server-encountered-an-internal-error-or-misconfigura-910901/)

physnastr 10-30-2011 02:58 AM

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.

vasile002 10-30-2011 05:02 AM

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

physnastr 10-30-2011 02:46 PM

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.

vasile002 10-31-2011 03:32 AM

but did you check the error log, did anything change there? please post it again

physnastr 10-31-2011 09:34 AM

[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.

vasile002 11-01-2011 05:10 AM

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

physnastr 11-01-2011 11:31 PM

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.

Soleantelada 11-17-2011 04:57 PM

same thing
 
Can you please post the solution about the configuration error?

I'm having the same issue

Thanks


All times are GMT -5. The time now is 03:34 PM.