2. specify the firstEp and the secondEp in the configuration file taos.cfg
2. specify the firstEp and the secondEp in the configuration file taos.cfg
```shell
```shell
# first fully qualified domain name (FQDN) for TDengine system
# first fully qualified domain name (FQDN) for TDengine system
firstEp cluster_node1:6030
firstEp cluster_node1:6030
# second fully qualified domain name (FQDN) for TDengine system, for cluster only
# second fully qualified domain name (FQDN) for TDengine system, for cluster only
secondEp cluster_node2:6030
secondEp cluster_node2:6030
# default system charset
# default system charset
# charset UTF-8
# charset UTF-8
# system locale
# system locale
# locale en_US.UTF-8
# locale en_US.UTF-8
```
```
In the above example, JDBC uses the client's configuration file to establish a connection to a hostname `cluster_node1`, port 6030, and a database named `test`. When the firstEp node in the cluster fails, JDBC attempts to connect to the cluster using secondEp.
In the above example, JDBC uses the client's configuration file to establish a connection to a hostname `cluster_node1`, port 6030, and a database named `test`. When the firstEp node in the cluster fails, JDBC attempts to connect to the cluster using secondEp.