一、问题
最近在写自定义规则节点,因为还没编译好thingsboard源代码,用的是docker搭建起来的环境。写好的规则节点后,要打包好扔到docker里,再重启docker。发现经常重启失败,报错的日志也都是这样:
2022-03-05 08:53:23,164 [main] ERROR com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:303)
...
2022-03-05 08:53:25,187 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springfra

本文探讨了在使用Docker运行自定义Thingsboard规则节点时,频繁重启失败的问题,原因在于PostgreSQL数据库未在容器停止时正确关闭。通过分析,提供了安全关闭数据库的方法,包括手动停止、强制杀死进程等,以确保容器重启时的顺利运行。
1239

被折叠的 条评论
为什么被折叠?



