PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

a.gheshlaghy_177282 avatar image
a.gheshlaghy_177282 asked ·

Is it possible for the Java driver to pick the private address of a node?

Hi,

i was testing multiple NIC for public and private address in test environment, and configure my nodes according to https://docs.datastax.com/en/dse/6.8/dse-admin/datastax_enterprise/config/configMultiNetworks.html guides.
i had question about below java-driver:

https://docs.datastax.com/en/developer/java-driver-dse/1.6/manual/address_resolution/

could client get private address (which is set for listen_address)?
what happens if they get private address instead of public address since they may not have route to dse private NIC.

dsejava driver
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

No, it isn't possible for the Java driver to pick the private IP address unless (a) you've explicitly configured rpc_address to use the private IP (native_transport_address in DSE 6.x), or (b) you did not set rpc_address. You should set the RPC address to an IP which is routable from the application servers and is usually the public IP address.

The Java driver will connect to the broadcast RPC address (broadcast_rpc_address or native_transport_broadcast_address in DSE 6.x) which defaults to rpc_address (native_transport_address in DSE 6.x). This is the public interface where the CQL client port (default is 9042) is bound to.

NOTE: The rpc_* properties in cassandra.yaml were deprecated and renamed to native_transport_* in DSE 6.0 (DB-1130). Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.