[postgis-users] PostGIS and Mapserver
Ezequias Rodrigues da Rocha
ezequias at recife.pe.gov.br
Fri Sep 16 12:34:19 PDT 2005
I did . The server started. The mapserver is still with problems.
What I do now ?
david techer wrote:
> then do
>
> pg_ctl -D /usr/local/pgsql/data restart
>
>
> Ezequias Rodrigues da Rocha wrote:
>
>> [postgres at mangueira bin]$ psql -d template1 -c "show data_directory"
>> data_directory
>> -----------------------
>> /usr/local/pgsql/data
>> (1 registro) one record
>>
>>
>> Ezequias
>>
>> david techer wrote:
>>
>>> Here is what I did
>>>
>>> bourgogne at olivia:/home/david$ psql -d template1 -c "show
>>> data_directory"
>>> data_directory
>>> ------------------------
>>> /home/bourgogne/pgdata
>>> (1 ligne)
>>>
>>> bourgogne at olivia:/home/david$ pg_ctl -D /home/bourgogne/pgdata restart
>>> TRACE: Réception d'une demande d'arrêt intelligent
>>> TRACE: arrêt en cours
>>> en attente de l'arrêt du postmaster....TRACE: le système de base de
>>> données est d'arrêté
>>> fait
>>> postmaster arrêté
>>> postmaster en cours de démarrage
>>> bourgogne at olivia:/home/david$ TRACE: le système de bases de données
>>> a été arrêté à 2005-09-16 23:06:54 CEST
>>> TRACE: l'enregistrement du point de vérification est à 0/11446AF0
>>> TRACE: ré-exécution de l'enregistrement à 0/11446AF0 ; l'annulation
>>> de l'enregistrement est à 0/0 ; arrêt TRUE
>>> TRACE: prochain identifiant de transaction : 19947 ; prochain OID :
>>> 509750
>>> TRACE: le système de bases de données est prêt
>>>
>>> bourgogne at olivia:/home/david$
>>>
>>>
>>> Ezequias Rodrigues da Rocha wrote:
>>>
>>>> David,
>>>>
>>>> I found pg_ctl.
>>>>
>>>> I tryed
>>>> #./pg_ctl restart
>>>>
>>>> See the resould and tell me what is wrong.
>>>>
>>>> [postgres at mangueira bin]$ ./pg_ctl restart
>>>> pg_ctl: no database directory specified and environment variable
>>>> PGDATA unset
>>>> Try "pg_ctl --help" for more information.
>>>> [postgres at mangueira bin]$
>>>>
>>>> sincerely
>>>> Ezequias
>>>>
>>>> david techer wrote:
>>>>
>>>>> strange?
>>>>>
>>>>> if U can connect to postgresql locally by doing (without ssh!)
>>>>>
>>>>> psql -d db1 -U postgres -h myserver.mydomain
>>>>>
>>>>> and
>>>>>
>>>>> by ssh
>>>>>
>>>>>
>>>>> psql db1
>>>>>
>>>>> it means that TCP/IP are allowed!
>>>>>
>>>>>
>>>>> did U succeed by ssh connection to find pg_ctl by doing
>>>>>
>>>>> which pg_ctl
>>>>>
>>>>> then do
>>>>>
>>>>> to find where is postgresql.conf doing
>>>>>
>>>>> psql -d template1 -c "show data_directory"
>>>>>
>>>>> then
>>>>> replace
>>>>>
>>>>> listen_adresses = 'localhost' by listen_adresses = '*'
>>>>>
>>>>> then
>>>>>
>>>>> `which pg_ctl` restart
>>>>> let me know
>>>>>
>>>>> Ezequias Rodrigues da Rocha wrote:
>>>>>
>>>>>> from ssh terminal.
>>>>>>
>>>>>> Locally the problem does not occours too.
>>>>>>
>>>>>> see my steps
>>>>>>
>>>>>> ssh root at server
>>>>>> password
>>>>>> psql db1
>>>>>>
>>>>>> the psql prompt appears.
>>>>>>
>>>>>> Ezequias
>>>>>>
>>>>>>
>>>>>> david techer wrote:
>>>>>>
>>>>>>> Hum!
>>>>>>>
>>>>>>> do you use and type the command
>>>>>>>
>>>>>>> psql -d dbpostgis -U ....
>>>>>>>
>>>>>>> to the ssh connection (terminal) or from your local machine?
>>>>>>>
>>>>>>> if U want to find pg_ctl path do
>>>>>>>
>>>>>>> which pg_ctl
>>>>>>>
>>>>>>> or
>>>>>>>
>>>>>>> pg_config --bindir
>>>>>>>
>>>>>>>
>>>>>>> Ezequias Rodrigues da Rocha wrote:
>>>>>>>
>>>>>>>> but I can enter on the db via ssh connection.
>>>>>>>>
>>>>>>>> This have any difference from entering via apache ?
>>>>>>>>
>>>>>>>> Ezequias
>>>>>>>>
>>>>>>>> Randy James wrote:
>>>>>>>>
>>>>>>>>> looks like the error for the fix listed as number 4
>>>>>>>>>
>>>>>>>>> --- Ezequias Rodrigues da Rocha <ezequias at recife.pe.gov.br>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi list,
>>>>>>>>>>
>>>>>>>>>> I am trying to access postgis via mapserver (a cgi server)
>>>>>>>>>> but the resoult is allways a problem. Could anobody take a
>>>>>>>>>> look on my problem ?
>>>>>>>>>>
>>>>>>>>>> the stack trace is shown below:
>>>>>>>>>>
>>>>>>>>>> msDrawMap(): Image handling error. Failed to draw layer named
>>>>>>>>>> 'bairros'.
>>>>>>>>>> msPOSTGISLayerOpen(): Query error. couldnt make connection to
>>>>>>>>>> DB with connect string 'user=postgres password=pt dbname=db1
>>>>>>>>>> host=myserver.mydomain port=5432'.
>>>>>>>>>> Error reported was 'could not create socket: Permission
>>>>>>>>>> denied '.
>>>>>>>>>> This error occured when trying to make a connection to the
>>>>>>>>>> specified postgresql server.
>>>>>>>>>> Most commonly this is caused by
>>>>>>>>>> (1) incorrect connection string
>>>>>>>>>> (2) you didnt specify a 'user=...' in your connection string
>>>>>>>>>> (3) the postmaster (postgresql server) isnt running
>>>>>>>>>> (4) you are not allowing TCP/IP connection to the postmaster
>>>>>>>>>> (5) your postmaster is not running on the correct port - if
>>>>>>>>>> its not on 5432 you must specify a 'port=...'
>>>>>>>>>> (6) the security on your system does not allow the webserver
>>>>>>>>>> (usually user 'nobody') to make socket connections to the
>>>>>>>>>> postmaster
>>>>>>>>>> (7) you forgot to specify a 'host=...' if the postmaster is
>>>>>>>>>> on a different machine
>>>>>>>>>> (8) you made a typo
>>>>>>>>>>
>>>>>>>>>> My best regards
>>>>>>>>>> Ezequias
>>>>>>>>>> _______________________________________________
>>>>>>>>>> postgis-users mailing list
>>>>>>>>>> postgis-users at postgis.refractions.net
>>>>>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> __________________________________ Yahoo! Mail - PC
>>>>>>>>> Magazine Editors' Choice 2005 http://mail.yahoo.com
>>>>>>>>> _______________________________________________
>>>>>>>>> postgis-users mailing list
>>>>>>>>> postgis-users at postgis.refractions.net
>>>>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> postgis-users mailing list
>>>>>>>> postgis-users at postgis.refractions.net
>>>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ___________________________________________________________________________
>>>>>>> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
>>>>>>> Messenger Téléchargez cette version sur
>>>>>>> http://fr.messenger.yahoo.com
>>>>>>> _______________________________________________
>>>>>>> postgis-users mailing list
>>>>>>> postgis-users at postgis.refractions.net
>>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>>
>>>>>> _______________________________________________
>>>>>> postgis-users mailing list
>>>>>> postgis-users at postgis.refractions.net
>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ___________________________________________________________________________
>>>>> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
>>>>> Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
>>>>> _______________________________________________
>>>>> postgis-users mailing list
>>>>> postgis-users at postgis.refractions.net
>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
>
>
>
>
> ___________________________________________________________________________
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
> Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list