Trying to convert caching-service mode from vsam to infinispan on zowe V3.2, after update to yaml file and restart the task, got errors in caching-service startup:
org.infinispan.commons.CacheException: Unable to start JGroups Channel
Caused by: java.lang.IllegalArgumentException: failed to start server socket
Caused by: java.net.BindException: No available port to bind to in range [0 .. 50]
ZOWE v3.2
Caching Service is trying to create a socket with a random port intended for a failure detection protocol based on a ring of TCP sockets created between cluster members, this is a bug, the fix ( new caching-service.jar) will be included in ZOWE v3.3.
In addition, ZOWE.yaml is also misconfigured.
caching-service:
enabled: true
port: 7555
debug: false
storage:
mode: infinispan
infinispan:
# this is required if storage mode is infinispan
jgroups:
port: 7098
keyExchange: << keyExchange.port needs to be under caching-service.storage.infinispan.jgroups
port: 7118
haInstances:
# # HA instance ID
Lpar1: << HA instance ID should be all lower case
# # hostname where this instance will be started
hostname: lpar1.XX.com
# # Your &SYSNAME for this LPAR
# # This sysname will be used to route your JES command to target system.
sysname: XXXX
components:
caching-service:
storage:
mode: infinispan
infinispan:
jgroups.port: 7098
initialHosts: Lpar2[7098] << should be hostname[port] and not HA_ID[port]
Lpar2: << HA instance ID should be all lower case
# # hostname where this instance will be started
hostname: lpar2.XX.com
# # Your &SYSNAME for this LPAR
# # This sysname will be used to route your JES command to target system.
sysname: XXXX
components:
caching-service:
storage:
mode: infinispan
infinispan:
jgroups.port: 7098
initialHosts: Lpar1[7098] << should be hostname[port] and not HA_ID[port]
zowe.components.caching-service.storage.infinispan.initialHosts should have the format of ${haInstance.hostname}[${components.caching-service.storage.infinispan.jgroups.port}].
Upgrade to ZOWE v3.3 when it's available.
Workaround:
Also update the ZOWE.yaml and set:
components:
caching-service:
storage:
mode: infinispan
infinispan:
jgroups:
port: 7098
keyExchange:
port: 7118
haInstances:
# # HA instance ID
lpar1:
# # hostname where this instance will be started
hostname: lpar1.XX.com
# # Your &SYSNAME for this LPAR
# # This sysname will be used to route your JES command to target system.
sysname: XXXX
components:
caching-service:
storage:
mode: infinispan
infinispan:
jgroups.port: 7098
initialHosts: lpar2.XX.com[7098]
lpar2:
# # hostname where this instance will be started
hostname: lpar2.XX.com
# # Your &SYSNAME for this LPAR
# # This sysname will be used to route your JES command to target system.
sysname: XXXX
components:
caching-service:
storage:
mode: infinispan
infinispan:
jgroups.port: 7098
initialHosts: lpar1.xx.com[7098]
Restart ZOWE ST after the change.
In the upcoming ZOWE v3.3 release, HA instance ID will be case insensitive, all lower case HA instance ID is no longer required.