K8s的POD连接数据库时报错

[root@cccc xxxx]# ./showlog.sh dr
iff-dr-1128668949-lb90g
2017-09-29 03:21:57,575 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                  Logging - STABLE          org.wildfly.swarm:logging:2017.8.1
2017-09-29 03:21:57,612 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                 Logstash - STABLE          org.wildfly.swarm:logstash:2017.8.1
2017-09-29 03:21:57,612 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:          Bean Validation - STABLE          org.wildfly.swarm:bean-validation:2017.8.1
2017-09-29 03:21:57,612 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:        CDI Configuration - STABLE          org.wildfly.swarm:cdi-config:2017.8.1
2017-09-29 03:21:57,612 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:             Transactions - STABLE          org.wildfly.swarm:transactions:2017.8.1
2017-09-29 03:21:57,613 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      CDI - STABLE          org.wildfly.swarm:cdi:2017.8.1
2017-09-29 03:21:57,613 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                   JAX-RS - STABLE          org.wildfly.swarm:jaxrs:2017.8.1
2017-09-29 03:21:57,614 WARN  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction: CDI JAX-RS API Enhancements - EXPERIMENTAL    org.wildfly.swarm:cdi-jaxrsapi:2017.8.1
2017-09-29 03:21:57,615 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:      Hibernate Validator - STABLE          org.wildfly.swarm:hibernate-validator:2017.8.1
2017-09-29 03:21:57,615 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:   JAX-RS with Validation - STABLE          org.wildfly.swarm:jaxrs-validator:2017.8.1
2017-09-29 03:21:57,615 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      JCA - STABLE          org.wildfly.swarm:jca:2017.8.1
2017-09-29 03:21:57,615 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:              Datasources - STABLE          org.wildfly.swarm:datasources:2017.8.1
2017-09-29 03:21:57,615 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      JPA - STABLE          org.wildfly.swarm:jpa:2017.8.1
2017-09-29 03:21:57,616 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      EJB - STABLE          org.wildfly.swarm:ejb:2017.8.1
2017-09-29 03:21:57,616 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                 Undertow - STABLE          org.wildfly.swarm:undertow:2017.8.1
2017-09-29 03:21:57,616 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                 Keycloak - STABLE          org.wildfly.swarm:keycloak:2017.8.1
2017-09-29 03:22:01,000 INFO  [org.wildfly.swarm.datasources] (main) WFSWARM1003: Auto-detected JDBC driver for h2
2017-09-29 03:22:01,060 INFO  [org.wildfly.swarm.datasources] (main) WFSWARM1003: Auto-detected JDBC driver for mysql
2017-09-29 03:22:01,065 INFO  [org.wildfly.swarm.datasources] (main) WFSWARM1003: Auto-detected JDBC driver for postgresql
2017-09-29 03:22:02,411 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
2017-09-29 03:22:02,595 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Swarm 2017.8.1 (WildFly Core 2.2.1.Final) starting
2017-09-29 03:22:02,694 INFO  [org.wildfly.swarm] (MSC service thread 1-8) WFSWARM0019: Install MSC service for command line args: []
2017-09-29 03:22:03,979 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 20) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
2017-09-29 03:22:03,995 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 21) WFLYSEC0002: Activating Security Subsystem
2017-09-29 03:22:04,001 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 26) WFLYNAM0001: Activating Naming Subsystem
2017-09-29 03:22:04,031 INFO  [org.jboss.as.naming] (MSC service thread 1-7) WFLYNAM0003: Starting Naming Service
2017-09-29 03:22:04,065 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0003: Undertow 1.4.11.Final starting
2017-09-29 03:22:04,067 INFO  [org.jboss.as.security] (MSC service thread 1-6) WFLYSEC0001: Current PicketBox version=4.9.6.Final
2017-09-29 03:22:04,071 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 25) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
2017-09-29 03:22:04,116 INFO  [org.jboss.as.connector] (MSC service thread 1-1) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final)
2017-09-29 03:22:04,127 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 19) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
2017-09-29 03:22:04,157 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0018: Started Driver service with driver-name = com.mysql
2017-09-29 03:22:04,177 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 19) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
2017-09-29 03:22:04,188 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 19) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
2017-09-29 03:22:04,193 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = h2
2017-09-29 03:22:04,204 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = mysql
2017-09-29 03:22:04,219 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 19) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4)
2017-09-29 03:22:04,222 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0018: Started Driver service with driver-name = postgresql
2017-09-29 03:22:04,234 INFO  [org.xnio] (MSC service thread 1-8) XNIO version 3.4.3.Final
2017-09-29 03:22:04,266 INFO  [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.4.3.Final
2017-09-29 03:22:04,378 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0012: Started server default-server.
2017-09-29 03:22:04,539 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
2017-09-29 03:22:04,709 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
2017-09-29 03:22:04,831 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Swarm 2017.8.1 (WildFly Core 2.2.1.Final) started in 2556ms - Started 144 of 157 services (28 services are lazy, passive or on-demand)
2017-09-29 03:22:07,494 INFO  [org.wildfly.swarm.runtime.deployer] (main) deploying delayreq.war
2017-09-29 03:22:07,527 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "delayreq.war" (runtime-name: "delayreq.war")
2017-09-29 03:22:09,708 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) WFLYJPA0002: Read persistence.xml for DrPU
2017-09-29 03:22:10,244 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.delayreq.war" is using a private module ("org.jboss.ironjacamar.jdbcadapters:main") which may be changed or removed in future versions without notice.
2017-09-29 03:22:10,245 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.delayreq.war" is using a private module ("org.jboss.jts:main") which may be changed or removed in future versions without notice.
2017-09-29 03:22:10,356 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 6) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'delayreq.war#DrPU'
2017-09-29 03:22:10,400 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 6) HHH000204: Processing PersistenceUnitInfo [
        name: DrPU
        ...]
2017-09-29 03:22:10,402 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment delayreq.war
2017-09-29 03:22:10,494 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.4.Final
2017-09-29 03:22:10,497 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 6) HHH000412: Hibernate Core {5.0.10.Final}
2017-09-29 03:22:10,498 INFO  [org.hibernate.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Kubernetes中,如果连接到PostgreSQL数据库的Kong服务超,可能有几个原因。首先,确保Kong服务的配置正确。根据引用\[1\]中的命令,您需要确保Kong服务正确配置了外部的PostgreSQL数据库。检查以下配置项是否正确设置:postgresql.external.host、postgresql.external.password和postgresql.external.user。确保这些配置与您的实际数据库设置相匹配。 其次,检查Kong服务是否能够访问到PostgreSQL数据库。确保Kong服务和PostgreSQL数据库在同一个网络中,并且网络连接是正常的。您可以尝试在Kong服务所在的节点上使用telnet命令测试与PostgreSQL数据库的连接。 另外,还需要确保PostgreSQL数据库已正确安装和配置。根据引用\[2\]中的命令,您需要确保PostgreSQL数据库已正确映射数据目录,并且数据库的用户名和密码已正确创建。您可以使用psql命令检查数据库是否已正确创建。 最后,如果您在Kong服务启动后仍然遇到连接超的问题,可以尝试运行Kong migrations up命令来更新/初始化数据库模式。根据引用\[3\]中的错误信息,Kong可能需要更新数据库模式以与当前版本匹配。请注意,运行Kong migrations up命令应该只在单个节点上运行,并且并发运行可能会导致冲突和数据库模式损坏。 综上所述,如果在Kubernetes中连接到PostgreSQL数据库的Kong服务超,请确保Kong服务的配置正确,Kong服务能够访问到PostgreSQL数据库,并且PostgreSQL数据库已正确安装和配置。如果问题仍然存在,可以尝试运行Kong migrations up命令来更新/初始化数据库模式。 #### 引用[.reference_title] - *1* *2* [k8s上使用Helm安装kong2.0.4(对应Chart Versions1.1.7)](https://blog.csdn.net/math_code/article/details/106536814)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Kubernetes(K8s)](https://blog.csdn.net/weixin_40618648/article/details/96634689)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值