Running Infinispan in Nomad

Hi,
I am trying to get infinispan cache (explicitly with keycloak) working in a three node nomad cluster. This is based on JBoss and has several network configurations, but it seems the cache port needs to be reachable from the nomad host so the other services can reach it. My normal approach would be to add a static port and voila. The problem is that I cant get Jboss to bind its Jgroup in the container.

The parameters I can pass looks like this:

AVA_OPTS_APPEND="-Djgroups.external_addr=${attr.unique.network.ip-address} -Djgroups.bind_addr=127.0.0.1"

In my case the problem is that I need to make jgroups.bind_addr available from outside. I tried multiple ways to get the containers ip address (I believe it does not have one, but please let me know if I am wrong) where I can bind the jboss on. It seems I cannot bind it to 0.0.0.0.

Anyone got this working in a nomad cluster (in EC2)?

Thanks,
bert

Hi @bert2002 seems we should be able to get this to work, but it’s not clear exactly what you want. It seems like you’re trying to run in a (docker?) container with bridge networking, is that correct? (You could alternatively use host network mode).

It seems I cannot bind it to 0.0.0.0.

What error does that produce?

The container IP address for the port label you’re using should be available via NOMAD_ADDR_<label>

Hi @seth.hoenig , the problem is the application. Some applications are okay to be configured for 0.0.0.0 and will listen on all interfaces, but the infinispan/jgroups does not do that. Thats why I cant use the host port mapping from Nomad.
I created now a service in consul and expose it with an ingress in Nomad. That seems to be working :slight_smile:

1 Like