[mod_python] socket.error connection refused

Graham Dumpleton grahamd at dscpl.com.au
Fri Nov 4 15:33:15 EST 2005


If you follow through exactly the simple mptest example at:

   http://www.dscpl.com.au/articles/modpython-001.html

does it work? If not, how far do you get and what problems
are shown by following that procedure?

It will help if you follow that example as it will provide a
known baseline of code and take out of the equation your own
code of which we know nothing about.

Graham

On 05/11/2005, at 4:12 AM, py pan wrote:

> Hi there,
>
>  I am setting up a database that is built upon a mod_python. When I 
> accessed
>  the database with a browser, it reported an error:
>
>  ===========================================[ start ]
>  Mod_python error: "PythonAuthenHandler access"
>
>  Traceback (most recent call last):
>
>    File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 
> 299, in HandlerDispatch
>      result = object(req)
>
>    File "/home/emen2/public_html/emen2/access.py", line 20, in 
> authenhandler
>      ctxid=db.login(req.user,req.get_basic_auth_pw())
>
>    File "/home/emen2/DBProxy.py", line 28, in
>      return lambda *x: self(name,*x)
>
>    File "/home/emen2/DBProxy.py", line 33, in __call__
>      return load(self.iso[1])
>
>  EOFError
>  =============================================[ end ]
>
>  I believed it's due to an imcomplete installation of mod_python so I 
> went ahead
>  to run the test.py came with mod_python. It reported many errors, 
> mostly due to
>  a socket.error like:
>
>  =============================================[ start ]
>  ERROR: test_req_document_root (__main__.PerRequestTestCase)
>  ----------------------------------------------------------------------
>  Traceback (most recent call last):
>    File "test.py", line 306, in test_req_document_root
>      rsp = self.vhost_get("test_req_document_root")
>    File "test.py", line 282, in vhost_get
>      conn.endheaders()
>    File "/usr/lib/python2.3/httplib.py", line 712, in endheaders
>      self._send_output()
>    File "/usr/lib/python2.3/httplib.py", line 597, in _send_output
>      self.send(msg)
>    File "/usr/lib/python2.3/httplib.py", line 564, in send
>      self.connect()
>    File "/usr/lib/python2.3/httplib.py", line 548, in connect
>      raise socket.error, msg
>  error: (111, 'Connection refused')
>  ============================================= [ end ]
>
>  How can I solve this problem?
>  Thx in advance;.
>
>  pan
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python




More information about the Mod_python mailing list