I have a problem with spining the docker image following the Hashicorp tutorial: Custom provider tutorial
After this database starts and gets populated. (Whole log below)
Finally image running on 19090 port dies and a new one starts.
docker_compose_api_1 exited with code 1
PS F:\Training\Terraform\project6\learn-terraform-hashicups-provider\docker_compose> docker-compose up
WARNING: The PWD variable is not set. Defaulting to a blank string.
docker_compose_db_1 is up-to-date
Starting docker_compose_api_1 ... done
Attaching to docker_compose_db_1, docker_compose_api_1
api_1 | 2021-08-24T15:24:13.700Z [ERROR] Unable to load config file: error="read /config/config.json: is a directory"
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 100
db_1 | selecting default shared_buffers ... 128MB
db_1 | selecting default timezone ... Etc/UTC
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | running bootstrap script ... ok
db_1 | performing post-bootstrap initialization ... ok
db_1 |
db_1 | WARNING: enabling "trust" authentication for local connections
db_1 | You can change this by editing pg_hba.conf or using the option -A, or
db_1 | --auth-local and --auth-host, the next time you run initdb.
db_1 | syncing data to disk ... ok
db_1 |
db_1 | Success. You can now start the database server using:
db_1 |
db_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1 |
db_1 | waiting for server to start....2021-08-24 13:25:37.343 UTC [47] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 13:25:37.387 UTC [48] LOG: database system was shut down at 2021-08-24 13:25:36 UTC
db_1 | 2021-08-24 13:25:37.397 UTC [47] LOG: database system is ready to accept connections
db_1 | done
db_1 | server started
db_1 | CREATE DATABASE
db_1 |
db_1 |
db_1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/products.sql
db_1 | SET
db_1 | CREATE EXTENSION
db_1 | CREATE TABLE
db_1 | CREATE TABLE
db_1 | CREATE TABLE
db_1 | CREATE TABLE
db_1 | CREATE TABLE
db_1 | CREATE TABLE
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 | INSERT 0 1
db_1 |
db_1 |
db_1 | waiting for server to shut down...2021-08-24 13:25:38.124 UTC [47] LOG: received fast shutdown request
db_1 | .2021-08-24 13:25:38.135 UTC [47] LOG: aborting any active transactions
db_1 | 2021-08-24 13:25:38.140 UTC [47] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
db_1 | 2021-08-24 13:25:38.140 UTC [49] LOG: shutting down
db_1 | 2021-08-24 13:25:38.200 UTC [47] LOG: database system is shut down
db_1 | done
db_1 | server stopped
db_1 |
db_1 | PostgreSQL init process complete; ready for start up.
db_1 |
db_1 | 2021-08-24 13:25:38.257 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 13:25:38.258 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 13:25:38.267 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 13:25:38.310 UTC [74] LOG: database system was shut down at 2021-08-24 13:25:38 UTC
db_1 | 2021-08-24 13:25:38.339 UTC [1] LOG: database system is ready to accept connections
db_1 | 2021-08-24 13:26:32.412 UTC [82] LOG: invalid length of startup packet
db_1 | 2021-08-24 13:26:32.429 UTC [83] LOG: invalid length of startup packet
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:13:43.657 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:13:43.658 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:13:43.677 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:13:43.719 UTC [27] LOG: database system was interrupted; last known up at 2021-08-24 13:30:38 UTC
db_1 | 2021-08-24 14:13:44.151 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:13:44.162 UTC [27] LOG: redo starts at 0/16CBC30
db_1 | 2021-08-24 14:13:44.163 UTC [27] LOG: invalid record length at 0/16CBD10: wanted 24, got 0
db_1 | 2021-08-24 14:13:44.163 UTC [27] LOG: redo done at 0/16CBCD8
db_1 | 2021-08-24 14:13:44.226 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:14:32.001 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:14:32.002 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:14:32.021 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:14:32.073 UTC [27] LOG: database system was interrupted; last known up at 2021-08-24 14:13:44 UTC
db_1 | 2021-08-24 14:14:32.514 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:14:32.523 UTC [27] LOG: redo starts at 0/16CBD80
db_1 | 2021-08-24 14:14:32.523 UTC [27] LOG: invalid record length at 0/16CBDB8: wanted 24, got 0
db_1 | 2021-08-24 14:14:32.523 UTC [27] LOG: redo done at 0/16CBD80
db_1 | 2021-08-24 14:14:32.581 UTC [1] LOG: database system is ready to accept connections
db_1 | 2021-08-24 14:15:49.992 UTC [1] LOG: received smart shutdown request
db_1 | 2021-08-24 14:15:50.003 UTC [1] LOG: background worker "logical replication launcher" (PID 33) exited with exit code 1
db_1 | 2021-08-24 14:15:50.003 UTC [28] LOG: shutting down
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:15:53.256 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:15:53.256 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:15:53.272 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:15:53.307 UTC [27] LOG: database system shutdown was interrupted; last known up at 2021-08-24 14:15:49 UTC
db_1 | 2021-08-24 14:15:53.637 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:15:53.645 UTC [27] LOG: redo starts at 0/16CBE28
db_1 | 2021-08-24 14:15:53.645 UTC [27] LOG: invalid record length at 0/16CBE60: wanted 24, got 0
db_1 | 2021-08-24 14:15:53.645 UTC [27] LOG: redo done at 0/16CBE28
db_1 | 2021-08-24 14:15:53.696 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:24:30.542 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:24:30.542 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:24:30.561 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:24:30.627 UTC [28] LOG: database system was interrupted; last known up at 2021-08-24 14:15:53 UTC
db_1 | 2021-08-24 14:24:31.816 UTC [28] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:24:31.832 UTC [28] LOG: redo starts at 0/16CBED0
db_1 | 2021-08-24 14:24:31.832 UTC [28] LOG: invalid record length at 0/16CBF08: wanted 24, got 0
db_1 | 2021-08-24 14:24:31.832 UTC [28] LOG: redo done at 0/16CBED0
db_1 | 2021-08-24 14:24:31.932 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:28:54.158 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:28:54.158 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:28:54.170 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:28:54.206 UTC [27] LOG: database system was interrupted; last known up at 2021-08-24 14:24:31 UTC
db_1 | 2021-08-24 14:28:54.806 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:28:54.812 UTC [27] LOG: redo starts at 0/16CBF78
db_1 | 2021-08-24 14:28:54.812 UTC [27] LOG: invalid record length at 0/16CBFB0: wanted 24, got 0
db_1 | 2021-08-24 14:28:54.812 UTC [27] LOG: redo done at 0/16CBF78
db_1 | 2021-08-24 14:28:54.854 UTC [1] LOG: database system is ready to accept connections
db_1 | 2021-08-24 14:31:52.132 UTC [1] LOG: received smart shutdown request
db_1 | 2021-08-24 14:31:52.139 UTC [1] LOG: background worker "logical replication launcher" (PID 33) exited with exit code 1
db_1 | 2021-08-24 14:31:52.141 UTC [28] LOG: shutting down
db_1 | 2021-08-24 14:31:52.180 UTC [1] LOG: database system is shut down
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:31:57.475 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:31:57.476 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:31:57.486 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:31:57.525 UTC [27] LOG: database system was shut down at 2021-08-24 14:31:52 UTC
db_1 | 2021-08-24 14:31:57.546 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:35:49.844 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:35:49.844 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:35:49.855 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:35:49.889 UTC [27] LOG: database system was interrupted; last known up at 2021-08-24 14:31:57 UTC
db_1 | 2021-08-24 14:35:50.236 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:35:50.241 UTC [27] LOG: redo starts at 0/16CC0E0
db_1 | 2021-08-24 14:35:50.241 UTC [27] LOG: invalid record length at 0/16CC118: wanted 24, got 0
db_1 | 2021-08-24 14:35:50.241 UTC [27] LOG: redo done at 0/16CC0E0
db_1 | 2021-08-24 14:35:50.289 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 14:59:39.258 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 14:59:39.258 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 14:59:39.264 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 14:59:39.284 UTC [28] LOG: database system was interrupted; last known up at 2021-08-24 14:35:50 UTC
db_1 | 2021-08-24 14:59:39.432 UTC [28] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 14:59:39.436 UTC [28] LOG: redo starts at 0/16CC188
db_1 | 2021-08-24 14:59:39.436 UTC [28] LOG: invalid record length at 0/16CC1C0: wanted 24, got 0
db_1 | 2021-08-24 14:59:39.436 UTC [28] LOG: redo done at 0/16CC188
db_1 | 2021-08-24 14:59:39.458 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 15:08:44.579 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 15:08:44.579 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 15:08:44.587 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 15:08:44.609 UTC [27] LOG: database system was interrupted; last known up at 2021-08-24 14:59:39 UTC
db_1 | 2021-08-24 15:08:44.757 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 15:08:44.762 UTC [27] LOG: redo starts at 0/16CC230
db_1 | 2021-08-24 15:08:44.762 UTC [27] LOG: invalid record length at 0/16CC268: wanted 24, got 0
db_1 | 2021-08-24 15:08:44.762 UTC [27] LOG: redo done at 0/16CC230
db_1 | 2021-08-24 15:08:44.781 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 15:09:58.765 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 15:09:58.765 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 15:09:58.771 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 15:09:58.793 UTC [28] LOG: database system was interrupted; last known up at 2021-08-24 15:08:44 UTC
db_1 | 2021-08-24 15:09:59.030 UTC [28] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 15:09:59.033 UTC [28] LOG: redo starts at 0/16CC2D8
db_1 | 2021-08-24 15:09:59.033 UTC [28] LOG: invalid record length at 0/16CC310: wanted 24, got 0
db_1 | 2021-08-24 15:09:59.033 UTC [28] LOG: redo done at 0/16CC2D8
db_1 | 2021-08-24 15:09:59.059 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 15:11:32.047 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 15:11:32.047 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 15:11:32.053 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 15:11:32.072 UTC [28] LOG: database system was interrupted; last known up at 2021-08-24 15:09:59 UTC
db_1 | 2021-08-24 15:11:32.293 UTC [28] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 15:11:32.296 UTC [28] LOG: redo starts at 0/16CC380
db_1 | 2021-08-24 15:11:32.296 UTC [28] LOG: invalid record length at 0/16CC3B8: wanted 24, got 0
db_1 | 2021-08-24 15:11:32.296 UTC [28] LOG: redo done at 0/16CC380
db_1 | 2021-08-24 15:11:32.331 UTC [1] LOG: database system is ready to accept connections
db_1 | 2021-08-24 15:11:50.446 UTC [1] LOG: received smart shutdown request
db_1 | 2021-08-24 15:11:50.459 UTC [1] LOG: background worker "logical replication launcher" (PID 34) exited with exit code 1
db_1 | 2021-08-24 15:11:50.459 UTC [29] LOG: shutting down
db_1 | 2021-08-24 15:11:50.489 UTC [1] LOG: database system is shut down
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 15:11:53.781 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 15:11:53.781 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 15:11:53.786 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 15:11:53.806 UTC [27] LOG: database system was shut down at 2021-08-24 15:11:50 UTC
db_1 | 2021-08-24 15:11:53.814 UTC [1] LOG: database system is ready to accept connections
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2021-08-24 15:18:23.233 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2021-08-24 15:18:23.233 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2021-08-24 15:18:23.239 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2021-08-24 15:18:23.259 UTC [28] LOG: database system was interrupted; last known up at 2021-08-24 15:16:53 UTC
db_1 | 2021-08-24 15:18:23.490 UTC [28] LOG: database system was not properly shut down; automatic recovery in progress
db_1 | 2021-08-24 15:18:23.493 UTC [28] LOG: redo starts at 0/16CC508
db_1 | 2021-08-24 15:18:23.493 UTC [28] LOG: invalid record length at 0/16CC5E8: wanted 24, got 0
db_1 | 2021-08-24 15:18:23.493 UTC [28] LOG: redo done at 0/16CC5B0
db_1 | 2021-08-24 15:18:23.513 UTC [1] LOG: database system is ready to accept connections