You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intriguing project! Unfortunately, I can't seem to get the current code base to do...anything for sure.
I'm running the latest Turnkey Linux stable in VirtualBox on a win32 platform. I successfully built node.js, and can run the basic example from nodejs.org and get it to serve a page to a client browser on win32.
But when I replace that with the example in the node-postgres readme, which I modified only to match my system's connection parameters, it runs, but nothing happens--no console output aside from the initial newline. Hitting it from a web browser says it can't connect (which makes sense, since it's not running a server.) If I add "console.log('start')" as the first line and similarly for the last line, both get logged one after another immediately when I run it, but still, no apparent database action.
So I tried the example app at https://github.com/brianc/node-postgres/wiki/Example . First of all, I had to change all the places where it said ?() to say function(), because I was getting syntax errors (were they supposed to be "?"? If so, is there some other missing dependency or setup step?) After that, it ran, but same thing again just sitting there after a newline, except that hitting it from a web browser results in a timeout (even if I change the port to 80 in the example code, or do :3000 in the url.) If I do the start/end console log statements, they too come out immediately one after another upon startup.
If I change the connection code to the wrong host, I get the appropriate error. If I instead change to the wrong port, user, password, or database, and I get no error but still no results. Lastly, I can connect to my postgres database using psql from the same Linux command-line I'm running node.js from.
I really appreciate you getting in touch with me about this. I'd love to walk through the issues you're experiencing with you tomorrow. Are you on IRC? Google talk? I'll be online all day in #dailyjs and my google talk name is '[email protected].' I've been out of town today and really busy this week doing shows with my band, but I'll be more involved with node-postgres starting on Monday of next week. I've got some big plans with a new API, transparent connection pooling, and a more "nodey" interface in the works.
I'll follow up on this tomorrow whether or not you contact me online. In the mean time...thanks for the feedback and take care.
Thanks to a lot of detailed debugging help from Brian, we determined that the most likely cause of my issue was intermittent networking problems with my Windows server, because even psql could not connect sometimes (I just got lucky the first few times I tried it.)
Activity
brianc commentedon Nov 19, 2010
I really appreciate you getting in touch with me about this. I'd love to walk through the issues you're experiencing with you tomorrow. Are you on IRC? Google talk? I'll be online all day in #dailyjs and my google talk name is '[email protected].' I've been out of town today and really busy this week doing shows with my band, but I'll be more involved with node-postgres starting on Monday of next week. I've got some big plans with a new API, transparent connection pooling, and a more "nodey" interface in the works.
I'll follow up on this tomorrow whether or not you contact me online. In the mean time...thanks for the feedback and take care.
Brian
KevinField commentedon Nov 19, 2010
Okay, I'm on mibbit on #dailyjs, and sent you a google talk invite. Hopefully we can get it sorted out. Thanks very much for wanting to help me!
KevinField commentedon Nov 19, 2010
Thanks to a lot of detailed debugging help from Brian, we determined that the most likely cause of my issue was intermittent networking problems with my Windows server, because even psql could not connect sometimes (I just got lucky the first few times I tried it.)
Thanks again!
KevinField commentedon Nov 19, 2010
Indeed, it works with postgresql 8.3 if I install that on turnkey itself.
Fix require problem for `pg` module
Update pg-cursor
Only release client once on an error. (#3)