简体   繁体   English

PostgreSQL - 与本地主机的连接:“****”拒绝错误

[英]PostgreSQL - Connection to localhost:"****" refused error

I am creating a project using Spring Boot in IntelliJ Idea.我正在 IntelliJ Idea 中使用 Spring Boot 创建一个项目。 I want to use PostgreSQL as a database for my project.我想使用 PostgreSQL 作为我项目的数据库。 But I get an error that"Connection refused check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections"但是我收到一条错误消息“连接被拒绝,请检查主机名和端口是否正确以及邮局管理员是否接受 TCP/IP 连接”

  1. For postgreSQL integration into my project, I updated my " application.properties " file as shown below:为了将 postgreSQL 集成到我的项目中,我更新了我的“ application.properties ”文件,如下所示:

应用程序属性

  1. Then I created a file named data.sql and created my issue table in it:然后我创建了一个名为data.sql的文件并在其中创建了我的问题表:

数据.sql

3. My database properties: 3.我的数据库属性:

数据源和驱动程序

4. My postgresql.conf file: 4. 我的 postgresql.conf 文件:

postgresql.cong

5. My hba.conf file: 5. 我的 hba.conf 文件:

pg_hba.conf

6. The error that I get: 6. 我得到的错误:

错误

Can you please help me to fix this issue ?你能帮我解决这个问题吗?

Did you restart PostgreSQL after changing the port number?更改端口号后是否重新启动了PostgreSQL? If not, you'll need to do that.如果没有,你需要这样做。

If you've restarted PostgreSQL and the connection is still rejected, it may not have been able to bind to the port in question.如果您已重新启动 PostgreSQL 并且连接仍被拒绝,则它可能无法绑定到相关端口。 Check the PostgreSQL log file for clues.检查 PostgreSQL 日志文件以获取线索。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PostgreSQL:无法连接到服务器 - 连接被拒绝错误 - PostgreSQL: could not connect to server - Connection refused error 与postgresql在centOS中拒绝连接 - connection refused in centOS with postgresql 连接拒绝PostgreSQL服务器 - Connection refused to PostgreSQL server PHP 数据库连接错误:连接被拒绝。 本地主机工作正常,但发生真正的服务器错误 - PHP Database connection error: Connection refused . Localhost works fine but real server error occurred Java Web 项目 + JPA/JDBC“连接到端口 1527 上的服务器本地主机时出错,消息连接被拒绝” - Java web project + JPA/JDBC “Error connecting to server localhost on port 1527 with message Connection refused” PostgreSQL 添加新节点后的 Citus Shard Rebalancing -> 连接到远程节点 localhost:5432 失败并出现以下错误 - PostgreSQL Citus Shard Rebalancing after adding new node -> connection to the remote node localhost:5432 failed with the following error org.apache.http.conn.HttpHostConnectException:拒绝连接到http:// localhost - org.apache.http.conn.HttpHostConnectException: Connection to http://localhost refused PostgreSQL的连接被拒绝,无法从活动状态重新启动(已退出) - Connection refused for PostgreSQL, cannot restart from status active(exited) TALEND:网络错误IOException:连接被拒绝:connect - TALEND: Network error IOException: Connection refused: connect junit + spring-侦听器拒绝连接,并出现以下错误 - junit + spring - Listener refused the connection with the following error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM