11-06-2020 12:16 PM
Hi There,
I am using the following public docker images from alfresco hub for starting up alfresco:
alfresco/alfresco-content-repository-community:6.2.1-A8
alfresco/alfresco-transform-core-aio:2.3.4
alfresco/alfresco-share:6.2.1
I wanted to check how to turn debug logging on for them? Is there an environment variable I could pass in to enable that?
Many thanks,
Richa
11-06-2020 03:34 PM
I wanted to check how to turn debug logging on for them? Is there an environment variable I could pass in to enable that?
For the services which are based upon spring boot e.g. 'alfresco-transform-core-aio', you can set debug log level via docker compose. But you can't do that for acs/share. I am afraid that this is not an option available via docker compose for acs/share.
example of spring boot based apps like transform services:
transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.3.4 mem_limit: 1536m environment: JAVA_OPTS: " -Dlogging.level.org.alfresco.transform.common.TransformerDebug=debug
-Dlogging.level.org.alfresco.transform.router.TransformerDebug=debug -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" ports: - 8090:8090
or for enterprise router on a package level:
transform-router:
image: local.nexus.docker:8083/alfresco/alfresco-transform-router:${TRANSFORMATION_ROUTER_TAG}
deploy:
resources:
limits:
memory: 512m
environment:
JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
-Dlogging.level.org.alfresco.transform.router=error
"
ACTIVEMQ_URL: "nio://activemq:61616"
CORE_AIO_URL: "http://transform-core-aio:8090"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- "8095:8095"
links:
- activemq
If you are using enterprise version, you have an option in admin console to set/enable/disable log settings (these settings are not presisted and on restart any setting done via admin console will be lost) found under support-tools.
You seems to be using community version, and support-tools is not by default available for this version. You can use this add-on : https://github.com/OrderOfTheBee/ootbee-support-tools to get the similar options.
You would have to apply the amps on both alfresco and share war file deployed under the containers. However, if you terminate the containers all these additions will be lost.
The best option would be to use DockerFile in combination with docker-compose and build the image with any add-ons/extensions, custom log4j etc.
Here is an example of DockerFile usage in docker-compose:
https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15
You can also take a look at this thread on how to copy/apply extensions via dockerfile:
https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550
Additonally, if you wish to connect to the containers, you can do it using below given command and update the log levels as usual you do on any linux sever where acs is deployed.
https://docs.alfresco.com/6.2/tasks/log-levels-set.html
Connect to a container: docker exec -i -t <container_Name/id> /bin/bash example: docker exec -it docker_alfresco_1 /bin/bash
11-06-2020 03:34 PM
I wanted to check how to turn debug logging on for them? Is there an environment variable I could pass in to enable that?
For the services which are based upon spring boot e.g. 'alfresco-transform-core-aio', you can set debug log level via docker compose. But you can't do that for acs/share. I am afraid that this is not an option available via docker compose for acs/share.
example of spring boot based apps like transform services:
transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.3.4 mem_limit: 1536m environment: JAVA_OPTS: " -Dlogging.level.org.alfresco.transform.common.TransformerDebug=debug
-Dlogging.level.org.alfresco.transform.router.TransformerDebug=debug -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" ports: - 8090:8090
or for enterprise router on a package level:
transform-router:
image: local.nexus.docker:8083/alfresco/alfresco-transform-router:${TRANSFORMATION_ROUTER_TAG}
deploy:
resources:
limits:
memory: 512m
environment:
JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
-Dlogging.level.org.alfresco.transform.router=error
"
ACTIVEMQ_URL: "nio://activemq:61616"
CORE_AIO_URL: "http://transform-core-aio:8090"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- "8095:8095"
links:
- activemq
If you are using enterprise version, you have an option in admin console to set/enable/disable log settings (these settings are not presisted and on restart any setting done via admin console will be lost) found under support-tools.
You seems to be using community version, and support-tools is not by default available for this version. You can use this add-on : https://github.com/OrderOfTheBee/ootbee-support-tools to get the similar options.
You would have to apply the amps on both alfresco and share war file deployed under the containers. However, if you terminate the containers all these additions will be lost.
The best option would be to use DockerFile in combination with docker-compose and build the image with any add-ons/extensions, custom log4j etc.
Here is an example of DockerFile usage in docker-compose:
https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15
You can also take a look at this thread on how to copy/apply extensions via dockerfile:
https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550
Additonally, if you wish to connect to the containers, you can do it using below given command and update the log levels as usual you do on any linux sever where acs is deployed.
https://docs.alfresco.com/6.2/tasks/log-levels-set.html
Connect to a container: docker exec -i -t <container_Name/id> /bin/bash example: docker exec -it docker_alfresco_1 /bin/bash
Explore our Alfresco products with the links below. Use labels to filter content by product module.