我想使用MariadB作为外部DB将KeyCloak(V 15.0.2)部署在域模式下。
想象一下我的DB在10.0.0.1上。我还通过修改domain.xml中的“ keyCloakds”数据源和驱动程序来在10.0.0.1上部署主机。
我还想通过修改domain.xml和 host-slave.xml
作为提到的KeyCloak的文档( link )。 的domain.xml中的“ keycloakds”进行了以下更改
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS">
<connection-url>jdbc:mariadb://10.0.0.1:3306/keycloak</connection-url>
<driver>mariadb</driver>
<security>
<user-name>myuser</user-name>
<password>mypassword</password>
</security>
</datasource>
我在3306上从10.0.0.2到10.0.0.1
。更改上述更改后,我想在10.0.0.2上部署从站,但请继续面对以下错误:
Caused by: java.sql.SQLNonTransientConnectionException:
Socket fail to connect to host:address=(host=localhost)(port=3306)(type=primary). Connection refused: connect
另请注意,SceneIO通过在 sentalone-Ha.xml中进行相同的更改来适合独立HA模式。 /代码>。
我遵循此链接:
有人建议如何解决这个问题吗?
I wanted to deploy Keycloak (v 15.0.2) on the domain mode using MariaDB as an external DB.
Imagine my DB is on 10.0.0.1. I deploy my master on 10.0.0.1 as well by modifying the "KeycloakDS" datasource and the drivers in domain.xml.
I also wanted to deploy a slave on 10.0.0.2 by modifying the domain.xml and the host-slave.xml
as the documentation of the Keycloak mentioned (link). I made the below changes on "KeycloakDS" in domain.xml:
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS">
<connection-url>jdbc:mariadb://10.0.0.1:3306/keycloak</connection-url>
<driver>mariadb</driver>
<security>
<user-name>myuser</user-name>
<password>mypassword</password>
</security>
</datasource>
Note telnet on 3306 from 10.0.0.2 to 10.0.0.1 is Ok.
After the above changes, I wanted to deploy the slave on 10.0.0.2 but keep facing the error below:
Caused by: java.sql.SQLNonTransientConnectionException:
Socket fail to connect to host:address=(host=localhost)(port=3306)(type=primary). Connection refused: connect
Also note that the sceneio works properly for the standalone-ha mode by making the same changes in standalone-ha.xml
.
I followed this link: Installing and Configuring Keycloak - Domain Clustered Deployment
Does anyone have any suggestion that how can I solve this problem?
发布评论
评论(1)
更改数据源
尝试在
&lt;子系统xmlns =“ urn:jboss:domain:dataSources:6.0”&gt;
中。当我查看文件时,我发现该子系统的两次出现。
Try changing the datasource on both
<subsystem xmlns="urn:jboss:domain:datasources:6.0">
in/domain.xml
file.when I was reviewing the file i found there two occurrences of that subsystem.