Hi Cihan,
I found the solution. I was connecting to the servers using the public DNS, but the servers were named using the private IP. This caused issues when using N1QL.
Since I am using AWS, I created an internal hosted zone, and assigned a domain name to each server which I use in my connection strings.
It is a cluster deployment.
Thanks,
Robert