|
| 1 | +--- |
| 2 | +title: "Coherence Requirements" |
| 3 | +date: 2019-08-12T12:41:38-04:00 |
| 4 | +draft: false |
| 5 | +--- |
| 6 | + |
| 7 | +If you are running Coherence on Kubernetes, either inside a WebLogic domain |
| 8 | +or standalone, then there are some additional requirements to make sure |
| 9 | +that Coherence can form clusters. |
| 10 | + |
| 11 | +Note that some Fusion Middleware products, like SOA Suite, use Coherence |
| 12 | +and so these requirements apply to them. |
| 13 | + |
| 14 | +#### Unicast and Well Known Address |
| 15 | +When the first Coherence process starts, it will form a cluster. The next |
| 16 | +Coherence process to start (i.e. in a different pod) will use UDP to try |
| 17 | +to contact the senior member. |
| 18 | + |
| 19 | +If you create a WebLogic domain which contains a Coherence cluster |
| 20 | +using the samples provided in this project, then that cluster will |
| 21 | +be configured correctly so that it is able to form; |
| 22 | +you do not need to do any additional manual configuration. |
| 23 | + |
| 24 | +If you are running Coherence standalone (outside a |
| 25 | +WebLogic domain) you should configure Coherence to use unicast and |
| 26 | +provide a "well known address (WKA)" so that all members can find the senior |
| 27 | +member. Most Kubernetes overlay network providers do not |
| 28 | +support multicast. |
| 29 | + |
| 30 | +This is done by specifying the Coherence well known addresses in a variable named |
| 31 | +`coherence.wka` as shown in the example below: |
| 32 | + |
| 33 | +``` |
| 34 | +-Dcoherence.wka=my-cluster-service |
| 35 | +``` |
| 36 | + |
| 37 | +In this example `my-cluster-service` should be the name of the Kubernetes |
| 38 | +service that is pointing to all of the members of that Coherence cluster. |
| 39 | + |
| 40 | +Please refer to the [Coherence operator documentation](https://oracle.github.io/coherence-operator/) |
| 41 | +for more information about running Coherence in Kubernetes outside of |
| 42 | +a WebLogic domain. |
| 43 | + |
| 44 | +#### Operating system library requirements |
| 45 | + |
| 46 | +In order for Coherence clusters to form correctly, the `conntrack` library |
| 47 | +must be installed. Most Kubernetes distributions will do this for you. |
| 48 | +If you have issues with clusters not forming, you should check that |
| 49 | +`conntrack` is installed using this command (or equivalent): |
| 50 | + |
| 51 | +``` |
| 52 | +$ rpm -qa | grep conntrack |
| 53 | +libnetfilter_conntrack-1.0.6-1.el7_3.x86_64 |
| 54 | +conntrack-tools-1.4.4-4.el7.x86_64 |
| 55 | +``` |
| 56 | + |
| 57 | +You should see output similar to that shown above. If you do not, then you |
| 58 | +should install `conntrack` using your operating system tools. |
| 59 | + |
| 60 | +#### Firewall (iptables) requirements |
| 61 | + |
| 62 | +Some Kubernetes distributions create `iptables` rules that block some |
| 63 | +types of traffic that Coherence requires to form clusters. If you are |
| 64 | +not able to form clusters, you can check for this issue using the |
| 65 | +following command: |
| 66 | + |
| 67 | +``` |
| 68 | +# iptables -t nat -v -L POST_public_allow -n |
| 69 | +Chain POST_public_allow (1 references) |
| 70 | +pkts bytes target prot opt in out source destination |
| 71 | +164K 11M MASQUERADE all -- * !lo 0.0.0.0/0 0.0.0.0/0 |
| 72 | + 0 0 MASQUERADE all -- * !lo 0.0.0.0/0 0.0.0.0/0 |
| 73 | +``` |
| 74 | + |
| 75 | +If you see output similar to the example above, i.e. if you see any entries |
| 76 | +in this chain, then you need to remove them. You can remove the entries |
| 77 | +using this command: |
| 78 | + |
| 79 | +``` |
| 80 | +# iptables -t nat -v -D POST_public_allow 1 |
| 81 | +``` |
| 82 | + |
| 83 | +Note that you will need to run that command for each line. So in the example |
| 84 | +above, you would need to run it twice. |
| 85 | + |
| 86 | +After you are done, you can run the previous command again and verify that |
| 87 | +the output is now an empty list. |
| 88 | + |
| 89 | +After making this change, restart your domain(s) and the Coherence cluster |
| 90 | +should now form correctly. |
| 91 | + |
| 92 | + |
| 93 | + |
0 commit comments