Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ejBPU-0001Xz-4O for pgsql-general@arkaria.postgresql.org; Tue, 06 Feb 2018 22:08:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejBPS-0000vg-K9 for pgsql-general@arkaria.postgresql.org; Tue, 06 Feb 2018 22:08:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ejBPS-0000vV-BX for pgsql-general@lists.postgresql.org; Tue, 06 Feb 2018 22:08:14 +0000 Received: from susanne.redcor.ch ([178.63.103.72]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ejBPO-0005eY-JK for pgsql-general@postgresql.org; Tue, 06 Feb 2018 22:08:13 +0000 Received: from [192.168.0.220] (84-72-41-168.dclient.hispeed.ch [84.72.41.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: robert@redcor.ch) by susanne.redcor.ch (Postfix) with ESMTPSA id AB2A8A0441 for ; Tue, 6 Feb 2018 23:08:09 +0100 (CET) From: robert Subject: Re: pgadmin4: not possible to create server To: "pgsql-general@postgresql.org" References: <75bd1546-6822-e366-d7da-1488074b474f@redcor.ch> Message-ID: <624dea10-0829-faab-5e16-3d4616b32f16@redcor.ch> Date: Tue, 6 Feb 2018 23:08:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3E0196B85E34815C0636A0BC" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------3E0196B85E34815C0636A0BC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit thanks unfortunately id did not help On 06.02.2018 18:29, Murtuza Zabuawala wrote: > Add following in your pg_hba.conf, > > host all             all             0.0.0.0/ 0md5 > > restart your Postgres database server and try to connect again from > pgAdmin4. from pgadmin3 I can connect any more ideas? robert On Tue, Feb 6, 2018 at 10:54 PM, robert rottermann >wrote: > > Hi there, > > I have installed pgadmin4 locally using its docker image. > > this i did running the following command: > > docker run -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=admin" -e > "PGADMIN_DEFAULT_PASSWORD=admin" -d dpage/pgadmin4 > > I then could access it and log into it. > > However all my attempts end in: > > Unable to connect to server: > > could not connect to server: Connection refused > Is the server running on host "localhost" (::1) and accepting > TCP/IP connections on port 5432? > could not connect to server: Connection refused > Is the server running on host "localhost" (127.0.0.1) and accepting > TCP/IP connections on port 5432? > > > can anybody give me a hint, what to do? > > thanks > > robert > > > in /etc/postgresql/10/main/postgresql.conf > > i have: > > #------------------------------------------------------------------------------ > # CONNECTIONS AND AUTHENTICATION > #------------------------------------------------------------------------------ > > # - Connection Settings - > > listen_addresses = '*'          # what IP address(es) to listen on; >           # comma-separated list of addresses; > > > and this is my /etc/postgresql/10/main/pg_hba.conf > > # DO NOT DISABLE! > # If you change this first entry you will need to make sure that the > # database superuser can access the database using some other method. > # Noninteractive access to all databases is required during automatic > # maintenance (custom daily cronjobs, replication, and similar tasks). > # > # Database administrative login by Unix domain socket > local   all             postgres peer > > # TYPE  DATABASE        USER            ADDRESS METHOD > > # "local" is for Unix domain socket connections only > local   all             all trust > # 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. > local   replication     all peer > host    replication     all 127.0.0.1/32 md5 > host    replication     all             ::1/128 md5 > > > > > --------------3E0196B85E34815C0636A0BC Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

thanks

unfortunately id did not help
On 06.02.2018 18:29, Murtuza Zabuawala wrote:
Add following in your pg_hba.conf,

host    all             all             0.0.0.0/0 md5

restart your Postgres database server and try to connect again from pgAdmin4.
from pgadmin3 I can connect

any more ideas?
robert
On Tue, Feb 6, 2018 at 10:54 PM, robert rottermann <robert@redcor.ch> wrote:
Hi there,

I have installed pgadmin4 locally using its docker image.

this i did running the following command:

docker run -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=admin" -e "PGADMIN_DEFAULT_PASSWORD=admin" -d dpage/pgadmin4

I then could access it and log into it.

However all my attempts end in:

Unable to connect to server:

could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?


can anybody give me a hint, what to do?

thanks

robert


in /etc/postgresql/10/main/postgresql.conf

i have:

#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------

# - Connection Settings -

listen_addresses = '*'          # what IP address(es) to listen on;
                                        # comma-separated list of addresses;


and this is my /etc/postgresql/10/main/pg_hba.conf

# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres peer

# TYPE  DATABASE        USER            ADDRESS METHOD

# "local" is for Unix domain socket connections only
local   all             all trust
# 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.
local   replication     all peer
host    replication     all             127.0.0.1/32 md5
host    replication     all             ::1/128 md5






--------------3E0196B85E34815C0636A0BC--