Cannot connect to remote mongo db server #7

Closed
muchine opened this Issue Nov 14, 2012 · 1 comment

Comments

Projects
None yet
2 participants

muchine commented Nov 14, 2012

Hi Jeremy,

I have an issue on connecting to another remote mongo db. I passed the options to constructor of MongoMQ like below

var queue = new mongomq.MongoMQ({
server: '172.20.240.227',
autoStart: false
});

But when I see queue.mongoConnection (even when running your test.js source code), it still has server host attribute that represents localhost.

testbed>queue.mongoConnection
{ server: { host: 'localhost', port: 27017 },
options:
{ server: '172.20.240.227',
autoStart: false,
database: 'mongomq',
collectionName: 'queue',
collectionSize: 104857600 },
database: 'mongomq',
active: [Getter] }
testbed>

The workaround I have found out is to set queue.mongoConnection.server.host attribute to remote server ip after creating MongoMQ object.

This looks very weird so please check this.

Thanks,
Sejoon

Owner

jdarling commented Nov 30, 2012

I've been away from MongoMQ for a few weeks, but I'll look into this next week. I admit I'm surprised as we are using this code in a production server not running on localhost :)

jdarling closed this in f6617da Dec 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment