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

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

Closed
monicakumari opened this issue Jan 10, 2020 · 2 comments

Comments

@monicakumari
Copy link

monicakumari commented Jan 10, 2020

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
Copy link
Contributor

loftux commented Jan 10, 2020

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.

@loftux loftux closed this as completed Jan 10, 2020
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