couchdbkit script socket error [Errno 111] Connection refused

414 views
Skip to first unread message

Rob

unread,
Feb 3, 2010, 3:16:04 PM2/3/10
to couchdbkit
I have been following the examples and so far so good everything is
working on great. The example that invloves the greeting database
lets say. When i have couchdb running of localhost ( http://127.0.0.1:5984
) the script works fine and there are no errors. I have to bind
couchdb now to my ip address so i changed the bind address and now
couchdb is running of ( http://192.168.59.179:5984). When i run the
same script this is the error i get


Traceback (most recent call last):
File "add_contact", line 21, in <module>
db = server.get_or_create_db("contacts")
File "/usr/local/lib/python2.6/dist-packages/couchdbkit-0.4.1-
py2.6.egg/couchdbkit/client.py", line 130, in get_or_create_db
return self[dbname]
File "/usr/local/lib/python2.6/dist-packages/couchdbkit-0.4.1-
py2.6.egg/couchdbkit/client.py", line 192, in __getitem__
self.res.head('/%s/' % url_quote(dbname, safe=":"))
File "build/bdist.linux-i686/egg/restkit/rest.py", line 126, in head
File "/usr/local/lib/python2.6/dist-packages/couchdbkit-0.4.1-
py2.6.egg/couchdbkit/resource.py", line 153, in request
payload=body, headers=headers, **params)
File "build/bdist.linux-i686/egg/restkit/rest.py", line 214, in
request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 314, in
request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 263, in
_request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 249, in
_make_request
restkit.errors.RequestFailed: socket error [Errno 111] Connection
refused

This is to me seems to be problem

restkit.errors.RequestFailed: socket error [Errno 111] Connection
refused

is there something i need to change to allow my scripts to work,

Benoit Chesneau

unread,
Feb 3, 2010, 3:27:19 PM2/3/10
to couchdbkit
are you able to curl this url ?

- benoit

On Feb 3, 9:16 pm, Rob <robr...@gmail.com> wrote:
> I have been following the examples and so far so good everything is
> working on great.  The example that invloves the greeting database

> lets say.  When i have couchdb running of localhost (http://127.0.0.1:5984


> ) the script works fine and there are no errors.  I have to bind
> couchdb now to my ip address so i changed the bind address and now

> couchdb is running of (http://192.168.59.179:5984).  When i run the

Rob

unread,
Feb 3, 2010, 3:34:16 PM2/3/10
to couchdbkit
Yes I am

root@rrecchia-desktop:/etc/init.d# curl http://192.168.59.179:5984
{"couchdb":"Welcome","version":"0.10.1"}

Benoit Chesneau

unread,
Feb 3, 2010, 3:50:43 PM2/3/10
to couch...@googlegroups.com

>
Could you paste a snippet ?

Rob

unread,
Feb 3, 2010, 4:03:54 PM2/3/10
to couchdbkit
So even this for example it works when couchdb is running on localhost
but not my 192.168 ip address

oot@rrecchia-desktop:/etc/init.d# python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from couchdbkit import *
>>> s = Server()
>>> db = s.create_db("couchdbkit_test")


Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/couchdbkit-0.4.1-
py2.6.egg/couchdbkit/client.py", line 118, in create_db
res = self.res.put('/%s/' % _dbname)
File "build/bdist.linux-i686/egg/restkit/rest.py", line 154, in put


File "/usr/local/lib/python2.6/dist-packages/couchdbkit-0.4.1-
py2.6.egg/couchdbkit/resource.py", line 153, in request
payload=body, headers=headers, **params)
File "build/bdist.linux-i686/egg/restkit/rest.py", line 214, in
request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 314, in
request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 263, in
_request
File "build/bdist.linux-i686/egg/restkit/httpc.py", line 249, in
_make_request
restkit.errors.RequestFailed: socket error [Errno 111] Connection
refused

On Feb 3, 3:50 pm, Benoit Chesneau <bchesn...@gmail.com> wrote:


> On Wed, Feb 3, 2010 at 9:34 PM, Rob <robr...@gmail.com> wrote:
> > Yes I am
>

> > root@rrecchia-desktop:/etc/init.d# curlhttp://192.168.59.179:5984

Rob

unread,
Feb 3, 2010, 4:08:24 PM2/3/10
to couchdbkit
Ok this is what i have found. in the couchdb default.ini i changed
the bind address from 192.168.59.179 to nothing so its like this

[httpd]
port = 5984
bind_address =


and problem solved i dont get that error message anymore and the
database gets created

Reply all
Reply to author
Forward
0 new messages