WildFly Postgres DataSource remote connection-url ignored

两盒软妹~` 提交于 2019-12-06 05:32:41

I managed to figure this out for my case. The JDBC driver for postgres was configured to use a PGPoolingDataSource and had a datasource-class defined.

<driver name="postgresql" module="org.postgresql">
    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
    <datasource-class>org.postgresql.ds.PGPoolingDataSource</datasource-class>
</driver>

When the datasource-class is defined, the connection url must be passed through a connection-property instead of connection-url. I updated my configuration and the server booted up fine.

<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
    <connection-url>jdbc:postgresql://{REMOTE_IP}:5432/keycloak</connection-url>
    <connection-property name="url">jdbc:postgresql://{REMOTE_IP}:5432/keycloak</connection-property>
    <driver>postgresql</driver>
    <pool>
        <max-pool-size>20</max-pool-size>
    </pool>
    <driver-class>org.postgresql.Driver</driver-class>
    <security>
        <user-name>keycloak</user-name>
        <password>{PASSWORD}</password>
    </security>
</datasource>

This issue is noted in the wildfly issue tracker https://issues.jboss.org/browse/WFLY-6157

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!