-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to list/create/delete caches through the REST API on Coherence v14.1.1.0 #138
Comments
Hi @thegridman, I would appreciate it immensely if you could please have a look over my configuration, there's obviously something wrong that I'm doing in configuring the REST API... Just for context, we are currently using Coherence version 3 and due to us being limited to Java 8, we are currently experimenting with Coherence CE v14.1.1.0 (AFAIK this is the last version supporting Java 8, please correct me if I'm wrong). I'm trying to do a simple PoC by installing it on our EKS cluster, enabling the REST API and performing some simple operations through the REST API before integrating it with our apps. Thank you! |
I'm no expert in Coherence REST and quite frankly that part of Coherence has kind of fallen out of use as most people just build REST applications on top of Coherence using frameworks like Helidon, Spring or Micronaut. Coherence REST is not ideal for real production quality REST applications. Having said that, it should still work. Have you actually tried running all this outside of Kubernetes by just starting Coherence locally with the same config and trying the http requests. |
Hi @thegridman , thank you for the quick response! Unfortunately no, I wasn't able to test it with a sample Java app either. Could you please confirm my understanding that there are actually 2 REST APIs, one for general cluster management and monitoring exposed over port 30000 and an Extend proxy defined according to the following acceptor:
exposed on port 8080, which I should be able to use in order to interact with the data in the cache? All I want to do is create/write to/read from and delete a cache over REST, that's all. |
Yes, there is a REST API for Coherence Management, which basically gives all the same sort of thing you can get from Coherence JMX MBeans. What you are using is Coherence REST where you can access cache data as documented here for 14.1.1.0 https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.0/develop-remote-clients/building-your-first-coherence-rest-application.html#GUID-45D33C82-D9DA-455D-8691-FA341D86CF81 |
I tried grpc as an alternative but that doesn't seem to be available in the version I'm using (as I'm stuck with Java 8). Would you be able to recommend a simple example on how to test the cluster deployed on K8s with either REST or a Java client? Thanks! |
Following the documentation at https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.0/develop-remote-clients/building-your-first-coherence-rest-application.html#GUID-E2C5134A-FF8D-44B5-8777-3FE67424FAA6 and using the following:
and the coherence.jar (standalone install) https://www.oracle.com/middleware/technologies/coherence-archive-downloads.html seems to be missing this class: so I suspect something is definitely wrong. |
You are missing the Coherence jar from the class path, it appears you only have |
@george-c29 @thegridman Is there anything else we need to do here, or can this issue be closed? |
@aseovic I wasn't able to get the REST api working so I dropped this initiative completely for now...if you happen to have a straightforward guide on how to interact with the cache cluster solely through the REST API, that would be great. However, I tried the documentation examples listed above with no success. Thanks! |
@george-c29 What error did you get? Did you check the console output from the Coherence server to see that the Http server (HttpAcceptor service) is started and use the IP address and port the HttpAcceptor listens on in your Http request? |
@lsho yes, I've posted a log extract in the first commend of all the acceptors that started and their listening port, so the answer is yes. However, using the examples above I wasn't able to reach it (I was getting a 404 no matter what I tried). |
@george-c29 Your Http server is listening on: But your http request uses: 172.20.51.129:8080 |
Describe the bug
Attempting to create/list/delete caches through the REST API results in 404 error code.
To Reproduce
I've installed this in my K8s cluster using the Coherence Kubernetes Operator as follows:
I've followed the configuration instructions from the following documentation:
https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.0/develop-remote-clients/building-your-first-coherence-rest-application.html#GUID-45D33C82-D9DA-455D-8691-FA341D86CF81
https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.0/develop-remote-clients/performing-grid-operations-rest.html#GUID-5C807FF2-5F0F-4F70-8665-1741BF7A22B0
Expected behaviour
I expect to successfully retrieve, create and delete the caches in the cluster through the REST API. Instead, I get the following:
According to the logs, the acceptor is successfully listening for connections:
Environment (please complete the following information):
Client Version: v1.32.0
Kustomize Version: v5.5.0
Server Version: v1.29.12-eks-2d5f260
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: