How to configure PostgreSQL database for deploying

2019-08-26 06:23发布

I have built alfresco(version 5.2) from source on ubuntu 16.04. I want to deploy alfresco on tomcat 8. The deployment is successful however the PostgreSQL database is not getting configured as required. I have followed the steps as given in http://docs.alfresco.com/5.1/tasks/postgresql-config.html

I observe the home page as given in image alfresco_page

Am I missing onto something here that the PostgreSQL database is not getting configured. Is there any other configuration that needs to be done that I have missed ?

UPDATE

The alfresco.log gave me this

2017-08-01 05:53:54,406 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] clientAuth does not appear to be set for Tomcat. clientAuth must be set to 'want' for X509 Authentication
2017-08-01 05:53:54,416 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Attempting to set clientAuth=want through JMX...
2017-08-01 05:53:54,427 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Unable to set clientAuth=want through JMX.
2017-08-01 05:53:55,139 ERROR [org.apache.solr.core.CoreContainer] [coreLoadExecutor-5-thread-1] Error creating core [collection1]: Could not load conf for core collection1: Error loading solr config from solr/collection1/conf/solrconfig.xml
org.apache.solr.common.SolrException: Could not load conf for core collection1: Error loading solr config from solr/collection1/conf/solrconfig.xml
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:489)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.common.SolrException: Error loading solr config from solr/collection1/conf/solrconfig.xml
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:154)
        at org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:80)
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:61)
        ... 7 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or '/root/tomcat85/output/build/webapps/solr/collection1/conf'
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:362)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:308)
        at org.apache.solr.core.Config.<init>(Config.java:117)
        at org.apache.solr.core.Config.<init>(Config.java:87)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:167)
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:145)
        ... 9 more
2017-08-01 05:54:09,634 WARN  [org.hibernate.cfg.SettingsFactory] [localhost-startStop-1] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
        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.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2079)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1304)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:863)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:782)
        at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)

1条回答
走好不送
2楼-- · 2019-08-26 07:03

Things to check:

  1. Is postgres running (ps -ef|grep postgres)?
  2. Can you use psql to connect to postgres using the db.name, db.username, and db.password that are configured in alfresco-global.properties?
  3. Did you follow the step in the docs about editing pg_hba.conf to make sure that postgres is configured to allow password based authentication?

Also, it is exceedingly rare to need to build Alfresco from source unless you are making changes to the low-level classes themselves, which is not recommended.

查看更多
登录 后发表回答