User defined ports for testing


#1

Hello,

I am trying to customize ports in Couchbase Server 4.5 for testing and being able to launch integration tests in parallel but the CAPI port (aka 8092) is giving me a hard time.
I edit the /opt/couchbase/etc/couchdb/default.d/capi.ini file, remove the /opt/couchbase/var/lib/couchbase/config/config.dat if it exists (as explained in http://developer.couchbase.com/documentation/server/current/install/install-ports.html) before launching couchbase but there is no effect and the default capi port is still communicated to the java client.

Am I missing something ? Is there another operation to run so that I can override the 8092 value ?
Thank you for your help.


#2

Hi @sdumas

If you use a Linux based system you could add a iptables rule to redirect from your custom port to 8092

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport $srcPortNumber -j REDIRECT --to-port $dstPortNumber