<div dir="ltr">I have set up a Postgres Docker container with kea user and kea database and all the schema applied (and some test host reservations) as per the documentation.<div><br></div><div>I have set up a Kea Docker container and I'm linking in the Postgres container, port 5432 and /var/run/postgresql and /var/lib/postgresql/data are volume mapped.</div><div><br></div><div>Within the Kea container I can start up psql with "psql -U kea -d kea -W" and see the full schema and my test entries.</div><div><br></div><div>From outside the container I can start it up with:</div><div><br></div><div>docker run --rm -it --link postgresdb -v /somedir/postgresql/data:/var/lib/postgresql/data -v /somedir/run/postgresql:/var/run/postgresql -p 5432 -it kea:1.3.0 psql -U kea -d kea -W</div><div><br></div><div>and it connects just fine and I can see everything applied. So I know the postgres database is readable from within the kea container and it thinks it's at localhost (per the linking).</div><div><br></div><div>Within the Kea container I cannot run kea-dhcp4. My kea.conf is fine. I tested that. It's the database connection. It fails with:</div><div><br></div><div>"2017-11-11 12:45:59.324 ERROR [kea-dhcp4.dhcp4/15] DHCP4_CONFIG_LOAD_FAIL configuration error using file: kea.conf, reason: Unable to open database: could not connect to server: Connection refused</div><div><span style="white-space:pre">  </span>Is the server running on host "localhost" (127.0.0.1) and accepting</div><div><span style="white-space:pre"> </span>TCP/IP connections on port 5432?</div><div>could not connect to server: Cannot assign requested address</div><div><span style="white-space:pre">   </span>Is the server running on host "localhost" (::1) and accepting</div><div><span style="white-space:pre">       </span>TCP/IP connections on port 5432?</div><div><br></div><div>2017-11-11 12:45:59.324 ERROR [kea-dhcp4.dhcp4/15] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file 'kea.conf': Unable to open database: could not connect to server: Connection refused</div><div><span style="white-space:pre">       </span>Is the server running on host "localhost" (127.0.0.1) and accepting</div><div><span style="white-space:pre"> </span>TCP/IP connections on port 5432?</div><div>could not connect to server: Cannot assign requested address</div><div><span style="white-space:pre">   </span>Is the server running on host "localhost" (::1) and accepting</div><div><span style="white-space:pre">       </span>TCP/IP connections on port 5432?"</div><div><br></div><div>This seems at odds with me being able to connect using psql. In my kea.conf I am specifying <span style="background-color:rgb(255,255,238);color:rgb(51,51,51);font-size:14px">"Dhcp4": { "hosts-database": { </span><strong class="inbox-inbox-userinput" style="color:rgb(51,51,51);font-size:14px"><code>"host" : ""</code></strong><span style="background-color:rgb(255,255,238);color:rgb(51,51,51);font-size:14px">, ... }, ... }</span> but I don't believe I should have to specify a host address. psql certainly doesn't think it's connecting remotely. Same problem from outside the container, with:</div><div><br></div><div>docker run /* all the same settings as for psql */ kea-dhcp4 -c kea.conf</div><div><br></div><div>Same errors. Has anyone encountered this scenario before? Anyone got any advice on how to proceed?</div><div><br></div><div>Thanks.</div></div>