remote database connection
remote database connection
От:
"Eid, Bilal" <Bilal_Eid@NAI.com>
Дата:
Hi every one, Any help will be appreciated, I'm running PosygreSQL 6.4 (that come on the Redhat Linux 6.0 CD) and iodbc 2.5. I developed an application to access the database through iodbc; every thing was fine regarding the database and its applications. For some reason, I have system problems and I have to rebuild the system. So, every thing have been reinstalled, I did the configuration needed to rerun the database and the application. Now accessing the database using "psql" is ok, but when I run the application I got a connection errors. I did check every thing I could remember or see in the documentation about setup, configuration, and installation. Every thing is fine as I know, but I still couldn't connect to the database. I tried to trace the error and I got these: Could not connect to server; Could not connect to remote socket; Inside the psqlodbc_xxxxxxxxx.log file I fount these: conn=134761848, SQLDriverConnect( in)='DSN=PostgreSQL;Database=scanner;Server=161.69.57.45;ReadOnly=0;UID=beid ', fDriverCompletion=1 DSN info: DSN='PostgreSQL',server='161.69.57.45',port='',dbase='scanner',user='beid',p asswd='' readonly='0',protocol='',showoid='',fakeoidindex='',showsystable='' conn_settings='' translation_dll='',translation_option='' conn=134761848, SQLDriverConnect(out)='DSN=PostgreSQL;DATABASE=scanner;SERVER=161.69.57.45;P ORT=5432;UID=beid;PWD=;READONLY=0;PROTOCOL=;FAKEOIDINDEX=0;SHOWOIDCOLUMN=0;R OWVERSIONING=0;SHOWSYSTEMTABLES=0;CONNSETTINGS=' Global Options: Version='06.30.0250', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=4094 disable_optimizer=1, unique_index=0, use_declarefetch=0 text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 extra_systable_prefixes='dd_;', conn_settings='' CONN ERROR: func=SQLDriverConnect, desc='Error from CC_Connect', errnum=1, errmsg='Could not connect to the server' ------------------------------------------------------------ henv=134759008, conn=134761848, status=0, num_stmts=16 sock=134768144, stmts=134776392, lobj_type=-999 ---------------- Socket Info ------------------------------- socket=-1, reverse=0, errornumber=4, errormsg='Could not connect to remote socket.' buffer_in=134768184, buffer_out=134772288 buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0 ======= Any idea why I'm getting this? What I should need to do to fix it? I know there is some where file/s I have to modify or do something to it, please give a hint. Thank you very mach. Network Associates Inc. Bilal Eid
Re: remote database connection
От:
Adrian Alb <adrian@stockgroup.com>
Дата:
> Date: Mon, 13 Sep 1999 20:14:04 -0700 > From: "Eid, Bilal" > Subject: remote database connection > > Hi every one, > > Any help will be appreciated, > > I'm running PosygreSQL 6.4 (that come on the Redhat Linux 6.0 CD) and iodbc > 2.5. > I developed an application to access the database through iodbc; every thing > was fine regarding the database and its applications. > > I tried to trace the error and I got these: > Could not connect to server; > Could not connect to remote socket; > This could be the reason: you are not starting postmaster with -i option or postmaster is listening to a different port than you have specified in your DSN. You can check the postmaster's port by doing: ls -la /tmp/.*PGSQL* and the result should be like: srwxrwxrwx 1 postgres postgres /tmp/.s.PGSQL.5432 where 5432 is the port number (or whatever port you're using). Change your DSN to match this port. If ls result is "no such file ..." you probably didn't start postmaster with -i. Adrian Alb UNIX Sys Admin StockGroup.COM