Обсуждение: Could not connect to mongo db using foreign wrapper

Поиск
Список
Период
Сортировка

Could not connect to mongo db using foreign wrapper

От
Sohel Tamboli
Дата:
Hi all, 

I am trying to access mongo db from postgresql using foreign wrapper server. 
I have installed mongo_fdw extension in my postgresql database and created required foreign tables as well. 

While selecting data from the foreign table in postgresql which connects to mongo, it is showing me error as 

ERROR: could not connect to <server name>:<port number>
HINT: Mongo driver connection error: 3

Can someone please help here. 

Note: this was working earlier but stopped working suddenly. I have check mongo services and firewalls between server, and everything is good. 

Appreciate your quick help, thanks in advance. 

Re: Could not connect to mongo db using foreign wrapper

От
legrand legrand
Дата:
Hi,

I don't know which repository you have taken this driver from,
but code from https://github.com/citusdata/mongo_fdw/blob/master/mongo_fdw.c
gives


connectStatus = mongo_connect(mongoConnection, addressName, portNumber);
    if (connectStatus != MONGO_OK)
    {
        errorCode = (int32) mongoConnection->err;

        mongo_destroy(mongoConnection);
        mongo_dispose(mongoConnection);

        ereport(ERROR, (errmsg("could not connect to %s:%d", addressName,
portNumber),
                        errhint("Mongo driver connection error: %d", errorCode)));
}

You have to find what errorcode = 3 means with your mongo
installation/version.
An other way, would be to add the full error message in this error report
...

The best would probably to ask this question to people you wrote this
extension ;o)

Regards
PAscal  



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html