Thread: Connection / Access / Strange Problems

Connection / Access / Strange Problems

From
"Lowther, David W"
Date:
Hello List,

I hope this is not posted in an inappropriate forum, but I have searched for
a solution to this problem in both Mapserver and PostGIS forums / FAQs /
websites / docs  to no avail.

I am running PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc
(GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7).

I am running WinNT4.0 IIS 4.0 web servers with Mapserver (have tried several
versions).

I have 2 web/mapserver servers (Intel WinNT4.0 IIS4.0) that access my
Postgresql database. One is a test server (located in the same domain / ip
range as the Postgresql server) and one is a live server (located in a
separate domain / ip range from the Postgresql server). Using the same
connection information in a mapfile the test server can access and map
the Postgresql database with no problem - as could the live server when it
was in the domain - but the live server fails to connect with an error
(msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection
information.) now that it is outside the domain. I am stressing the domain /
ip range issue here because I can't think of any other difference in the two
servers.

Here are knowns:

- PGAdmin from the live server connects with no problem.
- ODBC connectivity from the live server works fine.
- The mapfiles on the test and live servers are identical except for
necessary directory differences.
- Checked password, hostname, connection type, socket connections enabled as
instructed in debug version of Mapserver build, but if they work on the test
server shouldn't they work on the live?
- Added live server to pg_hba.conf although test server is not listed in
pg_hba.conf and
connects successfully:
     host        all      216.226.17.176   255.255.255.0      trust
- Initialize postmaster with -i option to allow tcp/ip connections.
- tcpip_socket=true in postgresql.conf.
- Tried using port=5432 in the CONNECTION param for mapfile - no difference
in behaviour.

As I watch the activity in a terminal (-d option to postmaster) I never see
anything from the live webserver's attempts to connect. They aren't refused
- they aren't getting there.

Sorry for the long post and thanks in advance for any ideas or help,

David Lowther
Software Engineer
GEO Information Systems
University of Oklahoma
dlowther@ou.edu
(405) 325-3131
http://www.geo.ou.edu




Re: Connection / Access / Strange Problems

From
Lincoln Yeoh
Date:
I don't see good evidence of network connectivity in your knowns.

Can the hosts concerned actually ping each other?

Can you telnet to the IP:tcpport of the postgresql server from the source
host in question? If you can, do you see it in your logs?

You may wish to do other network connectivity tests. Perhaps there is a
firewall in between or your default route or network configuration is
incorrect.

HTH,
Link.

At 10:02 AM 1/7/03 -0600, Lowther, David W wrote:

>Hello List,
>
>I hope this is not posted in an inappropriate forum, but I have searched for
>a solution to this problem in both Mapserver and PostGIS forums / FAQs /
>websites / docs  to no avail.
>
>I am running PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc
>(GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
>
>I am running WinNT4.0 IIS 4.0 web servers with Mapserver (have tried several
>versions).
>
>I have 2 web/mapserver servers (Intel WinNT4.0 IIS4.0) that access my
>Postgresql database. One is a test server (located in the same domain / ip
>range as the Postgresql server) and one is a live server (located in a
>separate domain / ip range from the Postgresql server). Using the same
>connection information in a mapfile the test server can access and map
>the Postgresql database with no problem - as could the live server when it
>was in the domain - but the live server fails to connect with an error
>(msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection
>information.) now that it is outside the domain. I am stressing the domain /
>ip range issue here because I can't think of any other difference in the two
>servers.
>
>Here are knowns:
>
>- PGAdmin from the live server connects with no problem.
>- ODBC connectivity from the live server works fine.
>- The mapfiles on the test and live servers are identical except for
>necessary directory differences.
>- Checked password, hostname, connection type, socket connections enabled as
>instructed in debug version of Mapserver build, but if they work on the test
>server shouldn't they work on the live?
>- Added live server to pg_hba.conf although test server is not listed in
>pg_hba.conf and
>connects successfully:
>         host        all      216.226.17.176   255.255.255.0      trust
>- Initialize postmaster with -i option to allow tcp/ip connections.
>- tcpip_socket=true in postgresql.conf.
>- Tried using port=5432 in the CONNECTION param for mapfile - no difference
>in behaviour.
>
>As I watch the activity in a terminal (-d option to postmaster) I never see
>anything from the live webserver's attempts to connect. They aren't refused
>- they aren't getting there.
>
>Sorry for the long post and thanks in advance for any ideas or help,
>
>David Lowther
>Software Engineer
>GEO Information Systems
>University of Oklahoma
>dlowther@ou.edu
>(405) 325-3131
>http://www.geo.ou.edu
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster



Re: Connection / Access / Strange Problems

From
dev@archonet.com
Date:
> I don't see good evidence of network connectivity in your knowns.

That's what I thought, and I'd typed up much the same as you Lincoln, but...

>>Here are knowns:
>>
>>- PGAdmin from the live server connects with no problem.
>>- ODBC connectivity from the live server works fine.

which seems to rule out network problems and put the problem in the config
settings area. Unfortunately I don't know anything about this mapserver
software, so the only thing I can suggest is that it's connecting
incorrectly somehow.

Try "tcpdump port 5432" on the PG server and see if any packets arrive on
that port. Failing that, try "tcpdump src 1.2.3.4" but with the IP of your
live server - you'll probably need to be root for both. This will at least
show if it's trying to contact the right port.

- Richard Huxton




Get PostgreSQL work with Kylix 3 ?

From
Hervé Piedvache
Date:
Hi,

I know this mailing list is not dedicated to Kylix ... but I would like to
find someone who have Kylix running with PostgreSQL, because I have no answer
to my questions from the Borland news ...

I'm using a Debian woody, with PostgreSQL 7.2.3.

For the moment I just tried to use the examples programs given with Kylix 3 :
db_explorer and Mybaseconvert

I have created a connection for one of my PostgreSQL database ...

1 - Impossible to make a connexion without any password ? For example just
with the basic Postgres user ?

2 - After addind a new user with a password ... :o) It seems to connect but
immediatly after I have a SIGSEV(11) (othewise I had before adding the new
user, a message with bad login/password, so seem to login now !?) ... no
more details ... I can connect perfectly from my PC with the classical psql
command line ... so where is the trouble ?

3 - I never get the file provided by the command
ErrorResourceFile=/tmp/DbxPGSQLErr.msg  - why ?

4 - With dbexplorer I set the LoginPrompt to false inside the
SQLConnection1 but each time it asking me for a login/password, and I have
set them in the Params string ... :o(

Thanks for your help ... little disapointed with Kylix 3 and PostgreSQL ;o)

Best regards,
--
Hervé Piedvache

Elma Ingénierie Informatique
6 rue du Faubourg Saint-Honoré
F-75008 - Paris - France
Tel. 33-144949901
fax. 33-144949902

Re: Get PostgreSQL work with Kylix 3 ?

From
"Gavin M. Roy"
Date:
Hervé Piedvache wrote:

>Hi,
>
>I know this mailing list is not dedicated to Kylix ... but I would like to
>find someone who have Kylix running with PostgreSQL, because I have no answer
>to my questions from the Borland news ...
>
>
I've yet to get Kylix running with PgSQL (as I haven't tried, though I
have Kylix and BC++B), and it shouldn't be that hard...

>I'm using a Debian woody, with PostgreSQL 7.2.3.
>
>For the moment I just tried to use the examples programs given with Kylix 3 :
>db_explorer and Mybaseconvert
>
>I have created a connection for one of my PostgreSQL database ...
>
>1 - Impossible to make a connexion without any password ? For example just
>with the basic Postgres user ?
>
Check your PGSQL/data dir for pg_hba.conf, this is where you set the
permissions of who can connect to your db server

>2 - After addind a new user with a password ... :o) It seems to connect but
>immediatly after I have a SIGSEV(11) (othewise I had before adding the new
>user, a message with bad login/password, so seem to login now !?) ... no
>more details ... I can connect perfectly from my PC with the classical psql
>command line ... so where is the trouble ?
>
Again make sure the box you're connecting from has permission to do so
in pg_hba.conf

>3 - I never get the file provided by the command
>ErrorResourceFile=/tmp/DbxPGSQLErr.msg  - why ?
>
No idea.  Kylix in my opinion is still a little buggy.

>4 - With dbexplorer I set the LoginPrompt to false inside the
>SQLConnection1 but each time it asking me for a login/password, and I have
>set them in the Params string ... :o(
>
This is probibly because of a return bad auth from the pgsql server.

>Thanks for your help ... little disapointed with Kylix 3 and PostgreSQL ;o)
>
>Best regards,
>
>
No need to be disappointed with PgSQL, and Kylix is a fine product, just
a little immature in the grand scheme of development languages.

Cheers,

Gavin



Re: Get PostgreSQL work with Kylix 3 ?

From
Hervé Piedvache
Date:
Hi,

Le Mercredi 8 Janvier 2003 18:21, Gavin M. Roy a écrit :
> Hervé Piedvache wrote:
> >I'm using a Debian woody, with PostgreSQL 7.2.3.
> >
> >For the moment I just tried to use the examples programs given with Kylix
> > 3 : db_explorer and Mybaseconvert
> >
> >I have created a connection for one of my PostgreSQL database ...
> >
> >1 - Impossible to make a connexion without any password ? For example just
> >with the basic Postgres user ?
>
> Check your PGSQL/data dir for pg_hba.conf, this is where you set the
> permissions of who can connect to your db server

As I said ... it's running perfectly from my PC with psql ... so my
pg_hab.conf is correct ... I'm managing 20 database every day with postgreSQL
so it's not a config trouble ... and I'm using Delphi since v1.0 ... si I'm
not  a novice with those tools ... may be I can forget something ... but I'm
surprise about a SIGSEVG(11) and no debug ... from postgres or more details
for kylix ... :o(

> >4 - With dbexplorer I set the LoginPrompt to false inside the
> >SQLConnection1 but each time it asking me for a login/password, and I have
> >set them in the Params string ... :o(
>
> This is probibly because of a return bad auth from the pgsql server.

no ... it's running perfectly with Mybaseconvert ! :o)

> >Thanks for your help ... little disapointed with Kylix 3 and PostgreSQL
>
> No need to be disappointed with PgSQL, and Kylix is a fine product, just
> a little immature in the grand scheme of development languages.

v3.0 seems to not be an immature product after 7 version of Delphi ... no
Borland must have corrected all the buggy things of the v1.0 an v2.0 please !
... ,o)

Regards,
--
Hervé Piedvache

Elma Ingénierie Informatique
6 rue du Faubourg Saint-Honoré
F-75008 - Paris - France
Tel. 33-144949901
fax. 33-144949902