76 | | * Error reported was 'could not connect to server: Connection refused |
77 | | * Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? '. |
78 | | o This implies that a .map file is referring to a PostgreSQL PostGIS database. |
79 | | + See the debugging suggestions in the PostGIS page. |
80 | | + Was PostgreSQL server installed? There probably would be a program "postmaster" installed. Try man postmaster to see if that exists. |
81 | | + Was the PostgreSQL server started? In ps fax there should be a program "postmaster" running. |
82 | | + Test connection to the DB server with a PostgreSQL client. |
83 | | # If the DB server is on the web server machine, psql -l may show a list of databases. |
84 | | # A username and password may be necessary: psql -U readonlyuser --password -l will connect as user readonlyuser (if that exists) and ask for its password. |
85 | | # The !MapServer would connect through 127.0.0.1, also called loopback: psql --host localhost -U readonlyuser --password -l |
86 | | o Check for errors from the web server and in syslog for PostgreSQL errors. |
87 | | o If there are no errors in syslog, you may need to configure the PostgreSQL server to log errors. |
88 | | + Try locate postgresql.conf to find the file. It might be in /var/lib/pgsql/data. |
89 | | + The PostgreSQL configuration file has options for where to log and what to log. |
90 | | o Maybe the database server is simply not listening to TCP requests. |
91 | | + A netstat -an | grep 5432 should show TCP port 5432 has a listener. |
92 | | # Read the netstat output closely, as a /tmp file with 5432 in the name is not a TCP port. |
93 | | + The database server configuration for TCP/IP is in the previously mentioned postgresql.conf file. |
94 | | + There also should be a 127.0.0.1 entry in the file pg_hba.conf to allow access by users through loopback TCP/IP connections. |
| 75 | === Error reported was 'could not connect to server: Connection refused. Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? === |
| 76 | * This implies that a .map file is referring to a PostgreSQL PostGIS database. |
| 77 | * See the debugging suggestions in the PostGIS page. |
| 78 | * Was PostgreSQL server installed? There probably would be a program "postmaster" installed. Try man postmaster to see if that exists. |
| 79 | * Was the PostgreSQL server started? In ps fax there should be a program "postmaster" running. |
| 80 | * Test connection to the DB server with a PostgreSQL client. |
| 81 | * If the DB server is on the web server machine, psql -l may show a list of databases. |
| 82 | * A username and password may be necessary: psql -U readonlyuser --password -l will connect as user readonlyuser (if that exists) and ask for its password. |
| 83 | * The !MapServer would connect through 127.0.0.1, also called loopback: psql --host localhost -U readonlyuser --password -l |
| 84 | * Check for errors from the web server and in syslog for PostgreSQL errors. |
| 85 | * If there are no errors in syslog, you may need to configure the PostgreSQL server to log errors. |
| 86 | * Try locate postgresql.conf to find the file. It might be in /var/lib/pgsql/data. |
| 87 | * The PostgreSQL configuration file has options for where to log and what to log. |
| 88 | * Maybe the database server is simply not listening to TCP requests. |
| 89 | * A netstat -an | grep 5432 should show TCP port 5432 has a listener. |
| 90 | * Read the netstat output closely, as a /tmp file with 5432 in the name is not a TCP port. |
| 91 | * The database server configuration for TCP/IP is in the previously mentioned postgresql.conf file. |
| 92 | * There also should be a 127.0.0.1 entry in the file pg_hba.conf to allow access by users through loopback TCP/IP connections. |