docker, database not inited

cancel
Showing results for 
Search instead for 
Did you mean: 
darionis
Active Member

docker, database not inited

Hi,

I am developng with SDK 4.1, everything worked well untill I wanted to cleanup docker system. I executed series of docker commands like "docker system prune" and "docker images purge" to make a fresh start. From that moment, alfresco fails to create DB.

I see that docker pulls all required images and then it starts containers, postgres server is running, alfresco DB exists but it is empty.

Here is the log

 

| 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 default timezone ... Etc/UTC
| selecting dynamic shared memory implementation ... posix
| creating configuration files ... ok
| running bootstrap script ... ok
| performing post-bootstrap initialization ... 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.
| waiting for server to start....LOG:  database system was shut down at 2020-08-03 11:07:22 UTC
| LOG:  MultiXact member wraparound protections are now enabled
| LOG:  autovacuum launcher started
| LOG:  database system is ready to accept connections
|  done
| server started
| CREATE DATABASE
| 
| 
| /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
| 
| LOG:  received fast shutdown request
| waiting for server to shut down....LOG:  aborting any active transactions
| LOG:  autovacuum launcher shutting down
| LOG:  shutting down
| LOG:  database system is shut down
|  done
| server stopped
| 
| PostgreSQL init process complete; ready for start up.
| 
| LOG:  database system was shut down at 2020-08-03 11:07:24 UTC
| LOG:  MultiXact member wraparound protections are now enabled
| LOG:  database system is ready to accept connections
| LOG:  autovacuum launcher started

Now, ACS container has a problem starting:

 

INFO  [domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V4.2-metadata-query-indexes
INFO  [domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V5.1-metadata-query-indexes
INFO  [domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V5.2-remove-jbpm-tables-from-db
INFO  [alfresco.repo.admin] [localhost-startStop-1] Using database URL 'jdbc:postgresql://bankdms-repo-postgres:5432/alfresco' with user 'alfresco'.
INFO  [alfresco.repo.admin] [localhost-startStop-1] Connected to database PostgreSQL version 9.6.18
INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
ERROR [audit.model.AuditModelRegistryImpl] [localhost-startStop-1] Failed to load audit model: jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-7.134.1.jar!/alfresco/audit/alfresco-audit-tagging.xml
bankdms-repo-acs_1       | org.springframework.jdbc.BadSqlGrammarException: 
bankdms-repo-acs_1       | ### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "alf_audit_model" does not exist

I don't understand what is the problem with creating alfresco tables since the database 'alfresco' is created properly. I also tried deleting 'postgres' volume, but problem persists. Is this related to my "docker prune"? Can I go back to pristine state?

I tried again to delete everything from docker, images, containers and volumes. Docker images are downloaded again but I still have the same problem.

 

Thanks!