cancel
Showing results for 
Search instead for 
Did you mean: 

CORS configuration for alfresco-docker 6.2 ga

fameur55
Champ on-the-rise
Champ on-the-rise

Hi There,

the CORS configuration with the docker version is making a lot of trouble.

changing the web.xml in the docker container is not persisted and disappears as soon as docker-compose up is called.

Are there any suggestions 

Thanks

5 REPLIES 5

narkuss
Star Contributor
Star Contributor

You should set CORS configuration from docker-compose environment. This config works for us:

JAVA_OPTS: '
<Other config parameters>
-Dcors.enabled=true
-Dcors.allowed.origins=<Allowed URL's separated by commas>

Hope it helps

fameur55
Champ on-the-rise
Champ on-the-rise

Thank you for your Help,

 do you have the exact syntax Please ??

i always get "alfresco_alfresco_1 exited with code 1" 

Thanks

narkuss
Star Contributor
Star Contributor

This message from docker could be triggered by a lot of different causes.

Are you getting this error since you set the properties I told you? Did you set these properties in docker-compose environment JAVA_OPTS section, or did you set them in alfresco-global.properties file? Are there any Alfresco logs before this message?

fameur55
Champ on-the-rise
Champ on-the-rise

Hi 

I set them in the docker-compose.yml and the error i got 

14-Jun-2021 07:22:34.506 INFO [JobLockService1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.alfresco.repo.lock.JobLockServiceImpl$4]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.alfresco.repo.lock.JobLockServiceImpl$4]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1380)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1368)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1182)
at org.alfresco.repo.lock.JobLockServiceImpl.releaseLockVerify(JobLockServiceImpl.java:470)
at org.alfresco.repo.lock.JobLockServiceImpl$2.run(JobLockServiceImpl.java:385)
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.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
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)
14-Jun-2021 07:28:44.678 INFO [Thread-52] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
14-Jun-2021 07:28:44.684 INFO [Thread-52] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
14-Jun-2021 07:28:44.690 INFO [Thread-52] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
14-Jun-2021 07:28:44.741 INFO [Thread-52] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
14-Jun-2021 07:28:44.744 INFO [Thread-52] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
14-Jun-2021 07:28:44.751 INFO [Thread-52] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
14-Jun-2021 07:28:44.754 INFO [Thread-52] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]

thanks 

CHorse
Champ in-the-making
Champ in-the-making

Thank you for sharing your knowledge.  mycfavisit