georeference.org
Subscribe to this thread
Home - General / All posts - PostGIS and IMS - how to see PostGIS drawings
artlembo


1,565 post(s)
#05-Aug-08 10:44

I have a linked drawing from PostGIS, and want to use it in IMS. However, it does not show up in IMS even though it shows up in my .MAP.

I know it has something to do with permissions, but I'm not sure what needs to be changed.

Lets assume my PostGIS database is called "PostGIS", and it has a table called "Parcels". What file does the IUSR account get access to? With a .MDB, it make sense, as you can point directly to the Access database, but how do you do it with PostGIS since it is running as a service?

vincent

577 post(s)
#05-Aug-08 11:11

With a database, it's more a matter of connection then permissions. The server must have access to PostGIS to render the drawing to the IUSR.


IMS codes, trainings and programming services available at www.dynamicmaps.net

artlembo


1,565 post(s)
#05-Aug-08 11:17

ok. But, what do you mean by the "server must have access to PostGIS". I have a user called "postgres", and I've given them read/write access.

Do you mean that IIS must have access to PostGIS? If so, what .dll do you connect to?

vincent

577 post(s)
#05-Aug-08 11:47

I mean Manifold on the server must have access to PostGIS. I'm not a specialist at all, so I can't help you more.


IMS codes, trainings and programming services available at www.dynamicmaps.net

artlembo


1,565 post(s)
#05-Aug-08 11:51

ok, thanks. And, Manifold on the server has access to PostGIS, since I'm doing it on my desktop as a test. So, I can read PostGIS from Manifold. But, like other posts I've seen on the forum I have the layer name showing in IMS, but none of the data is showing.

AR_Rick

127 post(s)
#05-Aug-08 12:04

Make sure your links aren't breaking -- if the IMS application server can't reach the database or is unable to authenticate, your layers won't show up. If you're linking to PostGIS, the best thing to do is just crank up the logging on the PostgreSQL server and see if it's even connecting and able to run queries. If it's not, you've got an issue. The linking is somewhat problematic because it assumes you've got the same environment where you create the map file as you do where you deploy it. What I do is create a generic hostname for the PostGIS database I'm trying to expose (your-gis-db.your-domain.com), link to that, and then on the production IMS server, I create a hosts file entry that will override it.


Need industrial grade Manifold hosting? Scaling, Load Balancing, Special Tuning, etc. Drop me a line.

artlembo


1,565 post(s)
#05-Aug-08 12:32

that makes sense. But, in my situation, the IMS server is the SAME machine as my desktop where I create the .map application. So, I can see things just fine on my desktop, but when I try to view it through "localhost", everything else shows up EXCEPT the linked drawing.

UPDATE: I just tried this on another machine, and it worked without any difficulty at all. It was very easy. So, it must be a problem on my other desktop. Now I have to figure out what is going on there.

KlausDE


3,189 post(s)
online
#05-Aug-08 13:58

Now this sounds as if you have used localhost to link on the development machine where you should have used the IP or the public your-gis-db.your-domain.com name that is translated to a valid IP address by some DNS server (or at least local lmhost file).

If not the entries in pg_hba.conf may not allow connecting from your client.

AR_Rick

127 post(s)
#05-Aug-08 14:37

I would agree with the pg_hba.conf assessment. Like I said... turn up the logging level in PostgreSQL (in the postgresql.conf file) and check the log files. That's where I'd start.


Need industrial grade Manifold hosting? Scaling, Load Balancing, Special Tuning, etc. Drop me a line.

dmbrubac


1,378 post(s)
#05-Aug-08 17:20

Does the IIS Application pool act as the accessing user? If so, then change the app pool name (and change the permissions too so the app pool can actually run).

In other words PostGIS may be seeing NETWORK SERVICE as the user trying to access the database.


Will Render for Food

KlausDE


3,189 post(s)
online
#06-Aug-08 07:41

PostGIS is not aware of any Windows user account or NETBIOS gimmicks TMH. It only uses PostgreSQL internal users and the machine/subnet IP.

The most complicated situations are

  • a schema named like the user which is use as the default schema (=the only schema Mfd will use for this special user instead of 'public') configurable in postgresql.conf or
  • a redirection to a different DB controlled by pg_ident.conf

Both are not likely to happen accidentally.

Art, am I right assuming your development machine and IMS server are the same box whereas PostgreSQL runs on a different box?

artlembo


1,565 post(s)
#06-Aug-08 19:42

Klaus,

no, everything is on the same box: PostgreSQL, Manifold, IIS.

KlausDE


3,189 post(s)
online
#06-Aug-08 23:07

Than I fear my advice followed the wrong track. This situation should be perfectly covered by the default settings in pg_hba.conf.

Another guess: Is your desktop running 64bit windows and could it be IMS automatically uses Mfd x64 missing the x64 PostgeSQL drivers while you developed the application on Mfd x32 on the same machine with by default installed x32 drivers?

artlembo


1,565 post(s)
#07-Aug-08 07:41

perhaps the other way around - PostgreSQL is 4-bit. So, maybe IMS is using thee 32bit version of Manifold.

That is an excellent thing to explore.

artlembo


1,565 post(s)
#08-Aug-08 06:04

actually, to clarify, I can connect to PostGRES in 64-bit Manifold, but not in 32 bit. I'm assuming the IMS is running in 64 bit.

Kenneth55 post(s)
#27-Aug-08 21:09

If you were using "Windown Authentication" for your datasource connection, IMS may lost the connection information and the drawing in IMS map may not show up.

Create a desginated login user in your database. Use this desginated user to create your data source connection in manifold. Link your drawing using this connection. The IMS will have no problem to display the map with drawing from database.

2 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.