02-08-2023 05:51 AM
Hi all,
My current environment :
############################### ## Common Alfresco Properties # ############################### dir.root=/opt/alfresco-community/alf_data # my contentstore is mounted from a NAS nfs shared folder to /opt/contentstore dir.contentstore=/opt/contentstore alfresco.context=alfresco alfresco.host=ecm.mydomain.com alfresco.port=80 alfresco.protocol=http share.context=share share.host=ecm.mydomain.com share.port=80 share.protocol=http ### database connection properties ### db.driver=com.mysql.jdbc.Driver db.username=alfresco db.password=****** db.name=alfresco db.url=jdbc:mysql://localhost:3306/alfresco?useUnicode=yes&characterEncoding=UTF-8&useSSL=false # Note: your database must also be able to accept at least this many connections. Please see your database documentation for instructions on how to configure this. db.pool.max=500 db.pool.validate.query=SELECT 1 # The server mode. Set value here # UNKNOWN | TEST | BACKUP | PRODUCTION system.serverMode=UNKNOWN ### FTP Server Configuration ### ftp.port=21 ### RMI registry port for JMX ### alfresco.rmi.services.port=50500 ### External executable locations ### ooo.exe=/opt/alfresco-community/libreoffice/program/soffice.bin ooo.enabled=true ooo.port=8100 img.root=/opt/alfresco-community/common img.dyn=${img.root}/lib img.exe=${img.root}/bin/convert alfresco-pdf-renderer.root=/opt/alfresco-community/common/alfresco-pdf-renderer alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer jodconverter.enabled=false jodconverter.officeHome=/opt/alfresco-community/libreoffice jodconverter.portNumbers=8100 ### Active Directory authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad ntlm.authentication.sso.enabled=false ldap.authentication.allowGuestLogin=false ldap.authentication.userNameFormat=%s@mydomain.com ldap.authentication.java.naming.provider.url=ldap://192.168.7.103:389 ldap.authentication.defaultAdministratorUserNames=Administrator ldap.synchronization.java.naming.security.principal=user@mydomain.com ldap.synchronization.java.naming.security.credentials=****** ldap.synchronization.active=true #user ldap.synchronization.userSearchBase=OU\=Central Management,DC\=mydomain,DC\=com ldap.synchronization.userIdAttributeName=sAMAccountName ldap.synchronization.userFirstNameAttributeName=givenName ldap.synchronization.userLastNameAttributeName=sn ldap.synchronization.userEmailAttributeName=mail #group ldap.synchronization.groupSearchBase=OU\=Groups,OU\=Central Management,DC\=mydomain,DC\=com # Sync synchronization.synchronizeChangesOnly=false synchronization.allowDeletions=true synchronization.syncWhenMissingPeopleLogIn=true synchronization.syncOnStartup=true synchronization.import.cron=0 */30 * * * ? ldap.synchronization.enableProgressEstimation=true ### Initial admin password ### alfresco_user_store.adminpassword=****** ### E-mail site invitation setting ### notification.email.siteinvite=false ### License location ### dir.license.external=/opt/alfresco-community ### Solr indexing ### #solr6 #dir.keystore=${dir.root}/keystore solr.host=localhost index.subsystem.name=solr6 solr.secureComms=none solr.port=8983 ### Allow extended ResultSet processing security.anyDenyDenies=false ### SMTP Exchange mail.host=smtp.office365.com mail.port=587 mail.username=user@mydomain.com mail.password=****** mail.from.default=ecm@mydomain.com mail.from.enabled=true mail.encoding=UTF-8 mail.header= mail.protocol=smtps mail.smtp.starttls.enable=true mail.smtp.auth=true mail.smtp.timeout=30000 # Additional Java Mail properties for SMTPS protocol mail.smtps.auth=true mail.smtps.starttls.enable=true ### E-mail site invitation setting ### notification.email.siteinvite=true ## SMTP SEND EMAIL TEST ### mail.testmessage.send=true mail.testmessage.to=jack@mydomain.com #mail.testmessage.to=ecm@mydomain.com mail.testmessage.subject=Outbound SMTP mail.testmessage.text=The Outbound SMTP email subsystem is working ### Smart Folders Config Properties ### smart.folders.enabled=false ### Remote JMX (Default: disabled) ### alfresco.jmx.connector.enabled=false
version: "3" services: alfresco: image: docker.io/alfresco/alfresco-content-repository-community:7.1.0 container_name: alfresco mem_limit: 2g 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=com.mysql.cj.jdbc.Driver -Ddb.username=alfresco -Ddb.password=****** -Ddb.url=jdbc:mysql://mysql:3306/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -Dsolr.secureComms=secret -Dsolr.sharedSecret=secret -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6 -Dshare.host=127.0.0.1 -Dshare.port=8080 -Dalfresco.host=localhost -Dalfresco.port=8080 -Dcsrf.filter.enabled=false -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 TZ: Asia/Ho_Chi_Minh volumes: - ./mysql-connector-java-8.0.26.jar:/usr/local/tomcat/lib/mysql-connector-java-8.0.26.jartomcat/alfresco-global.properties
- ./tomcat/alfresco-global.properties:/usr/local/tomcat/shared/classes/alfresco-global.properties - ./tomcat/alf_data:/usr/local/tomcat/alf_data - ./tomcat/logs:/usr/local/tomcat/logs transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.5.3 container_name: transform-core-aio mem_limit: 1536m environment: TZ: Asia/Ho_Chi_Minh JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" ports: - "8090:8090" share: image: docker.io/alfresco/alfresco-share:7.1.0.1 container_name: share mem_limit: 2g 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 TZ: Asia/Ho_Chi_Minh mysql: image: mysql:8.0.26 container_name: mysql mem_limit: 512m environment: - TZ=Asia/Ho_Chi_Minh - MYSQL_ROOT_PASSWORD=****** - MYSQL_PASSWORD=****** - MYSQL_USER=alfresco - MYSQL_DATABASE=alfresco ports: - "3306:3306" volumes: - ./mysqldata:/var/lib/mysql solr6: image: alfresco/alfresco-search-services:2.0.2 container_name: solr6 mem_limit: 2g environment: TZ: Asia/Ho_Chi_Minh # 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" # HTTPS or SECRET ALFRESCO_SECURE_COMMS: "secret" # SHARED SECRET VALUE JAVA_TOOL_OPTIONS: >- -Dalfresco.secureComms.secret=secret ports: - "8083:8983" # Browser port volumes: - ./alfresco-search-services/data:/opt/alfresco-search-services/data activemq: image: alfresco/alfresco-activemq:5.16.1 container_name: activemq mem_limit: 1g ports: - "8161:8161" # Web Console - "5672:5672" # AMQP - "61616:61616" # OpenWire - "61613:61613" # STOMP volumes: - ./activemq/data:/opt/activemq/data environment: TZ: Asia/Ho_Chi_Minh content-app: image: alfresco/alfresco-content-app:2.7.0 container_name: content-app mem_limit: 128m environment: TZ: Asia/Ho_Chi_Minh APP_BASE_SHARE_URL: "http://localhost:8080/aca/#/preview/s" proxy: image: alfresco/alfresco-acs-nginx:3.4.2 container_name: proxy mem_limit: 128m environment: TZ: Asia/Ho_Chi_Minh DISABLE_PROMETHEUS: "true" DISABLE_SYNCSERVICE: "true" DISABLE_ADW: "true" DISABLE_CONTROL_CENTER: "true" ENABLE_CONTENT_APP: "true" depends_on: - alfresco - content-app ports: - "80:80" links: - content-app - alfresco - share volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# The server mode. Set value here # UNKNOWN | TEST | BACKUP | PRODUCTION system.serverMode=PRODUCTION ### Active Directory authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad ntlm.authentication.sso.enabled=false ldap.authentication.allowGuestLogin=false ldap.authentication.userNameFormat=%s@mydomain.com ldap.authentication.java.naming.provider.url=ldap://192.168.7.103:389 ldap.authentication.defaultAdministratorUserNames=Administrator ldap.synchronization.java.naming.security.principal=user@mydomain.com ldap.synchronization.java.naming.security.credentials=****** ldap.synchronization.active=true #user ldap.synchronization.userSearchBase=OU\=Central Management,DC\=mydomain,DC\=com ldap.synchronization.userIdAttributeName=sAMAccountName ldap.synchronization.userFirstNameAttributeName=givenName ldap.synchronization.userLastNameAttributeName=sn ldap.synchronization.userEmailAttributeName=mail #group ldap.synchronization.groupSearchBase=OU\=Groups,OU\=Central Management,DC\=mydomain,DC\=com # Sync synchronization.synchronizeChangesOnly=false synchronization.allowDeletions=true synchronization.syncWhenMissingPeopleLogIn=true synchronization.syncOnStartup=true synchronization.import.cron=0 */30 * * * ? ldap.synchronization.enableProgressEstimation=true ### Initial admin password ### alfresco_user_store.adminpassword=****** ### E-mail site invitation setting ### notification.email.siteinvite=false ### SMTP Exchange mail.host=smtp.office365.com mail.port=587 mail.username=user@mydomain.com mail.password=****** mail.from.default=ecm@mydomain.com mail.from.enabled=true mail.encoding=UTF-8 mail.header= mail.protocol=smtps mail.smtp.starttls.enable=true mail.smtp.auth=true mail.smtp.timeout=30000 # Additional Java Mail properties for SMTPS protocol mail.smtps.auth=true mail.smtps.starttls.enable=true ### E-mail site invitation setting ### notification.email.siteinvite=true ## SMTP SEND EMAIL TEST ### mail.testmessage.send=true mail.testmessage.to=jack@mydomain.com #mail.testmessage.to=ecm@mydomain.com mail.testmessage.subject=Outbound SMTP mail.testmessage.text=The Outbound SMTP email subsystem is working
03-12-2023 11:53 PM
For anyone want to do same thing, here my steps:
- Prepare a Ubuntu latest server with docker installed.
- Create /opt/alfresco-community structure like this:
drwxr-xr-x 3 amq amq 4.0K Mar 7 12:09 activemq drwxr-xr-x 3 solr solr 4.0K Mar 7 12:09 alfresco-search-services drwxr-xr-x 2 root root 4.0K Mar 12 06:40 datasamples -rw-r--r-- 1 root root 616 Mar 7 12:09 docker-compose-initdb.yml -rw-r--r-- 1 root root 6.3K Mar 12 21:01 docker-compose.yml -rw-r--r-- 1 root root 525 Mar 12 05:52 my.cnf -rw-r--r-- 1 root root 2.4M Mar 7 12:09 mysql-connector-java-8.0.26.jar drwxr-xr-x 7 lxd root 4.0K Mar 13 09:52 mysqldata drwxr-xr-x 2 root root 4.0K Mar 7 12:09 nginx drwxr-xr-x 4 alfresco alfresco 4.0K Mar 13 10:01 tomcat
- Create users alfresco (uid 33000) , amq (uid 33031) , solr (uid 33007) , and assign permissions to the respective folders
useradd alfresco -u 33000 -M -s /bin/false useradd amq -u 33031 -M -s /bin/false useradd solr -u 33007 -M -s /bin/false chown -R alfresco:alfresco tomcat chown -R solr:solr alfresco-search-services chown -R amq:amq activemq
Dump database "alfresco" from old server and put it into datasamples as sql file , run "docker compose -f docker-compose-initdb.yml up -d" and wait until mysql container import alfresco.sql successfully.
You can monitor the import process with "docker logs mysqlecm"
You can customize mysql instance with my.cnf or not.
version: "3" services: mysqlecm: image: mysql:8.0.26 container_name: mysqlecm restart: always deploy: resources: limits: memory: 12g reservations: memory: 4g environment: - TZ=Asia/Ho_Chi_Minh - MYSQL_ROOT_PASSWORD=******* - MYSQL_PASSWORD=******* - MYSQL_USER=alfresco - MYSQL_DATABASE=alfresco # ports: # - "3306:3306" security_opt: - seccomp:unconfined volumes: - ./mysqldata:/var/lib/mysql - ./datasamples:/docker-entrypoint-initdb.d - ./my.cnf:/etc/mysql/my.cnf
Run "docker compose -f docker-compose-initdb.yml down" to stop mysql instance after it finished import alfresco.sql
Run "docker compose -f docker-compose.yml up -d" to start new Alfresco instance
version: "3" services: alfresco: image: docker.io/alfresco/alfresco-content-repository-community:7.1.0 container_name: alfresco restart: always deploy: resources: limits: memory: 8g reservations: memory: 4g 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=com.mysql.cj.jdbc.Driver -Ddb.username=alfresco -Ddb.password=******** -Ddb.url=jdbc:mysql://mysqlecm:3306/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -Dsolr.secureComms=none -Dsolr.sharedSecret=none -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6 -Dshare.host=127.0.0.1 -Dshare.port=8080 -Dalfresco.host=localhost -Dalfresco.port=8080 -Dcsrf.filter.enabled=false -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 TZ: Asia/Ho_Chi_Minh volumes: - ./mysql-connector-java-8.0.26.jar:/usr/local/tomcat/lib/mysql-connector-java-8.0.26.jar - ./tomcat/alfresco-global.properties:/usr/local/tomcat/shared/classes/alfresco-global.properties - ./tomcat/alf_data:/usr/local/tomcat/alf_data - ./tomcat/logs:/usr/local/tomcat/logs transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.5.3 container_name: transform-core-aio restart: always deploy: resources: limits: memory: 4g reservations: memory: 4g environment: TZ: Asia/Ho_Chi_Minh JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" ports: - "8090:8090" share: image: docker.io/alfresco/alfresco-share:7.1.0.1 container_name: share restart: always deploy: resources: limits: memory: 3g reservations: memory: 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 TZ: Asia/Ho_Chi_Minh mysqlecm: image: mysql:8.0.26 container_name: mysqlecm restart: always deploy: resources: limits: memory: 6g reservations: memory: 4g environment: - TZ=Asia/Ho_Chi_Minh # - MYSQL_ROOT_PASSWORD=********* # - MYSQL_PASSWORD=********* # - MYSQL_USER=alfresco # - MYSQL_DATABASE=alfresco ports: - "3306:3306" security_opt: - seccomp:unconfined volumes: - ./mysqldata:/var/lib/mysql - ./my.cnf:/etc/mysql/my.cnf - ./datasamples:/backup solr6: image: alfresco/alfresco-search-services:2.0.2 container_name: solr6 restart: always deploy: resources: limits: memory: 2g reservations: memory: 2g environment: TZ: Asia/Ho_Chi_Minh # 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" # HTTPS or SECRET ALFRESCO_SECURE_COMMS: "none" # SHARED SECRET VALUE JAVA_TOOL_OPTIONS: >- -Dalfresco.secureComms.secret=none ports: - "8083:8983" # Browser port volumes: - ./alfresco-search-services/data:/opt/alfresco-search-services/data - ./alfresco-search-services/shared.properties:/opt/alfresco-search-services/solrhome/conf/shared.properties activemq: image: alfresco/alfresco-activemq:5.16.1 container_name: activemq restart: always deploy: resources: limits: memory: 1g reservations: memory: 1g ports: - "8161:8161" # Web Console - "5672:5672" # AMQP - "61616:61616" # OpenWire - "61613:61613" # STOMP volumes: - ./activemq/data:/opt/activemq/data environment: TZ: Asia/Ho_Chi_Minh content-app: image: alfresco/alfresco-content-app:2.7.0 container_name: content-app restart: always deploy: resources: limits: memory: 128m reservations: memory: 128m environment: TZ: Asia/Ho_Chi_Minh APP_BASE_SHARE_URL: "http://localhost:8080/aca/#/preview/s" proxy: image: alfresco/alfresco-acs-nginx:3.4.2 container_name: proxy restart: always deploy: resources: limits: memory: 128m reservations: memory: 128m environment: TZ: Asia/Ho_Chi_Minh DISABLE_PROMETHEUS: "true" DISABLE_SYNCSERVICE: "true" DISABLE_ADW: "true" DISABLE_CONTROL_CENTER: "true" ENABLE_CONTENT_APP: "true" depends_on: - alfresco - content-app ports: - "80:80" links: - content-app - alfresco - share volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf
You can change memory limit you want to assign to each container.
You can change time zone of container by editing environment "TZ"
You can customize alfresco with ./tomcat/alfresco-global.properties or not
You can customize alfresco-search-services with ./alfresco-search-services/shared.properties or not
You can customize proxy with ./nginx/nginx.conf or not , for ex : port 80 instead of 8080
events { worker_connections 1024; } http { server { listen *:80; client_max_body_size 0; set $allowOriginSite *; proxy_pass_request_headers on; proxy_pass_header Set-Cookie; # External settings, do not remove #ENV_ACCESS_LOG proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Set-Cookie; # Protect access to SOLR APIs location ~ ^(/.*/service/api/solr/.*)$ {return 403;} location ~ ^(/.*/s/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcservice/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcs/api/solr/.*)$ {return 403;} location ~ ^(/.*/proxy/.*/api/solr/.*)$ {return 403 ;} location ~ ^(/.*/-default-/proxy/.*/api/.*)$ {return 403;} # Prometheus settings, do not remove #PROMETHEUS_LOCATION location / { proxy_pass http://alfresco:8080; } location /alfresco/ { proxy_pass http://alfresco:8080; # If using external proxy / load balancer (for initial redirect if no trailing slash) absolute_redirect off; } # Share settings, do not remove location /share/ { proxy_pass http://share:8080; absolute_redirect off; } # Control Center settings, do not remove #CONTROL_CENTER_LOCATION # ADW settings, do not remove #ADW_LOCATION # ACA settings, do not remove location /content-app/ { proxy_pass http://content-app:8080/; absolute_redirect off; } # Sync service settings, do not remove #SYNCSERVICE_LOCATION } }
If you don't want to customize any thing, just comment out specific lines at "volumes" part
You should wait for alfresco-search-services to index full your documents again. "http://your_server_ip:8083/solr/#/alfresco"
Some commands may help you:
- docker compose -f filename.yml up -d --> start containers
- docker compose -f filename.yml down --> stop containers
- docker ps -a --> view all containers status
- docker logs container_name --> view logs output of a container
02-08-2023 05:52 AM
2023-02-08 16:48:25,647 ERROR [org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean] [main] Error auto-starting subsystem org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mail' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/al fresco-repository-11.140.jar!/alfresco/subsystems/email/OutboundSMTP/outboundSMTP-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error .AlfrescoRuntimeException: 01080018 Failed to send email to:jack@mydomain.com at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:824) at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:1098) at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:637) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:232) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:197) at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:217) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292) 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:4768) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5230) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:149) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:139) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:696) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1618) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:946) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476) Caused by: org.alfresco.error.AlfrescoRuntimeException: 01080018 Failed to send email to:jack@mydomain.com at org.alfresco.repo.action.executer.MailActionExecuter.sendEmail(MailActionExecuter.java:1080) at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:524) at org.alfresco.repo.action.executer.MailActionExecuter$1.doWork(MailActionExecuter.java:456) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:602) at org.alfresco.repo.action.executer.MailActionExecuter.init(MailActionExecuter.java:446) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$invokeCustomInitMethod$7(AbstractAutowireCapableBeanFactory.java:1902) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1901) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1854) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
02-11-2023 05:51 AM
There is the short plan: Migrate from Alfresco Community 5.2 to Alfresco Community 7.x
Several things more:
Good luck,
Serge
02-12-2023 10:41 PM
Hi @fedorow , thanks for you useful advice.
I have changed the owner of alf_data to 33000 recursively , made solr folder owner to 33007 and activemq/data to 33031 already.
But I don't understand why Database persistant volume, must be 999 (lxd:x:999:100::/var/snap/lxd/common/lxd:/bin/false) ?
My contentstore is mounted from a NAS nfs shared folder to /opt/contentstore (old server) , owner is root (I start Alfresco services as root)
On my new server , I also start Alfresco container as root so I would mount NAS nfs shared folder to new Ubuntu-latest server at /opt/alfresco-community/tomcat/alf_data/contentstore as root ?
02-13-2023 05:27 AM
@jack_chuong I'm not exactly understand your questions.
The default user of Alfresco container is 33000. It is does not metter who run container, Alfresco will access to storage as 33000. You can change it by creating custom image and change container user to root. In this case the owner of the folder could be any user.
The owner of /var/lib/mysql folder inside the container is 'mysql' user. The id of this user is 999. I suspect, you do not have 'mysql' user on your host, so use '999' id instead 'mysql' name. The same thing about the alfresco container. Host do not know the names of container users, byt use the id's. 33000 is the id of container user with name 'alfresco'.
Ctreate persistant volyme to whole /usr/local/tomcat/alf_data folder, not only /usr/local/tomcat/alf_data/contentstore. You have had right map in the docker-compose.yml.
02-13-2023 09:47 PM
You're right.
I created user alfresco with uid 33000 , amq with uid 33031 , solr with uid 33007 on new Ubuntu server for good view
/etc/passwd
lxd:x:999:100::/var/snap/lxd/common/lxd:/bin/false
alfresco:x:33000:33000::/home/alfresco:/bin/false amq:x:33031:33031::/home/amq:/bin/false solr:x:33007:33007::/home/solr:/bin/false
/opt/alfresco-community# ls -lh
total 2.4M
drwxr-xr-x 3 amq amq 4.0K Feb 8 16:13 activemq
drwxr-xr-x 3 solr solr 4.0K Feb 8 16:01 alfresco-search-services
-rw-r--r-- 1 root root 5.6K Feb 13 10:32 docker-compose.yml
-rw-r--r-- 1 root root 2.4M Jun 8 2021 mysql-connector-java-8.0.26.jar
drwxr-xr-x 7 lxd root 4.0K Feb 13 10:31 mysqldata
drwxr-xr-x 2 root root 4.0K Feb 8 10:56 nginx
drwxr-xr-x 4 alfresco alfresco 4.0K Feb 8 17:45 tomcat
There is a lxd uid 999 user already exists in my new Ubuntu server , so I leave it there.
I have concern about alf_data folder , my contentstore is mounted from a NAS nfs shared folder to /opt/contentstore
/etc/fstab 192.168.7.107:/ECM_Contentstore 15T 3.1T 12T 21% /opt/contentstore df -h 192.168.7.107:/ECM_Contentstore 15T 3.1T 12T 21% /opt/contentstore
So map in the docker-compose.yml would be like:
volumes: - ./tomcat/alf_data:/usr/local/tomcat/alf_data - /opt/contentstore:/usr/local/tomcat/alf_data/contentstore - ./tomcat/logs:/usr/local/tomcat/logs
My alf_data/contentstore.deleted from old server is 226M and I heard that it doesn't matter.
Do I have to move contentstore.deleted from old server to new server and map/put it to ./tomcat/alf_data , or just let Alfresco recreate it ?
02-14-2023 03:52 PM
Yes, the Alfresco will recreate contentsotre.deleted.
I never tryed to make volume as subfolder into the other volume. Make shure it will work in docker environment. For example docker do not work with symboilc links in volumes.
02-15-2023 04:46 AM
It seems work fine
df -h 192.168.7.107:/ECM_Contentstore 15T 3.6T 12T 24% /opt/alfresco-community/tomcat/alf_data/contentstore # docker-compose.yml volumes: - ./mysql-connector-java-8.0.26.jar:/usr/local/tomcat/lib/mysql-connector-java-8.0.26.jar - ./tomcat/alfresco-global.properties:/usr/local/tomcat/shared/classes/alfresco-global.properties - ./tomcat/alf_data:/usr/local/tomcat/alf_data - ./tomcat/logs:/usr/local/tomcat/logs
I can login to alfresco and see documents in repository, however, alfresco search service (solr6) doesn't work, I cannot search documents. I get some error about keystore so I decide to simplify communication between alfresco and solr6.
alfresco: environment: JAVA_OPTS: >- -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -Dsolr.secureComms=none -Dsolr.sharedSecret=none -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6 solr6: environment: TZ: Asia/Ho_Chi_Minh # 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" # HTTPS or SECRET ALFRESCO_SECURE_COMMS: "none" # SHARED SECRET VALUE JAVA_TOOL_OPTIONS: >- -Dalfresco.secureComms.secret=none
I can see that solr6 is indexing documents , will wait it finish (500 millions documents) and search documents again.
03-12-2023 11:53 PM
For anyone want to do same thing, here my steps:
- Prepare a Ubuntu latest server with docker installed.
- Create /opt/alfresco-community structure like this:
drwxr-xr-x 3 amq amq 4.0K Mar 7 12:09 activemq drwxr-xr-x 3 solr solr 4.0K Mar 7 12:09 alfresco-search-services drwxr-xr-x 2 root root 4.0K Mar 12 06:40 datasamples -rw-r--r-- 1 root root 616 Mar 7 12:09 docker-compose-initdb.yml -rw-r--r-- 1 root root 6.3K Mar 12 21:01 docker-compose.yml -rw-r--r-- 1 root root 525 Mar 12 05:52 my.cnf -rw-r--r-- 1 root root 2.4M Mar 7 12:09 mysql-connector-java-8.0.26.jar drwxr-xr-x 7 lxd root 4.0K Mar 13 09:52 mysqldata drwxr-xr-x 2 root root 4.0K Mar 7 12:09 nginx drwxr-xr-x 4 alfresco alfresco 4.0K Mar 13 10:01 tomcat
- Create users alfresco (uid 33000) , amq (uid 33031) , solr (uid 33007) , and assign permissions to the respective folders
useradd alfresco -u 33000 -M -s /bin/false useradd amq -u 33031 -M -s /bin/false useradd solr -u 33007 -M -s /bin/false chown -R alfresco:alfresco tomcat chown -R solr:solr alfresco-search-services chown -R amq:amq activemq
Dump database "alfresco" from old server and put it into datasamples as sql file , run "docker compose -f docker-compose-initdb.yml up -d" and wait until mysql container import alfresco.sql successfully.
You can monitor the import process with "docker logs mysqlecm"
You can customize mysql instance with my.cnf or not.
version: "3" services: mysqlecm: image: mysql:8.0.26 container_name: mysqlecm restart: always deploy: resources: limits: memory: 12g reservations: memory: 4g environment: - TZ=Asia/Ho_Chi_Minh - MYSQL_ROOT_PASSWORD=******* - MYSQL_PASSWORD=******* - MYSQL_USER=alfresco - MYSQL_DATABASE=alfresco # ports: # - "3306:3306" security_opt: - seccomp:unconfined volumes: - ./mysqldata:/var/lib/mysql - ./datasamples:/docker-entrypoint-initdb.d - ./my.cnf:/etc/mysql/my.cnf
Run "docker compose -f docker-compose-initdb.yml down" to stop mysql instance after it finished import alfresco.sql
Run "docker compose -f docker-compose.yml up -d" to start new Alfresco instance
version: "3" services: alfresco: image: docker.io/alfresco/alfresco-content-repository-community:7.1.0 container_name: alfresco restart: always deploy: resources: limits: memory: 8g reservations: memory: 4g 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=com.mysql.cj.jdbc.Driver -Ddb.username=alfresco -Ddb.password=******** -Ddb.url=jdbc:mysql://mysqlecm:3306/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -Dsolr.secureComms=none -Dsolr.sharedSecret=none -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6 -Dshare.host=127.0.0.1 -Dshare.port=8080 -Dalfresco.host=localhost -Dalfresco.port=8080 -Dcsrf.filter.enabled=false -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 TZ: Asia/Ho_Chi_Minh volumes: - ./mysql-connector-java-8.0.26.jar:/usr/local/tomcat/lib/mysql-connector-java-8.0.26.jar - ./tomcat/alfresco-global.properties:/usr/local/tomcat/shared/classes/alfresco-global.properties - ./tomcat/alf_data:/usr/local/tomcat/alf_data - ./tomcat/logs:/usr/local/tomcat/logs transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.5.3 container_name: transform-core-aio restart: always deploy: resources: limits: memory: 4g reservations: memory: 4g environment: TZ: Asia/Ho_Chi_Minh JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" ports: - "8090:8090" share: image: docker.io/alfresco/alfresco-share:7.1.0.1 container_name: share restart: always deploy: resources: limits: memory: 3g reservations: memory: 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 TZ: Asia/Ho_Chi_Minh mysqlecm: image: mysql:8.0.26 container_name: mysqlecm restart: always deploy: resources: limits: memory: 6g reservations: memory: 4g environment: - TZ=Asia/Ho_Chi_Minh # - MYSQL_ROOT_PASSWORD=********* # - MYSQL_PASSWORD=********* # - MYSQL_USER=alfresco # - MYSQL_DATABASE=alfresco ports: - "3306:3306" security_opt: - seccomp:unconfined volumes: - ./mysqldata:/var/lib/mysql - ./my.cnf:/etc/mysql/my.cnf - ./datasamples:/backup solr6: image: alfresco/alfresco-search-services:2.0.2 container_name: solr6 restart: always deploy: resources: limits: memory: 2g reservations: memory: 2g environment: TZ: Asia/Ho_Chi_Minh # 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" # HTTPS or SECRET ALFRESCO_SECURE_COMMS: "none" # SHARED SECRET VALUE JAVA_TOOL_OPTIONS: >- -Dalfresco.secureComms.secret=none ports: - "8083:8983" # Browser port volumes: - ./alfresco-search-services/data:/opt/alfresco-search-services/data - ./alfresco-search-services/shared.properties:/opt/alfresco-search-services/solrhome/conf/shared.properties activemq: image: alfresco/alfresco-activemq:5.16.1 container_name: activemq restart: always deploy: resources: limits: memory: 1g reservations: memory: 1g ports: - "8161:8161" # Web Console - "5672:5672" # AMQP - "61616:61616" # OpenWire - "61613:61613" # STOMP volumes: - ./activemq/data:/opt/activemq/data environment: TZ: Asia/Ho_Chi_Minh content-app: image: alfresco/alfresco-content-app:2.7.0 container_name: content-app restart: always deploy: resources: limits: memory: 128m reservations: memory: 128m environment: TZ: Asia/Ho_Chi_Minh APP_BASE_SHARE_URL: "http://localhost:8080/aca/#/preview/s" proxy: image: alfresco/alfresco-acs-nginx:3.4.2 container_name: proxy restart: always deploy: resources: limits: memory: 128m reservations: memory: 128m environment: TZ: Asia/Ho_Chi_Minh DISABLE_PROMETHEUS: "true" DISABLE_SYNCSERVICE: "true" DISABLE_ADW: "true" DISABLE_CONTROL_CENTER: "true" ENABLE_CONTENT_APP: "true" depends_on: - alfresco - content-app ports: - "80:80" links: - content-app - alfresco - share volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf
You can change memory limit you want to assign to each container.
You can change time zone of container by editing environment "TZ"
You can customize alfresco with ./tomcat/alfresco-global.properties or not
You can customize alfresco-search-services with ./alfresco-search-services/shared.properties or not
You can customize proxy with ./nginx/nginx.conf or not , for ex : port 80 instead of 8080
events { worker_connections 1024; } http { server { listen *:80; client_max_body_size 0; set $allowOriginSite *; proxy_pass_request_headers on; proxy_pass_header Set-Cookie; # External settings, do not remove #ENV_ACCESS_LOG proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Set-Cookie; # Protect access to SOLR APIs location ~ ^(/.*/service/api/solr/.*)$ {return 403;} location ~ ^(/.*/s/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcservice/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcs/api/solr/.*)$ {return 403;} location ~ ^(/.*/proxy/.*/api/solr/.*)$ {return 403 ;} location ~ ^(/.*/-default-/proxy/.*/api/.*)$ {return 403;} # Prometheus settings, do not remove #PROMETHEUS_LOCATION location / { proxy_pass http://alfresco:8080; } location /alfresco/ { proxy_pass http://alfresco:8080; # If using external proxy / load balancer (for initial redirect if no trailing slash) absolute_redirect off; } # Share settings, do not remove location /share/ { proxy_pass http://share:8080; absolute_redirect off; } # Control Center settings, do not remove #CONTROL_CENTER_LOCATION # ADW settings, do not remove #ADW_LOCATION # ACA settings, do not remove location /content-app/ { proxy_pass http://content-app:8080/; absolute_redirect off; } # Sync service settings, do not remove #SYNCSERVICE_LOCATION } }
If you don't want to customize any thing, just comment out specific lines at "volumes" part
You should wait for alfresco-search-services to index full your documents again. "http://your_server_ip:8083/solr/#/alfresco"
Some commands may help you:
- docker compose -f filename.yml up -d --> start containers
- docker compose -f filename.yml down --> stop containers
- docker ps -a --> view all containers status
- docker logs container_name --> view logs output of a container
Explore our Alfresco products with the links below. Use labels to filter content by product module.