Strange traces in Alfresco Repository CE... I can't understand what's going on...

cancel
Showing results for 
Search instead for 
Did you mean: 
fabrice7
Partner

Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

Hello,

I am building my own Docker image based on:

https://hub.docker.com/r/alfresco/alfresco-content-repository-community

The tag I am using is "latest", which is Alfresco Repository CE 6.3.0.

My container is running in ECS. The JAVA_OPTS look like this:

                -Ddb.driver=org.mariadb.jdbc.Driver
                -Dindex.subsystem.name=noindex
                -Dalfresco.host=acs-repository.${Project}.lan
                -Dalfresco.port=443
                -Dalfresco.protocol=https
                -Daos.baseUrlOverwrite=https://acs-repository.${Project}.lan:443/alfresco/aos
                -Dmessaging.broker.connections.max=8
                -Dmessaging.broker.url="failover:(${Amazonmq.Outputs.OpenwireEndpoints})"
                -Dcsrf.filter.enabled=false
                -Djodconverter.enabled=false
                -Djodconverter.officeHome=null
                -Xms3500m
                -Xmx3500m
                -Dlocal.transform.service.enabled=false
                -Dtransform.service.enabled=false
                -Dlegacy.transform.service.enabled=false
                -DsyncService.mode=OFF
                -Dsync.mode=OFF
                -Dsync.pullJob.enabled=false
                -Dsync.pushJob.enabled=false
                -Dsystem.usages.enabled=false
                -Dsystem.usages.clearBatchSize=0
                -Dactivities.feed.notifier.enabled=false
                -Dactivities.feed.cleaner.enabled=false
                -Dactivities.post.cleaner.enabled=false
                -Dactivities.feed.generator.enabled=false
                -Dactivities.post.lookup.enabled=false
                -Dreplication.enabled=false
                -Dtransferservice.receiver.enabled=false
                -Dsystem.thumbnail.generate=false

Log line that seem to indicate a problem (can't paste everything because of lack of space):

2020-08-20 14:59:40,155  WARN  [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.CustomEditorConfigurer#0' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'customPropertyEditorRegistrar' while setting bean property 'propertyEditorRegistrars' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customPropertyEditorRegistrar' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'NamespaceService' while setting bean property 'namespaceService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryDAO' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantService' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-8.83.jar!/alfresco/mt/mt-context.xml]: Cannot resolve reference to bean 'tenantAdminDAO' while setting bean property 'tenantAdminDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'repoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionTemplate' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'repoSqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionFactory' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'dialectResourceLoader' while setting bean property 'resourceLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectResourceLoader' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot create inner bean 'org.springframework.beans.factory.config.PropertyPathFactoryBean#70482cfe' of type [org.springframework.beans.factory.config.PropertyPathFactoryBean] while setting bean property 'dialectClass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPathFactoryBean#70482cfe' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect': FactoryBean threw exception on object creation; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not connect to amjs1n0th4q14z.csxr954ib66u.us-west-1.rds.amazonaws.com:3306 : PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)

 

1 Solution

Accepted Solutions
kaynezhang
Advanced

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

You need to tell your jdbc url where to find cert file ,for example

url="jdbc:mysql://${db.host}:${db..port}/${db.database}?password=${db.password}&user=${db.user}&useSSL=true&requireSSL=true&trustCertificateKeyStoreUrl=file://${trustStorePath}&trustCertificateKeyStorePassword=${trustStorePassword}&clientCertificateKeyStoreUrl=file://${keyStorePath}&clientCertificateKeyStorePassword=${keyStorePassword}"

Please refer to https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html

View solution in original post

5 Replies
kaynezhang
Advanced

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

 

FactoryBean threw exception on object creation; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not connect to amjs1n0th4q14z.csxr954ib66u.us-west-1.rds.amazonaws.com:3306 : PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)

It seems you have enabled jdbc connection to the database using ssl, but you didn't configure the certificate correctly

 

fabrice7
Partner

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

Thanks @kaynezhang ,

Yes, somebody else told me I need to add the DB certificate to the trust store.

So I am using the RDS root certificate, available at:

https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem

And followed these instructions to install the certificate.

However, I still have exactly the same problem...

Any idea?

Thanks a lot for any help!

kaynezhang
Advanced

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

You need to tell your jdbc url where to find cert file ,for example

url="jdbc:mysql://${db.host}:${db..port}/${db.database}?password=${db.password}&user=${db.user}&useSSL=true&requireSSL=true&trustCertificateKeyStoreUrl=file://${trustStorePath}&trustCertificateKeyStorePassword=${trustStorePassword}&clientCertificateKeyStoreUrl=file://${keyStorePath}&clientCertificateKeyStorePassword=${keyStorePassword}"

Please refer to https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html

fabrice7
Partner

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

Hi @kaynezhang ,

I think the bug is now fixed. I had to add some parameters to the connection string just like you suggested. We didn't use exactly the same parameters because our setup is different, but in the end it's working.

Thanks a lot for the pointers!

EddieMay
Alfresco Employee

Re: Strange traces in Alfresco Repository CE... I can't understand what's going on...

Jump to solution

Hi @fabrice7 

I've accepted the solution by @kaynezhang - this helps other users to know what worked. Hope that's OK.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!