Closed mdondrup closed 7 years ago
It looks like you might have a previously created database that somehow failed. Tripal then does not try and re-create the DB properly on a second run.
Try docker-compose kill; docker-compose rm -f; docker-compose up
I'm also having this same problem on a brand new setup of the application. Running the suggested fix does not correct the problem. Here's the full log for the db_1 container after applying the fix:
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 dynamic shared memory implementation ... posix db_1 | creating configuration files ... ok db_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok db_1 | initializing pg_authid ... ok db_1 | initializing dependencies ... ok db_1 | creating system views ... ok db_1 | loading system objects' descriptions ... ok db_1 | creating collations ... ok db_1 | creating conversions ... ok db_1 | creating dictionaries ... ok db_1 | setting privileges on built-in objects ... ok db_1 | creating information schema ... ok db_1 | loading PL/pgSQL server-side language ... ok db_1 | vacuuming database template1 ... ok db_1 | copying template1 to template0 ... ok db_1 | copying template1 to postgres ... ok db_1 | syncing data to disk ... 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 | 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....LOG: database system was shut down at 2017-04-21 00:36:21 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started db_1 | done db_1 | server started db_1 | ALTER ROLE db_1 | db_1 | db_1 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/load_schema.sh db_1 | ERROR: relation "chadoprop" does not exist at character 15 db_1 | STATEMENT: select * from chadoprop db_1 | db_1 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/load_yeast.sh db_1 | db_1 | LOG: received fast shutdown request db_1 | LOG: aborting any active transactions db_1 | waiting for server to shut down....LOG: autovacuum launcher shutting down db_1 | LOG: shutting down db_1 | 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 | LOG: database system was shut down at 2017-04-21 00:36:23 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started db_1 | FATAL: database "tripal" does not exist
And because the tripal database does not exist the web_1 container exits:
web_1 | psql: FATAL: database "tripal" does not exist dockertripal_web_1 exited with code 2
Would y'all mind trying the following change:
diff --git a/docker-compose.yml b/docker-compose.yml
index 2d58c31..0619df2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -16,7 +16,7 @@ services:
MEMORY_LIMIT: 128M
BASE_URL: "http://localhost:3000/tripal"
BASE_URL_PROTO: "http://"
- DB_NAME: 'tripal'
+ DB_NAME: 'postgres'
ports:
- "3000:80"
that shouldn't be the issue, but maybe? I tested when this issue was first posted and the default config worked fine for me, but maybe this is at fault.
Yep, it worked for me!
I am trying to run tripal using the proposed docker-compose.yml
When I run docker-compose up
I get: