如何配置PostgreSQL数据库在tomcat 8上部署alfresco?

时间:2017-07-31 14:03:06

标签: postgresql tomcat alfresco

我在ubuntu 16.04上从源代码构建了alfresco(版本5.2)。我想在tomcat 8上部署alfresco。部署成功但是PostgreSQL数据库没有按要求配置。我按照http://docs.alfresco.com/5.1/tasks/postgresql-config.html

中给出的步骤进行了操作

我将主页视为given in image alfresco_page

我错过了PostgreSQL数据库未配置的内容。是否有其他需要完成的配置我错过了?

更新

alfresco.log给了我这个

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 个答案:

答案 0 :(得分:0)

要检查的事项:

  1. postgres正在运行(ps -ef | grep postgres)?
  2. 您可以使用psf连接到postgres,使用在alfresco-global.properties中配置的db.name,db.username和db.password吗?
  3. 您是否按照有关编辑pg_hba.conf的文档中的步骤来确保将postgres配置为允许基于密码的身份验证?
  4. 此外,除非您自己更改低级别类,否则很难从源代码构建Alfresco,这是不推荐的。