01-16-2021 10:44 AM
Hello,
I am new to alfresco and I am testing a poc where I try to deploy Alfresco Community 6.2 locally using docker-compose.yml. I managed to set up Alfresco, using volumes in order to keep my data as descibed in this template, but if execute went docker-compose down and then docker-compose up, alfresco is not deployed.
The stacktrace:
2021-01-16 15:31:20,611 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] 2021-01-16 15:31:20,652 ERROR [repo.content.JodConverterSharedInstance] [localhost-startStop-1] Unexpected error in configuring or starting the JodConverter library.The following error is shown for informational purposes only. 2021-01-16 15:31:20,713 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed org.alfresco.error.AlfrescoRuntimeException: 00160018 Ensure that the 'dir.root' property './alf_data' is pointing to the correct data location. at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:212) at org.alfresco.repo.admin.ConfigurationChecker.access$0(ConfigurationChecker.java:167) at org.alfresco.repo.admin.ConfigurationChecker$1$1.doWork(ConfigurationChecker.java:155) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:602) at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:151) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:338) at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:161) at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:186) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:717) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1859) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 16-Jan-2021 15:31:20.717 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 16-Jan-2021 15:31:20.719 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/alfresco] startup failed due to previous errors 2021-01-16 15:31:20,747 WARN [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception thrown from ApplicationListener handling ContextClosedEvent java.lang.NullPointerException at org.alfresco.repo.workflow.activiti.ActivitiEngineInitializer.onShutdown(ActivitiEngineInitializer.java:65) at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:67) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:191) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:975) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:516) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4746) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5403) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:717) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1859) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2021-01-16 15:31:20,993 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] 2021-01-16 15:31:20,994 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] 2021-01-16 15:31:20,995 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted] 2021-01-16 15:31:20,996 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted] 2021-01-16 15:31:21,574 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'thirdparty' subsystem, ID: [thirdparty, default] 2021-01-16 15:31:21,575 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'thirdparty' subsystem, ID: [thirdparty, default] 2021-01-16 15:31:21,582 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] 2021-01-16 15:31:21,582 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] 16-Jan-2021 15:31:21.601 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [QuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568) 16-Jan-2021 15:31:21.602 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [QuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568) 16-Jan-2021 15:31:21.602 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [Timer-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) java.base@11.0.1/java.lang.Object.wait(Object.java:328) java.base@11.0.1/java.util.TimerThread.mainLoop(Timer.java:527) java.base@11.0.1/java.util.TimerThread.run(Timer.java:506) 16-Jan-2021 15:31:21.603 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) java.base@11.0.1/java.lang.Object.wait(Object.java:328) java.base@11.0.1/java.util.TimerThread.mainLoop(Timer.java:527) java.base@11.0.1/java.util.TimerThread.run(Timer.java:506) 16-Jan-2021 15:31:21.604 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [Timer-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) java.base@11.0.1/java.lang.Object.wait(Object.java:328) java.base@11.0.1/java.util.TimerThread.mainLoop(Timer.java:527) java.base@11.0.1/java.util.TimerThread.run(Timer.java:506) 16-Jan-2021 15:31:21.605 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [Timer-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) java.base@11.0.1/java.lang.Object.wait(Object.java:328) java.base@11.0.1/java.util.TimerThread.mainLoop(Timer.java:527) java.base@11.0.1/java.util.TimerThread.run(Timer.java:506) 16-Jan-2021 15:31:21.606 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [Timer-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) java.base@11.0.1/java.lang.Object.wait(Object.java:328) java.base@11.0.1/java.util.TimerThread.mainLoop(Timer.java:527) java.base@11.0.1/java.util.TimerThread.run(Timer.java:506) 16-Jan-2021 15:31:21.607 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [alfresco] appears to have started a thread named [QuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.1/java.lang.Object.wait(Native Method) org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:427) 16-Jan-2021 15:31:21.608 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [org.alfresco.repo.template.QNameAwareObjectWrapper$1] (value [org.alfresco.repo.template.QNameAwareObjectWrapper$1@379f4b8d]) and a value of type [org.alfresco.repo.template.QNameAwareObjectWrapper$1$1] (value [org.alfresco.repo.template.QNameAwareObjectWrapper$1$1@4314dd29]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 16-Jan-2021 15:31:21.609 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@1b6b4206]) and a value of type [org.alfresco.repo.content.MimetypeMap.Data] (value [(mimetypes: 196 from XML: 196 from JSON: 0 files: 0)]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 16-Jan-2021 15:31:21.610 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@67834f1e]) and a value of type [org.alfresco.util.transaction.TransactionSupportUtil.ResourcesHolder] (value [org.alfresco.util.transaction.TransactionSupportUtil$ResourcesHolder@e460549]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 16-Jan-2021 15:31:21.610 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@81eb3b7]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 16-Jan-2021 15:31:21.611 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [org.alfresco.repo.template.QNameAwareObjectWrapper$1] (value [org.alfresco.repo.template.QNameAwareObjectWrapper$1@17cd3391]) and a value of type [org.alfresco.repo.template.QNameAwareObjectWrapper$1$1] (value [org.alfresco.repo.template.QNameAwareObjectWrapper$1$1@6acb65c9]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 16-Jan-2021 15:31:21.617 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/alfresco] has finished in [40,690] ms 16-Jan-2021 15:31:21.619 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 16-Jan-2021 15:31:21.629 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] 16-Jan-2021 15:31:21.640 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 43305 ms
01-16-2021 05:16 PM
seems like tansform-core-aio service is missing from your docker compose.
Please share the complete docker compose file if not shared already.
Here is another example with persistant volumes: https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml
01-16-2021 10:45 AM
The docker-compose.yml : (written here due to character limitation)
# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose version: "2" services: alfresco: image: alfresco/alfresco-content-repository-community:6.2.0-ga mem_limit: 1500m depends_on: - postgres environment: JAVA_OPTS : " -Ddb.driver=org.postgresql.Driver -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.postgresql.Driver -Ddb.url=jdbc:postgresql://postgres:5432/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.secureComms=none -Dsolr.baseUrl=/solr -Dindex.subsystem.name=solr6 -Dalfresco.host=localhost -Dalfresco.port=8080 -Dshare.host=localhost -Dshare.port=8080 -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\" -Ddeployment.method=DOCKER_COMPOSE -Dcsrf.filter.enabled=false -Dopencmis.server.override=true -Dopencmis.server.value=http://localhost:8080 -Dlocal.transform.service.enabled=false -Dlegacy.transform.service.enabled=false -Dcsrf.filter.enabled=false -Dalfresco.restApi.basicAuthScheme=true -Dauthentication.protection.enabled=false -XX:+UseG1GC -XX:+UseStringDeduplication -Dgoogledocs.enabled=false -Xms1500m -Xmx1500m" volumes: - alf-repo-data:/usr/local/tomcat/alf_data - alf-repo-logs:/usr/local/tomcat/logs share: image: alfresco/alfresco-share:6.2.0 mem_limit: 1g environment: REPO_HOST: "alfresco" REPO_PORT: "8080" JAVA_OPTS: " -Xms500m -Xmx500m -Dalfresco.host=localhost -Dalfresco.port=8080 -Dalfresco.context=alfresco -Dalfresco.protocol=http " volumes: - alf-share-logs:/usr/local/tomcat/logs postgres: image: postgres:11.4 mem_limit: 1500m environment: - POSTGRES_PASSWORD=alfresco - POSTGRES_USER=alfresco - POSTGRES_DB=alfresco command: " postgres -c max_connections=200 -c logging_collector=on -c log_min_messages=LOG -c log_directory=/var/log/postgresql" ports: - 5432:5432 volumes: - postgres-data:/var/lib/postgresql/data - postgres-logs:/var/log/postgresql solr6: image: alfresco/alfresco-search-services:1.4.3 mem_limit: 2500m environment: #Solr needs to know how to register itself with Alfresco - SOLR_ALFRESCO_HOST=alfresco - SOLR_ALFRESCO_PORT=8080 #Alfresco needs to know how to call solr - SOLR_SOLR_HOST=solr6 - SOLR_SOLR_PORT=8983 #Create the default alfresco and archive cores - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive #HTTP by default - ALFRESCO_SECURE_COMMS=none volumes: - solr-data:/opt/alfresco-search-services/data activemq: image: alfresco/alfresco-activemq:5.15.8 mem_limit: 1g ports: - 8161:8161 # Web Console - 5672:5672 # AMQP - 61616:61616 # OpenWire - 61613:61613 # STOMP # HTTP proxy to provide HTTP Default port access to services # SOLR API and SOLR Web Console are protected to avoid unauthenticated access proxy: image: alfresco/acs-community-ngnix:1.0.0 mem_limit: 128m depends_on: - alfresco - solr6 - share volumes: - ./config/nginx.htpasswd:/etc/nginx/conf.d/nginx.htpasswd ports: - 8080:8080 volumes: alf-repo-data: alf-repo-logs: alf-share-logs: postgres-data: postgres-logs: solr-data:
01-16-2021 05:16 PM
seems like tansform-core-aio service is missing from your docker compose.
Please share the complete docker compose file if not shared already.
Here is another example with persistant volumes: https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml
01-17-2021 01:35 PM
Good luck @pola, glad you are able to solve your issue
01-17-2021 04:13 PM
@abhinavmishra14 Thank you for your prompt reply! Without your help I would definitely be lost!
01-18-2021 10:09 AM
Hi @pola
Thanks for accepting @abhinavmishra14 solution & glad you got it working.
All the best,
01-19-2021 10:42 AM
Glad to hear @pola , good luck.
Explore our Alfresco products with the links below. Use labels to filter content by product module.