docker 连接到localhost:5488被拒绝,请检查主机名和端口是否正确,以及邮局主管是否接受TCP/IP连接

gmxoilav  于 2022-11-28  发布在  Docker
关注(0)|答案(1)|浏览(352)

我正尝试按照说明在docker上运行这个github repo
Aidbox with Timescale DB
但是,当运行conatiner时,其中一个抛出此错误消息

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
WARNING: read already refers to: #'clojure.core/read in namespace: aidbox.sdk.crud, being replaced by: #'aidbox.sdk.crud/read
WARNING: update already refers to: #'clojure.core/update in namespace: aidbox.sdk.crud, being replaced by: #'aidbox.sdk.crud/update
Exception in thread "main" com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Connection to localhost:5488 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
        at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:597)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
        at app.db$create_pool.invokeStatic(db.clj:45)
        at app.db$create_pool.invoke(db.clj:42)
        at app.db$datasource.invokeStatic(db.clj:70)
        at app.db$datasource.invoke(db.clj:61)
        at app.core$mk_connection.invokeStatic(core.clj:234)
        at app.core$mk_connection.invoke(core.clj:231)
        at app.core$_main.invokeStatic(core.clj:241)
        at app.core$_main.invoke(core.clj:240)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at app.core.main(Unknown Source)
Caused by: org.postgresql.util.PSQLException: Connection to localhost:5488 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
        at org.postgresql.Driver$ConnectThread.getResult(Driver.java:409)
        at org.postgresql.Driver.connect(Driver.java:267)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:98)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:83)
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
        ... 13 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:607)
        at org.postgresql.core.PGStream.<init>(PGStream.java:75)
        at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91)
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:211)
        at org.postgresql.Driver.makeConnection(Driver.java:458)
        at org.postgresql.Driver.access$100(Driver.java:57)
        at org.postgresql.Driver$ConnectThread.run(Driver.java:368)
        at java.lang.Thread.run(Thread.java:748)

我试过将数据库的端口从5432更改为5488,但还是出现了同样的错误。我也看过其他关于堆栈溢出的帖子,但都没有成功。
我也试图与该公司,使这个项目,但可以理解,因为这是一个开源项目,他们从中没有赚钱,这不是在他们的优先事项,以解决这个问题。
所以希望在这个网站上漫游的一个聪明的头脑能帮助我。如果你想要更多关于Bringing data from wearables and medical IoT devices to FHIR solutions回购协议的信息

rkttyhzu

rkttyhzu1#

我看到容器名称(_N):因此,如果您尝试从同一网络中另一个容器进行连接,主机将为timescaledb,默认端口为5432

相关问题