Alex Dong
unread,Jun 28, 2010, 6:24:58 AM6/28/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hi there,
I'm having two servers: clifton and fairfield. MongoDb is running on
clifton. I have configured the firewall so that clifton will accept
traffic from fairfield targeting port 27017. (Yes, I've double-checked
mongodb.conf to make sure mongo is listening on 27017).
Now the weird thing is this: on fairfield, if I try to connect to
mongodb on clifton using `telnet clifton 27017` or `mongo clifton/
test`, I can get a connection without any problem. But if I tried to
do so using pymongo, I'll get this error message:
{{{
In [1]: from pymongo.connection import Connection
In [2]: Connection('clifton', 27017)
---------------------------------------------------------------------------
AutoReconnect Traceback (most recent call
last)
/usr/local/lib/python2.6/dist-packages/pymongo-1.7-py2.6-linux-
x86_64.egg/pymongo/connection.py in __init__(self, host, port,
pool_size, auto_start_request, timeout, slave_okay, network_timeout,
document_class, _connect)
183
184 if _connect:
--> 185 self.__find_master()
186
187 @staticmethod
/usr/local/lib/python2.6/dist-packages/pymongo-1.7-py2.6-linux-
x86_64.egg/pymongo/connection.py in __find_master(self)
450 sock.close()
451 if sock_error or self.__host is None:
--> 452 raise AutoReconnect("could not find master")
453 raise ConfigurationError("No master node in %r. You
must specify "
454 "slave_okay to connect to "
AutoReconnect: could not find master
}}}
My environment:
Ubuntu 9.10
MongoDB: 1.5.3
Pymongo: 1.7
Any hints?
Alex