-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems connecting to PostgreSQL, under OSX 10.6.8 #6
Comments
I'm confused too. Can you post an example? |
Please give me some feedback, some versions of postgres, node, ... |
Found the issue and partially solved it. The initial connection string: When I used it in orm.connect, I put a breakpoint at the point where ORM converts the string to an object of options. The following opts object was generated: {
} Instead of a connection url string, I created an options object with this data, and used it in orm.connect. It blew up with the same error. Postgres ver: 9.1 |
So the problem is the port definition? Hmmm... I have to check that.. |
Could you try the latest commit? I change the way drivers use the config. More specifically, mysql and postgres will try to use the url string before trying the parsed object. |
I am trying to make a small nodejs app run under osx (10.6.8), and connect to my localhost Postgres database. I am using node-orm (https://github.com/dresende/node-orm2) as well as the Postgres bindings (https://github.com/brianc/node-postgres).
For some reason, when I use
orm.connect
and give it the connection url as a string, it fails with:Error: getaddrinfo ENOENT at errnoException (dns.js:31:11) at Object.onanswer [as oncomplete] (dns.js:123:16)
If I change localhost with 127.0.0.1. it also dies with a timeout exception.
Using the vanilla postgress bindings to connect to the DB, using the same connection string is successful, and I even managed to get a few test queries running, got results, etc.
I tried to set up the DB client manually using the vanilla postgress api, an pass it on to orm using
orm.use
. This manages to connect successfully to the DB, but every time I try to execute a query, nothing happens. It does not generate an error, but sinply gets stuck in theQueryQueue
and does not call the success callback. I checked the DB logs, and it seems that it has not detected the query either.What do I do? I am a bit confused
The text was updated successfully, but these errors were encountered: