loftuxab / alfresco-ubuntu-install

Alfresco script based install for Ubuntu
https://loftux.com/products-and-add-ons/alfresco-utilities
166 stars 122 forks source link

not connecting with postgres - getting error "role/database alfresco_db does not exists" #133

Closed monicakumari closed 4 years ago

monicakumari commented 4 years ago

Hello. I am trying to implement this 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.(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.(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.

loftux commented 4 years ago

You have this in the error log (FATAL: role "alfresco_local" does not exist) Search internet what this means for your postgresql setup.

I recommend using https://hub.alfresco.com/ for posting support questions.

monicakumari commented 4 years ago

posted. https://hub.alfresco.com/t5/alfresco-content-services-forum/not-connecting-with-postgres-getting-error-amp-quot-role/m-p/295310#M17377

Thanks.