Troubleshooting on-premises database connectivity

Have more questions? Submit a request

No internet access on server running metadata-extractor

The metadata-extractor will attempt to download missing JDBC drivers. If there is no internet connection available on the server running Docker Compose, the metadata-extractor will not be able to get the required drivers.

To make these drivers available without an internet connection:

  1. Download the PostgreSQL and MySQL JDBC drivers to any computer with an internet connection.
  2. Copy the JDBC driver files to the server running Docker Compose into a dedicated directory. This should be a sub-directory under where your compose file exists (for example, ./jdbc/).
  3. Extract the files in that sub-directory: tar -zxvf postgres.tar.gz mysql.tar.gz
  4. Change your compose file to mount this sub-directory for each service you've defined.

For example, the compose file would look something like this:

services:
  my-database:
    # ...
    volumes:
      - <LOCAL-PATH-TO-DRIVERS>:/jars
      - ./output/my-database:/output

(Replace <LOCAL-PATH-TO-DRIVERS> with the sub-directory where you extracted the drivers: ./jdbc in our example.)

Once you've followed these steps you should be able to run sudo docker-compose up as usual. The metadata-extractor now use these local drivers, so internet access is no longer necessary.

I need local DNS to resolve my server addresses

To specify a DNS server for the metadata-extractor to use in resolving server names:

  • Add a dns element to your service definitions in the compose file.

For example, the compose file would look something like this:

services:
  my-database:
    <<: *extract
    environment:
      # ...
    volumes:
      # ...
    dns:
      - <DNS-SERVER-ADDRESS>

(Replace <DNS-SERVER-ADDRESS> with the IP address of your local DNS server.)

In need to connect to localhost

To allow metadata-extractor to access a service running on the same server as Docker Compose:

  • On Linux, use localhost as the HOST value.
  • On Windows and Mac, use host.docker.internal as the HOST value.

More details are available in the Docker article: I want to connect from a container to a service on the host

Related articles

Was this article helpful?
0 out of 0 found this helpful