pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: robert <robert@redcor.ch>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: solution: Re: pgadmin4: not possible to create server
Date: Wed, 7 Feb 2018 00:02:09 +0100
Message-ID: <3482ea7e-1422-5226-4951-9e316561997e@redcor.ch> (raw)
In-Reply-To: <2fab5f7f-a941-cfdd-64e5-5a4f93130c9f@aklaver.com>
References: <75bd1546-6822-e366-d7da-1488074b474f@redcor.ch>
	<35c2c035-9911-2a5f-e54a-0b8e49dd256e@aklaver.com>
	<8415c4eb-d73f-1bb8-3d04-54ba32bb19cd@redcor.ch>
	<1259de1e-91b9-7d21-5e01-eed51b464423@aklaver.com>
	<5c9f1bbd-5f90-2180-5d60-5af1c17f0812@redcor.ch>
	<2fab5f7f-a941-cfdd-64e5-5a4f93130c9f@aklaver.com>

Adrian


>>> So you pgAdmin4 running in a container on your local machine and 
>>> Postgres running in the native OS(the OS is?) on your local machine. 
>>> Is the Docker container set up to 'see' the local machine?
>>
>> what do you mean by see?
>
> For fuller explanation see:
>
> https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-t... 
>
>>
your hint pointed in the right direction:
it is not localhost, on which the server is running, because localhost 
is relative to the container, so it is in effect the container itself.
Postgres is running on the gatway of the containers network.
This I found out by issuing:
docker inspect reverent_volhard (where reverent_volhard is the 
containers name in which pgadmin4 runs)
this providest:
...
           "Networks": {
                 "bridge": {
                     "IPAMConfig": null,
                     "Links": null,
                     "Aliases": null,
                     "NetworkID": 
"df33249ff65c37ea1ca1f142b4a74283c4429c44c3ed1eb5ea80c695c87ab86d",
                     "EndpointID": 
"905c0c78145ef1847854f221200d8e4a7788f99b901030460111258ab9156b29",
                     "Gateway": "172.17.0.1",
                     "IPAddress": "172.17.0.2",
                     "IPPrefixLen": 16,
                     "IPv6Gateway": "",
                     "GlobalIPv6Address": "",
                     "GlobalIPv6PrefixLen": 0,
                     "MacAddress": "02:42:ac:11:00:02",
                     "DriverOpts": null
                 }

so postgres runs on 172.17.0.1

and bingo, it works

thanks again
robert




Message-ID: <3482ea7e-1422-5226-4951-9e316561997e@redcor.ch>
Permalink:  ../3482ea7e-1422-5226-4951-9e316561997e@redcor.ch/
Also on:    postgresql.org/message-id/3482ea7e-1422-5226-4951-9e316561997e@redcor.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robert@redcor.ch, adrian.klaver@aklaver.com
  Subject: Re: solution: Re: pgadmin4: not possible to create server
  In-Reply-To: <3482ea7e-1422-5226-4951-9e316561997e@redcor.ch>
  References: <75bd1546-6822-e366-d7da-1488074b474f@redcor.ch> <35c2c035-9911-2a5f-e54a-0b8e49dd256e@aklaver.com> <8415c4eb-d73f-1bb8-3d04-54ba32bb19cd@redcor.ch> <1259de1e-91b9-7d21-5e01-eed51b464423@aklaver.com> <5c9f1bbd-5f90-2180-5d60-5af1c17f0812@redcor.ch> <2fab5f7f-a941-cfdd-64e5-5a4f93130c9f@aklaver.com> <3482ea7e-1422-5226-4951-9e316561997e@redcor.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox