Failed to connect to ConfD: Connection refused

How does a subscriber connect to a CDB that running on a different host?i use the function cdb_connect to do that but it return -1 with “Failed to connect to ConfD: Connection refused”.

thanks!

Client libraries connect to ConfD using TCP. We tell ConfD which address to use for these connections through the /confdConfig/confdIpcAddress/ip (default value 127.0.0.1) and /confdConfig/confdIpcAddress/port (default value 4565) elements in confd.conf.
Additional IPs can be configured through the /confdConfig/confdIpcExtraListenIp element.

See ConfD UG chapter “Advanced Topics” --> “ConfD IPC”. It’s subchapter “Restricting access to the IPC port” might be relevant for you too.