Enable CORS in yml file DOCKER (ACS 7.0.0)

cancel
Showing results for 
Search instead for 
Did you mean: 
ahmed2
Member II

Enable CORS in yml file DOCKER (ACS 7.0.0)

Jump to solution

hi,

        i have configured ACS with active directory.every thing was working fine up till now.after enable cors in the yml fine.I cant run ACS.can anyone help me.

YML FILE CONFIGURATION SETTINGS


alfresco:
image: alfresco/alfresco-content-repository-community:7.0.0
mem_limit: 1500m

environment:
JAVA_TOOL_OPTIONS: "
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
-Dmetadata-keystore.password=mp6yc0UD9e
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=oKIWzVdEdA
-Dmetadata-keystore.metadata.algorithm=DESede
"
JAVA_OPTS: "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbcSmiley Tongueostgresql://postgres:5432/alfresco


-Dcors.enabled=true
-Dcors.allowed.origins=*


-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.http.connection.timeout=1000
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dshare.host=127.0.0.1
-Dshare.port=8080
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
-Dmessaging.broker.url=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE
-DlocalTransform.core-aio.url=http://transform-core-aio:8090/
-Dcsrf.filter.enabled=false
-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
-Dauthentication.chain=alfinst:alfrescoNtlm,ldap-ad1:ldap-ad
-Dldap.authentication.active=true
-Dldap.authentication.java.naming.security.authentication=simple
-Dldap.authentication.userNameFormat=%s@nust.edu.pk
-Dldap.authentication.java.naming.provider.url=ldap://nust.edu.pk:389
-Dldap.authentication.defaultAdministratorUserNames=Administrator,alfresco
-Dldap.synchronization.active=true
-Dldap.synchronization.java.naming.security.authentication=simple
-Dldap.synchronization.java.naming.security.principal=ABC@nust.edu.pk
-Dldap.synchronization.java.naming.security.credentials=123456
-Dldap.synchronization.groupSearchBase=OU=NUST,DC=nust,DC=edu,DC=pk
-Dldap.synchronization.userSearchBase=OU=NUST,DC=nust,DC=edu,DC=pk
-Dldap.synchronization.userFirstNameAttributeName=givenName
-Dldap.synchronization.userLastNameAttributeName=sn
"

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.3.10
mem_limit: 1536m
environment:
JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"
ports:
- 8090:8090

share:
image: alfresco/alfresco-share:7.0.0
mem_limit: 1g
environment:
REPO_HOST: "alfresco"
REPO_PORT: "8080"
JAVA_OPTS: "
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
-Dalfresco.protocol=http
"

postgres:
image: postgres:13.1
mem_limit: 512m
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG
ports:
- 5432:5432

solr6:
image: alfresco/alfresco-search-services:2.0.1
mem_limit: 2g
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
ports:
- 8083:8983 #Browser port
activemq:
image: alfresco/alfresco-activemq:5.16.1
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

proxy:
image: alfresco/alfresco-acs-nginx:3.1.1
mem_limit: 128m
environment:
DISABLE_PROMETHEUS: "true"
DISABLE_SYNCSERVICE: "true"
DISABLE_ADW: "true"
depends_on:
- alfresco
ports:
- 8080:8080
links:
- alfresco
- share

ERROR DETAILS

alfresco_1 | 09-Aug-2021 09:32:42.433 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
alfresco_1 | 09-Aug-2021 09:32:42.484 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [103639] milliseconds
solr6_1 | 2021-08-09 09:32:42.670 ERROR (searcherExecutor-8-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.t.ModelTracker Model tracking failed for core: alfresco
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090000 api/solr/modelsdiff return status:404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.callRepository(SOLRAPIClient.java:1596)
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1103)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:313)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:275)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.ensureFirstModelSync(ModelTracker.java:297)
solr6_1 | at org.alfresco.solr.lifecycle.SolrCoreLoadListener.createModelTracker(SolrCoreLoadListener.java:341)
solr6_1 | at org.alfresco.solr.lifecycle.SolrCoreLoadListener.newSearcher(SolrCoreLoadListener.java:135)
solr6_1 | at org.apache.solr.core.SolrCore.lambda$getSearcher$15(SolrCore.java:2249)
solr6_1 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
solr6_1 | at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
solr6_1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
solr6_1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
solr6_1 | at java.base/java.lang.Thread.run(Thread.java:834)
solr6_1 | 2021-08-09 09:32:42.749 WARN (searcherExecutor-7-thread-1-processing-x:archive) [ x:archive] o.a.s.t.MetadataTracker nextTxCommitTimeService is not available. Upgrade your ACS Repository version in order to use this feature: archive - GetNextTxCommitTime return status is 404 when invoking api/solr/nextTransaction?fromCommitTime=0
solr6_1 | 2021-08-09 09:32:42.751 WARN (searcherExecutor-8-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.t.MetadataTracker nextTxCommitTimeService is not available. Upgrade your ACS Repository version in order to use this feature: alfresco - GetNextTxCommitTime return status is 404 when invoking api/solr/nextTransaction?fromCommitTime=0
solr6_1 | 2021-08-09 09:32:50.156 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@41e1455d_Worker-1) [ ] o.a.s.t.AbstractTracker [alfresco / MODEL@1197316477 / IT #1628501570024] Tracking failure. See the stacktrace below for further details.
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090001 api/solr/modelsdiff return status:404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.callRepository(SOLRAPIClient.java:1596)
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1103)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:313)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:275)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.doTrack(ModelTracker.java:235)
solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:242)
solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:60)
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
solr6_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
solr6_1 | 2021-08-09 09:32:50.191 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@41e1455d_Worker-2) [ ] o.a.s.t.AbstractTracker [alfresco / ACL@221768688 / IT #1628501570027] Tracking failure. See the stacktrace below for further details.
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090003 api/solr/aclchangesets return status:404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.callRepository(SOLRAPIClient.java:1596)
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getAclChangeSets(SOLRAPIClient.java:185)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.checkRepoAndIndexConsistency(AclTracker.java:417)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.trackRepository(AclTracker.java:398)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.doTrack(AclTracker.java:161)
solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:242)
solr6_1 | at org.alfresco.solr.tracker.ActivatableTracker.track(ActivatableTracker.java:97)
solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:60)
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
solr6_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
solr6_1 | 2021-08-09 09:32:50.178 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@41e1455d_Worker-13) [ ] o.a.s.t.AbstractTracker [archive / NODE_STATE_PUBLISHER@249059573 / IT #1628501570054] Tracking failure. See the stacktrace below for further details.
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090002 GetTransactions return status is 404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getTransactions(SOLRAPIClient.java:441)
solr6_1 | at org.alfresco.solr.tracker.ShardStatePublisher.doTrack(ShardStatePublisher.java:91)
solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:242)
solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:60)
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
solr6_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
solr6_1 | 2021-08-09 09:32:50.200 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@41e1455d_Worker-3) [ ] o.a.s.t.AbstractTracker [archive / ACL@1231985689 / IT #1628501570030] Tracking failure. See the stacktrace below for further details.
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090004 api/solr/aclchangesets return status:404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.callRepository(SOLRAPIClient.java:1596)
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getAclChangeSets(SOLRAPIClient.java:185)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.checkRepoAndIndexConsistency(AclTracker.java:417)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.trackRepository(AclTracker.java:398)
solr6_1 | at org.alfresco.solr.tracker.AclTracker.doTrack(AclTracker.java:161)
solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:242)
solr6_1 | at org.alfresco.solr.tracker.ActivatableTracker.track(ActivatableTracker.java:97)
solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:60)
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
solr6_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
solr6_1 | 2021-08-09 09:32:50.233 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@41e1455d_Worker-12) [ ] o.a.s.t.AbstractTracker [alfresco / NODE_STATE_PUBLISHER@466006752 / IT #1628501570052] Tracking failure. See the stacktrace below for further details.
solr6_1 | org.alfresco.error.AlfrescoRuntimeException: 07090005 GetTransactions return status is 404
solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getTransactions(SOLRAPIClient.java:441)
solr6_1 | at org.alfresco.solr.tracker.ShardStatePublisher.doTrack(ShardStatePublisher.java:91)
solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:242)
solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:60)
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

1 Solution

Accepted Solutions
abhinavmishra14
Advanced

Re: Enable CORS in yml file DOCKER (ACS 7.0.0)

Jump to solution

Please check this thread and solution: 

https://hub.alfresco.com/t5/alfresco-content-services-forum/cors-configuration-in-acs-7-0/m-p/308982...

You can also refer this demo project for more details: https://github.com/abhinavmishra14/enable-cors-acs-demo

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

1 Reply
abhinavmishra14
Advanced

Re: Enable CORS in yml file DOCKER (ACS 7.0.0)

Jump to solution

Please check this thread and solution: 

https://hub.alfresco.com/t5/alfresco-content-services-forum/cors-configuration-in-acs-7-0/m-p/308982...

You can also refer this demo project for more details: https://github.com/abhinavmishra14/enable-cors-acs-demo

~Abhinav
(ACSCE, AWS SAA, Azure Admin)