Skip to content

Instantly share code, notes, and snippets.

@ferbncode
Created July 1, 2019 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferbncode/9732073d11c280f705bdc4128080b603 to your computer and use it in GitHub Desktop.
Save ferbncode/9732073d11c280f705bdc4128080b603 to your computer and use it in GitHub Desktop.
musicbrainz_test_database
➜ ~ docker run --expose 5432 -p 5432:5432 metabrainz/musicbrainz-test-database:production
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
****************************************************
WARNING: No password has been set for the database.
This will allow anyone with access to the
Postgres port to access your database. In
Docker's default configuration, this is
effectively any other container on the same
system.
Use "-e POSTGRES_PASSWORD=password" to set
it in "docker run".
****************************************************
waiting for server to start....LOG: database system was shut down at 2019-07-01 14:42:03 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
done
server started
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/create_test_db.sh
Failed query:
'SELECT TRUE FROM pg_database WHERE datname = ?'
(musicbrainz_test)
08006 DBI connect('dbname=template1;host=localhost;port=5432','postgres',...) failed: 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?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 460.
Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x564a0263be68)) called at /home/musicbrainz/musicbrainz-server/local/lib/perl5/Try/Tiny.pm line 123
Try::Tiny::try(CODE(0x564a02546b20), Try::Tiny::Catch=REF(0x564a0254b610), Try::Tiny::Finally=REF(0x564a010c6cf0)) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 466
Sql::_select_list(Sql=HASH(0x564a02018ed0), "SELECT TRUE FROM pg_database WHERE datname = ?", ARRAY(0x564a01eba410), "arrayref", CODE(0x564a01eba2d8)) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 485
Sql::select_list_of_lists(Sql=HASH(0x564a02018ed0), "SELECT TRUE FROM pg_database WHERE datname = ?", "musicbrainz_test") called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 416
Sql::select_single_column_array(Sql=HASH(0x564a02018ed0), "SELECT TRUE FROM pg_database WHERE datname = ?", "musicbrainz_test") called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 431
Sql::select_single_value(Sql=HASH(0x564a02018ed0), "SELECT TRUE FROM pg_database WHERE datname = ?", "musicbrainz_test") called at script/database_exists line 19
08006 DBI connect('dbname=template1;host=localhost;port=5432','postgres',...) failed: 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?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?Failed query:
'SELECT current_setting('server_version_num')'
()
08006 DBI connect('dbname=template1;host=localhost;port=5432','postgres',...) failed: 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?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 460.
Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x55c7ec0f6860)) called at /home/musicbrainz/musicbrainz-server/local/lib/perl5/Try/Tiny.pm line 123
Try::Tiny::try(CODE(0x55c7ebfff150), Try::Tiny::Catch=REF(0x55c7ec014558), Try::Tiny::Finally=REF(0x55c7eaa70fe8)) called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 466
Sql::_select_list(Sql=HASH(0x55c7eb91a018), "SELECT current_setting('server_version_num')", ARRAY(0x55c7ebebf858), "arrayref", CODE(0x55c7ebebf720)) called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 485
Sql::select_list_of_lists(Sql=HASH(0x55c7eb91a018), "SELECT current_setting('server_version_num')") called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 416
Sql::select_single_column_array(Sql=HASH(0x55c7eb91a018), "SELECT current_setting('server_version_num')") called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 431
Sql::select_single_value(Sql=HASH(0x55c7eb91a018), "SELECT current_setting('server_version_num')") called at ./admin/InitDb.pl line 73
main::RequireMinimumPostgreSQLVersion() called at ./admin/InitDb.pl line 537
08006 DBI connect('dbname=template1;host=localhost;port=5432','postgres',...) failed: 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?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment