api-layer
api-layer copied to clipboard
Bug encountered when caching-service infinispan is running with same ports as another Zowe server
Describe the bug
While using the new caching-service infinispan I ran into some bugs. The first one is that the Zowe start up doesnt check if the ports for jgroup or keyExchange are already in use. The other bug I encountered is that, I had the same ports for jgroup and keyExchange as another user that was running Zowe and it started using that other uses workspace/caching-service/index and workspace/caching-service/data. I tried to use the presistence.dataLocation parameter but that didn't work. I believe its missing an option to update the cluster name as well, avoiding these unrelated zowe instances to unknowingly join the same cluster.
Steps to Reproduce
- Start two Zowe with the same ports under jgroup and keyExchange
- You will see the second Zowe start but the caching service will throw errors in the log and doesn't start.
Expected behavior Zowe should fail during startup if ports are taken.
Additional context I also noticed infinspan starting to use random ports and its due to its behavior to chose available ports, I believe we should update this info in the Zowe docs since its missing.
Willingness to help Sure, i can help debug and test this.
https://github.com/zowe/api-layer/wiki/Issue-management
FYI caching-service already checks if its own server port is free. perhaps the same technique is a solution for infinispan ports? https://github.com/zowe/api-layer/blob/v3.x.x/caching-service-package/src/main/resources/bin/validate.sh#L14