Re: could not connect to server, in order to operate pgAdmin/PostgreSQL

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: could not connect to server, in order to operate pgAdmin/PostgreSQL
Date: 2018-11-25 08:37:25
Message-ID: 9f4234f2-da51-d174-56d3-c4229e8ad342@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On 24/11/18 9:32 μ.μ., Anne Marie Harm wrote:
> Oddly enough I did not receive Ricardo Martin Gomez's response
> directly -- just received it with Ron's response.
>> Regarding:
>>
>> > You must be check postgres.conf file in order to see the particular
>> port.
>> > Sometimes postgres is running but in another port 5433, 5434, etc.
> Where do I find that postgres. conf file; where and how do I look? (I
> have tried plenty of searching and trying what's suggested, to no avail.)

It depends who you installed PostgreSQL. It could be in ~postgres/data ,
e.g. /var/lib/pgsql/data or /usr/local/var/pgsql/data , or just echo
$PGDATA to find out, or do

ps aux | egrep -e 'postgres \-D'

and look at the dir after -D . Usually postgresql.conf (and
postgresql.auto.conf ) are in there.

If you are running debian look in /etc/postgresql/<insert your pgsql
major version>/<your cluster name>/postgresql.conf

You could find those out also by :

postgres(at)achill-XPS-15-9550:~$ psql
psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1))
Type "help" for help.

postgres=# show data_directory ;
       data_directory
-----------------------------
 /var/lib/postgresql/10/main
(1 row)

postgres=# show config_file ;
               config_file
-----------------------------------------
 /etc/postgresql/10/main/postgresql.conf
(1 row)

postgres=#

>
> Not sure what to do with this, so I'll keep it in mind for future
> reference:
>
> > By default???
>
> -----Original Message-----
> From: Ron
> Sent: Nov 24, 2018 1:10 PM
> To: "pgsql-admin(at)lists(dot)postgresql(dot)org"
> Subject: Re: could not connect to server, in order to operate
> pgAdmin/PostgreSQL
>
> By default???
>
> On 11/24/2018 06:16 AM, Ricardo Martin Gomez wrote:
>> Hello,
>> You must be check postgres.conf file in order to see the
>> particular port.
>> Sometimes postgres is running but in another port 5433, 5434, etc.
>>
>>
>> Obtener Outlook para Android <https://aka.ms/ghei36>
>>
>> ------------------------------------------------------------------------
>> *From:* Ron <ronljohnsonjr(at)gmail(dot)com>
>> *Sent:* Saturday, November 24, 2018 3:25:02 AM
>> *To:* pgsql-admin(at)lists(dot)postgresql(dot)org
>> *Subject:* Re: could not connect to server, in order to operate
>> pgAdmin/PostgreSQL
>> On 11/23/2018 08:31 PM, Anne Marie Harm wrote:
>>> Hello,
>>>
>>> Unfortunately I'm unable to operate pgAdmin/PostgreSQL; first of
>>> all I can only install version 9.5 (tried versions 11, 10, and
>>> 9.6 -- but cannot install).
>>
>> How come.  (Are you running a really old distro version?)
>>
>>> When I launch pgAdmin in order to try to use PostgreSGL 9.5,
>>> here is the full text of the error message I receive (also,
>>> screenshot attached):
>>>
>>> could not connect to server: Connection refused
>>> (0x0000274D/10061) Is the server running on host "localhost"
>>> (::1) and accepting TCP/IP connections on port 5432? could not
>>> connect to server: Connection refused (0x0000274D/10061) Is the
>>> server running on host "localhost" (127.0.0.1) and accepting
>>> TCP/IP connections on port 5432?
>>
>> Well, *is* Postgres running?  You installed Pg but did you start
>> it?  These two commands will tell you:
>>
>> pg_ctl status # when logged in as user postgres
>> sudo netstat -an | grep 5432
>>
>> --
>> Angular momentum makes the world go 'round.
>
> --
> Angular momentum makes the world go 'round.
>
>
> ----------------------------
> Anne Marie Harm
> (312) 563-9397
> amharm(at)earthlink(dot)net
> https://www.linkedin.com/in/annemarieharm/
>
>
>
> ----------------------------
> Anne Marie Harm
> (312) 563-9397
> amharm(at)earthlink(dot)net
> https://www.linkedin.com/in/annemarieharm/
>
>
>
> ----------------------------
> Anne Marie Harm
> (312) 563-9397
> amharm(at)earthlink(dot)net
> https://www.linkedin.com/in/annemarieharm/
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleas Mantzios 2018-11-25 08:39:32 Re: could not connect to server, in order to operate pgAdmin/PostgreSQL
Previous Message Stephen Frost 2018-11-24 20:52:07 Re: User Authentication: LDAP and "local" accounts concurrently ?