I am not able to connect to 8092 with is mapped to ‘51002’ in Virtual Machine.
[WARN] [null][ViewEndpoint]: Could not connect to endpoint, retrying with delay 32 MILLISECONDS:
java.net.ConnectException: Connection timed out: no further information: dev-couchbase-1.cloudapp.net/22.214.171.124:8092
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_71]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_71]
at com.couchbase.client.deps.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) [core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [core-io-1.1.4.jar:1.1.4]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [core-io-1.1.4.jar:1.1.4]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
[DEBUG] Received signal for outdated configuration.
[DEBUG] [dev-couchbase-1.cloudapp.net/126.96.36.199:51011][KeyValueEndpoint]: Identified Idle State, signalling config reload.
In Virtual Machine we mapped port
8091 >> 51001
8092 >> 51002
I am not able to change application to point to port # 51002.
At the moment, there is no supported way. One possible way would be to write a small http proxy and do the port translation of what you get off of the HTTP bootstrap. Another possible way is to build your own static config file. Maybe @avsej knows if there is support for that.
If you’re going to have multiple nodes in the cluster, then you’ll need to open those ports though. It’s not a question of the client accessing the node alone.
@vinod as @ingenthr said, there is no way to override ports, because the couchbase server advocates those ports through its configuration. Also the servers intercommunicate on specific ports, so you need an overall strategy on that.
@vinod its not only about 8092, but also 11210, 8091 and potentially 8093 from 4.0 on if you want to use N1QL. The intra-cluster communication uses even more high level ports (you can find all of them in the server docs).
Sorry to revive old conversation, but I am facing the same issue and changing the port in capi.ini did not fix our issue - the java SDK still tries to connect to 8092 as I can see in the trace logs.
In the couchbase environment builder class I can find a way to set all other ports, except 8092.
And I cannot use 8092, because we have different couchbase clusters running in docker containers on the same machine and there is no way I can use the default port for all containers.
To further elaborate on the topic - I see in the .NET SDK documentation that there is ApiPort client configuration property which can be used to change the default 8092 port, but I cannot find such anywhere in the Java SDK.
If anyone is interested I managed to change the 8092 port by manually adding and removing the VIEW Service using RemoveServiceRequest and AddServiceRequest. It seems dummy, but for development purposes is doing its job