postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feed[postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
19+ messages / 2 participants
[nested] [flat]
* [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-19 02:05 "swadams2 (@swadams2)" <[email protected]>
0 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-11-19 02:05 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
I'm trying to use MS Access with PostgreSQL and so want to configure an ODBC file for this. Testing it resulted in a connection timeout, so I looked at this to troubleshoot:
https://odbc.postgresql.org/faq.html#3.3
Adding a "tcpip=true" line to postgresql.conf and a line to permit a connection from the computer running Access to pg_hba.conf and then restarting PostgreSQL seemed to go without errors, but when I tried to run the psql command afterward, I got this error:
psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
The psql command worked again after I undid these changes, so I'm trying to figure out how they caused this error. The line I added to pg_hba.conf was as follows.
host spiralxprime web_app 192.168.0.72 scram-sha-256
Also, the listen_addresses setting in postgresql.conf was set to '*'.
Any ideas as to why this is happening would be appreciated.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-19 10:09 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-11-19 10:09 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
Is the server running ?
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-19 17:58 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-11-19 17:58 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
Yes.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-20 16:27 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-11-20 16:27 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
by default psql will not use TCP try psql -h 127.0.0.1 to see if it will connect to TCP
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-20 18:29 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-11-20 18:29 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
I tried that and got the same error.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-25 15:28 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-11-25 15:28 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
So if you received that error then postgresql is not running on TCP/IP.
Make sure the postgresql.conf has listen_address=* or some TCP/IP address
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-26 00:49 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-11-26 00:49 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
It's set to '*'. Oddly, the "psql -h 127.0.0.1" command works if I don't have the "tcpip = true" line in the configuration file.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-11-29 13:52 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-11-29 13:52 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
> It's set to '*'. Oddly, the "psql -h 127.0.0.1" command works if I don't have the "tcpip = true" line in the configuration file.
I'm a bit lost. Which configuration file?
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-02 15:04 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-02 15:04 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
I meant postgresql.conf.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-05 14:41 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-12-05 14:41 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
sorry for the late response.
tcpip is not a valid option in postgresql.conf. I would imagine that the server does not start with that in there.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-05 17:43 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-05 17:43 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
That's strange. The web page I put a link to in my original post says, "Postmaster must run with the -i option , or tcpip=true in postgresql.conf to allow remote connections." Is it wrong?
Restarting PostgreSQL with either that line in postgresql.conf or the "host spiralxprime web_app 192.168.0.72 scram-sha-256" line in pg_hba.conf yields the same result: no error message when it restarts, but the connection error message when I try to use psql.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-05 19:36 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-12-05 19:36 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
This document https://www.postgresql.org/docs/current/app-postgres.html specifies the command line arguments and tcpip=true is not one of them
same https://www.postgresql.org/docs/current/runtime-config-connection.html#RUNTIME-CONFIG-TCP-SETTINGS
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-06 15:18 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-06 15:18 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
Why would that line I added to pg_hba.conf cause the same problem?
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-09 13:55 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-12-09 13:55 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
You have to check the logs after changing configuration files to make sure PostgreSQL starts
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-09 21:28 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-09 21:28 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
I tried that and here's what I saw in the log.
2024-12-09 15:27:40.152 CST [1618406] LOG: starting PostgreSQL 14.13 (Ubuntu 14.13-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
2024-12-09 15:27:40.152 CST [1618406] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-12-09 15:27:40.152 CST [1618406] LOG: listening on IPv6 address "::", port 5432
2024-12-09 15:27:40.153 CST [1618406] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-09 15:27:40.156 CST [1618406] LOG: invalid IP mask "scram-sha-256": Name or service not known
2024-12-09 15:27:40.156 CST [1618406] CONTEXT: line 101 of configuration file "/etc/postgresql/14/main/pg_hba.conf"
2024-12-09 15:27:40.156 CST [1618406] FATAL: could not load pg_hba.conf
2024-12-09 15:27:40.158 CST [1618406] LOG: database system is shut down
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-11 16:42 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-12-11 16:42 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
right so you need to fix
```
2024-12-09 15:27:40.156 CST [1618406] LOG: invalid IP mask "scram-sha-256": Name or service not known
2024-12-09 15:27:40.156 CST [1618406] CONTEXT: line 101 of configuration file "/etc/postgresql/14/main/pg_hba.conf"
```
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-12 02:47 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-12 02:47 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
The line that triggers the error is:
host spiralxprime web_app 192.168.0.72 scram-sha-256
Why would it think "scram-sha-256" was meant to be an IP mask instead of a method?
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-12 15:09 ` "davecramer (@davecramer)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: davecramer (@davecramer) @ 2024-12-12 15:09 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
you need `192.168.0.72/32` if you want to specify a specific IP address
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem
@ 2024-12-15 02:35 ` "swadams2 (@swadams2)" <[email protected]>
17 siblings, 0 replies; 19+ messages in thread
From: swadams2 (@swadams2) @ 2024-12-15 02:35 UTC (permalink / raw)
To: postgresql-interfaces/psqlodbc <[email protected]>
Thanks for that. I was able to get Access to connect to it after making that change.
^ permalink raw reply [nested|flat] 19+ messages in thread
end of thread, other threads:[~2024-12-15 02:35 UTC | newest]
Thread overview: 19+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-19 02:05 [postgresql-interfaces/psqlodbc] issue #73: Strange configuration problem "swadams2 (@swadams2)" <[email protected]>
2024-11-19 10:09 ` "davecramer (@davecramer)" <[email protected]>
2024-11-19 17:58 ` "swadams2 (@swadams2)" <[email protected]>
2024-11-20 16:27 ` "davecramer (@davecramer)" <[email protected]>
2024-11-20 18:29 ` "swadams2 (@swadams2)" <[email protected]>
2024-11-25 15:28 ` "davecramer (@davecramer)" <[email protected]>
2024-11-26 00:49 ` "swadams2 (@swadams2)" <[email protected]>
2024-11-29 13:52 ` "davecramer (@davecramer)" <[email protected]>
2024-12-02 15:04 ` "swadams2 (@swadams2)" <[email protected]>
2024-12-05 14:41 ` "davecramer (@davecramer)" <[email protected]>
2024-12-05 17:43 ` "swadams2 (@swadams2)" <[email protected]>
2024-12-05 19:36 ` "davecramer (@davecramer)" <[email protected]>
2024-12-06 15:18 ` "swadams2 (@swadams2)" <[email protected]>
2024-12-09 13:55 ` "davecramer (@davecramer)" <[email protected]>
2024-12-09 21:28 ` "swadams2 (@swadams2)" <[email protected]>
2024-12-11 16:42 ` "davecramer (@davecramer)" <[email protected]>
2024-12-12 02:47 ` "swadams2 (@swadams2)" <[email protected]>
2024-12-12 15:09 ` "davecramer (@davecramer)" <[email protected]>
2024-12-15 02:35 ` "swadams2 (@swadams2)" <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox