Re: trouble connecting with psql to running server

From: Gavin M2301 <lokiofasgard501(at)gmail(dot)com>
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: trouble connecting with psql to running server
Date: 2019-05-08 23:10:47
Message-ID: CAHiusVgM_PuNQ9N8b2ZATQuFBK4rx2qnGKMnvQunkgHHJcSTYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey laetitia -
I changed the command to launch the server. Now I can see the server
process. I can connect with Windows console (cmd). Mingw msys hangs when I
try to get to a cmd prompt with psql command. I will just use windows shell.

Last night, I had 2 conflicts. I had a server running from older version of
postgres I saw in services, so I uninstalled that prior version. Then I had
transposed port number and kept trying to execute it with console history.

So thanks for the help pointing out wrong port number and troubleshooting.

I am off to execute some cmake code to see if soci 4 will work with
postgresql.

Thnx- Roboloki

On Wed, May 8, 2019, 3:04 AM Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com> wrote:

> Is your server running?
>
> You can try `ps -ef | grep postgres` to see if it's running.
> If you're under a Debian-based distro, try `pg_lsclusters` as root.
>
> Have a nice day,
>
> Lætitia
>
> Le mer. 8 mai 2019 à 05:04, Gavin M2301 <lokiofasgard501(at)gmail(dot)com> a
> écrit :
>
>> Hi all-
>>
>> I can't connect by psql like this:
>>
>> ./psql -h localhost -p 5432 -d template1.
>>
>> Here is some data:
>> $ ./psql -h 127.0.0.1 -p 5342 -d template1
>> psql: error: could not connect to server: could not connect to server:
>> Connection refused (0x0000274D/10061)
>> Is the server running on host "127.0.0.1" and accepting
>> TCP/IP connections on port 5342?
>> $ ./postgres -d 3 -D C:/msys64/usr/local/pgsql/data -c
>> config_file=/c:/msys64/usr/local/pgsql/data/postgresql.conf
>>
>> 2019-05-07 22:39:19.833 EDT [23160] LOG: starting PostgreSQL 12devel on
>> x86_64-w64-mingw32, compiled by x86_64-w64-mingw32-gcc.exe (Rev2, Built by
>> MSYS2 project) 8.3.0, 64-bit
>> 2019-05-07 22:39:19.838 EDT [23160] LOG: listening on IPv6 address
>> "::1", port 5432
>> 2019-05-07 22:39:19.838 EDT [23160] LOG: listening on IPv4 address
>> "127.0.0.1",
>> It (postmaster) is still going. No idea why I can't connect with psql
>> client.
>>
>> Here is my pg_hba.conf:
>>
>> # IPv4 local connections:
>> host all all 127.0.0.1/32 trust
>> # IPv6 local connections:
>> host all all ::1/128 trust
>> # Allow replication connections from localhost, by a user with the
>> # replication privilege.
>> host replication all 127.0.0.1/32 trust
>> host replication all ::1/128 trust
>>
>> Any ideas guys/gals?
>> I normally don't get this stuck. There is something blocking ./psql from
>> connecting to anything.
>> I might want to mention I built it with mingw. I put the bin directory in
>> path. I am using mingw msys2. I don't see a process when I do ps -ef | grep
>> postgres but I can see where the server is running continually. I am using
>> the version on GitHub.
>>
>> thanks for any ideas on what I can try.
>> roboloki
>>
>>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Gavin M2301 2019-05-10 00:21:56 mingw postgresql no prompt
Previous Message Tom Lane 2019-05-08 04:02:13 Re: compiling PostgreSQL with --enable-llvm