01-10-2020 04:12 AM
Hello.
I am trying to implement https://github.com/loftuxab/alfresco-ubuntu-install on my ubuntu system and It seems quite simple but its not connecting with postgres so repository not starting up.
I have updated postgreql.sh script and replaced values for ALFRESCODB=alfresco and ALFRESCOUSER=alfresco with ALFRESCODB=alfresco_db and ALFRESCOUSER=alfresco_db and ran this script (asked me for the password and I have entered "admin" for the same) and because of this, the database with "alfresco_db" name created automatically with the password "admin".
then I have updated alfresco-global.properties file for the same.
I have replaced db.username=alfresco , db.password=alfresco and db.name=alfresco
with db.username=alfresco_db , db.password=admin and db.name=alfresco_db
and started alfresco service but getting exception in initializing repository and getting below errors in the end
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: role "alfresco_db" does not exist) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) at org.alfresco.repo.domain.dialect.DialectFactoryBean.getObject(DialectFactoryBean.java:59) at org.alfresco.repo.domain.dialect.DialectFactoryBean.getObject(DialectFactoryBean.java:1) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171) ... 116 more Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: role "alfresco_db" does not exist) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78) ... 119 more Caused by: org.postgresql.util.PSQLException: FATAL: role "alfresco_db" does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2559) at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:133) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:250) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) at org.postgresql.Driver.makeConnection(Driver.java:454) at org.postgresql.Driver.connect(Driver.java:256) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 124 more
Seems like its not connecting with the database. Please guide what else I can try or Is there anything I am doing wrong.
Thanks.
01-10-2020 04:49 AM
It seems that your Postgres user is not created by the script.
Did you set the "createdb" variable to "y"?
https://github.com/loftuxab/alfresco-ubuntu-install/blob/master/scripts/postgresql.sh#L41
01-10-2020 04:49 AM
It seems that your Postgres user is not created by the script.
Did you set the "createdb" variable to "y"?
https://github.com/loftuxab/alfresco-ubuntu-install/blob/master/scripts/postgresql.sh#L41
01-13-2020 01:37 AM
yes.. Thanks alot. It was a version issue. I have installed postgres manually and tried to connect. I have uninstalled it and tried via script and it worked.
01-13-2020 02:22 AM
Hello. It was resolved but still I am getting an issue. I am not able to login because repository is not starting up. There is no exception on console.
while hitting share link :
and with alfresco link :
I have found nothing (errors or exceptions ) on console logs (catalina.out) but noticed that the line says connected to the databse is missing in logs catalina.out .I think its not connecting with database. Please guide.
Thank you.
01-15-2020 05:49 AM
Hi @monicakumari,
It might be better if you raise this subsequent issue as a new post - with a reference to the original post if required - because people see the Solved icon & assume everything is ok.
Kind regards,
Explore our Alfresco products with the links below. Use labels to filter content by product module.