内部异常:org.postgresql.util.PSQLException:与本地主机的连接:8461被拒绝

时间:2019-06-27 02:36:12

标签: postgresql

在启动Spring Boot应用程序时,出现以下错误org.postgresql.util.PSQLException SQL异常状态:08001。请参见下面的完整日志

我尝试使用systemctl restart postgresql-9.6重新启动postgres服务器,然后应用程序正常运行,但是我无法弄清楚为什么它首先出现。

2019-06-26 12:03:24 IST +0530 INFO  com.entrust.cm.utils.ApplicationConfig:110 - sslfactory : org.postgresql.ssl.NonValidatingFactory
2019-06-26 12:03:24 IST +0530 ERROR com.entrust.cm.utils.ApplicationConfig:176 - Error while creating Database: Connection to localhost:8461 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
2019-06-26 12:03:24 IST +0530 ERROR com.entrust.cm.utils.ApplicationConfig:211 - Error while creating Schema : {}; Code : {} Connection to localhost:8461 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. : SQL Exception State : 08001
2019-06-26 12:03:24 IST +0530 WARN  com.entrust.cm.utils.ApplicationConfig:79 - Search base already set
2019-06-26 12:03:25 IST +0530 INFO  org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean:415 - Initialized JPA EntityManagerFactory for persistence unit 'entityManagerFactory'
2019-06-26 12:03:25 IST +0530 INFO  org.hibernate.validator.internal.util.Version:21 - HV000001: Hibernate Validator 6.0.3.Final
2019-06-26 12:03:26 IST +0530 WARN  org.springframework.web.context.support.XmlWebApplicationContext:554 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'enrollmentFilerDaoImpl': Unsatisfied dependency expressed through field 'componentManagementDaoImpl'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'componentManagementDaoImpl' defined in com.entrust.cm.utils.ApplicationConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.entrust.cm.dao.ComponentManagementDaoImpl]: Factory method 'componentManagementDaoImpl' threw exception; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: Connection to localhost:8461 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Error Code: 0
2019-06-26 12:03:26 IST +0530 ERROR org.springframework.web.servlet.DispatcherServlet:533 - Context initialization failed

我无法对此错误进行根本原因分析。

0 个答案:

没有答案