I am running a Spring boot application that uses Spring data to connect to a remote instance of Couchbase on AWS.
My Couchbase configuration class looks like this:
@Value(value = "${couchbase-url}")
private String couchBaseUrl;
@Value("${couchbase-bucket}")
private String couchbaseBucketName;
@Value("${couchbase-password}")
private String couchbasePassword;
@Override
protected List<String> getBootstrapHosts() {
return Arrays.asList(couchBaseUrl);
}
@Override
protected String getBucketName() {
return couchbaseBucketName;
}
@Override
protected String getBucketPassword() {
return couchbasePassword;
}
where my param values look something like this:
couchbase-url=34.168.163.36:8091
couchbase-bucket=conversion-data
couchbase-password=secretpassword
When running this against a local instance, everything works as expected. When I run against the remote instance I get the following errors:
com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /10.0.10.140:8093
Where 10.0.10.140 is the private IP address. So the initial connection seems to be fine but after that it has my service redirecting to the private IP address.
Can anyone explain how I can get Couchbase to respond with the public IP address?