Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alfresco db issue #202

Open
SanjayBandhniya opened this issue Jul 30, 2024 · 11 comments
Open

Alfresco db issue #202

SanjayBandhniya opened this issue Jul 30, 2024 · 11 comments

Comments

@SanjayBandhniya
Copy link

I am using docker alfresco installer for ubuntu.
I have created volume using *.sh script still I am getting below error.

alfresco-1 | Caused by: 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-21.14.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#3da7610a' 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#3da7610a' 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 java.sql.SQLException: Cannot create PoolableConnectionFactory (The connection attempt failed.)
alfresco-1 | at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) ~[spring-beans-5.3.27.jar:5.3.27]

Any idea what could be the issue?

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

Verify if the database (postgres service) is up & ready. Spoiler: it's not.

@SanjayBandhniya
Copy link
Author

SanjayBandhniya commented Jul 30, 2024

DB Service is already up.
Database with name "alfresco" also getting created without table.
Do you think db getting shutting down?

Below is status after starting alfresco.
image

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

Try with the following sequence:

docker compose up postgres
docker compose up

So you provide some time to postgres to start properly.

@SanjayBandhniya
Copy link
Author

Try with the following sequence:

docker compose up postgres
docker compose up

So you provide some time to postgres to start properly.

Tried same but no luck.

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

You may try starting only postgres service and verify it works as expected, using some tool like psql to verify database and user alfresco is running.

@SanjayBandhniya
Copy link
Author

SanjayBandhniya commented Jul 30, 2024

You may try starting only postgres service and verify it works as expected, using some tool like psql to verify database and user alfresco is running.

Yes. Its working. I am able to inspect container and also able to check alfresco db also created.
image

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

May you add your docker-compose.yml content to this issue?

@SanjayBandhniya
Copy link
Author

May you add your docker-compose.yml content to this issue?

I am using same docker file in another machine where it is working fine.
From working machine I copied entire setup with db and data to new machine but still facing same error.

docker-compose.txt

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

The error seems to be that repository is not able to connect to postgres. Are there additional errors in the log?

@SanjayBandhniya
Copy link
Author

The error seems to be that repository is not able to connect to postgres. Are there additional errors in the log?

error.txt
This is entire error log.

@aborroy
Copy link
Contributor

aborroy commented Jul 30, 2024

Caused by: java.net.SocketTimeoutException: Connect timed out

Repository is not connecting to postgres:5432. You may try checking connectivity from inside repository container to identify to cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants