by ikochergin » Tue Aug 12, 2014 8:39 am
We had a problem with the client connection:
Configuration:
CODE: SELECT ALL
--------------------------
| node_1 |
| eth0 | bond0 |
| ext_ip1 | 192.168.1.1 |
--------------------------
| | | |
INTERNET INT_LAN
| | | |
--------------------------
| ext_ip2 | 192.168.1.2 |
| ext0 | bond0 |
| node_2 |
--------------------------
node_1
CODE: SELECT ALL
network {
service {
address ext_ip1
port 3000
reuse-address
}
fabric {
address 192.168.1.1
port 3001
}
heartbeat {
mode mesh
address 192.168.1.1
port 3002
mesh-address 192.168.1.2
mesh-port 3002
interval 500
timeout 30
}
info {
address any
port 3003
}
}
node_2
CODE: SELECT ALL
network {
service {
address ext_ip2
port 3000
reuse-address
}
fabric {
address 192.168.1.2
port 3001
}
heartbeat {
mode mesh
address 192.168.1.2
port 3002
mesh-address 192.168.1.1
mesh-port 3002
interval 500
timeout 30
}
info {
address any
port 3003
}
}
To client returns all addreses internal and external
CODE: SELECT ALL
15:31:44.949 [main] DEBUG r.m.e.aerospike.AerospikeService - INFO: Add node BB970D95F3ACAB8 ext_ip1:3000
15:31:44.951 [main] DEBUG r.m.e.aerospike.AerospikeService - INFO: Add node BB9188A6D3ACAB8 ext_ip2:3000
15:31:45.071 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Node BB970D95F3ACAB8 ext_ip1:3000 partition generation 27 changed.
15:31:45.258 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Node BB9188A6D3ACAB8 ext_ip2:3000 partition generation 27 changed.
15:31:46.326 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Alias 192.168.1.2:3000 failed: Error Code 11: java.net.SocketTimeoutException: connect timed out
15:31:46.327 [main] DEBUG r.m.e.aerospike.AerospikeService - WARN: Add node 192.168.1.2:3000 failed: Error Code 11: Failed to connect to host aliases: [192.168.1.2:3000]
15:31:47.328 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Alias 192.168.1.1:3000 failed: Error Code 11: java.net.SocketTimeoutException: connect timed out
15:31:47.328 [main] DEBUG r.m.e.aerospike.AerospikeService - WARN: Add node 192.168.1.1:3000 failed: Error Code 11: Failed to connect to host aliases: [192.168.1.1:3000]
15:31:47.330 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Add seed aerospike.madnet.ru:3000
15:31:47.330 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Add seed ext_ip2:3000
15:31:47.330 [main] DEBUG r.m.e.aerospike.AerospikeService - DEBUG: Add seed ext_ip1:3000
CODE: SELECT ALL
asinfo -h ext_ip2 -v "services"
requested value services
value is ext_ip1:3000;192.168.1.2:3000
asinfo -h ext_ip2 -v "services"
requested value services
value is ext_ip1:3000;192.168.1.1:3000
But 192.168.1.0/24 is internal lan and client do not have access to it.
How to disable the sending of internal addresses to the client?