-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Object Store replication from LeafNode to Cluster nats: error: nats: no stream matches subject #5106
Comments
Will have some folks take a look @b3rtram, will circle back. |
Additional Info, a stream with OBJ_dms_mirror is created ./nats --server=localhost:4222 stream ls -a
|
There are two reasons why this fails: First of all, CLI assumes that the subject name where to look for metadata and chunks is aligned with stream name, which is not the case for mirrors. However, CLI also sends request to list all streams by subject, and that does not include mirrors. |
can you give me a hint how to the stream subject transform should look like ? |
sure.
So you need to transform from the |
I tried a little but I did not get it work. I add the transform: Information for Stream OBJ_dms_mirror created 2024-03-02 16:56:12
Then I tried to get the documents by the following code:
But the output is an empty array:
What do I need to do?? I add a Trace of the central server 4222 where it does not work:
|
You seem to be doing everything right @b3rtram 🙂 The issue was that client was doing a stream lookup that could not work over mirrors. Let me know if |
Thanks for the fast response. Now I get the list of the object but could not get the data out of the object store
Output:
I will also try it in Java and C# because we need the implementation in C# and Java |
This is a bit weird, as we test that case, and I just successfuly tested it locally. Definately test it also with the target client. |
I will delete everything and try it new and give response |
Ok, now it works, I can write files into the object store leafnode, mirror the stream over nats client to the central nats-server and get the data from the mirrored object store.
Thank you very much, I think we can close this issue. |
Observed behavior
I have a nats leaf-node port 6222 and a normal nats-server on port 4222. On leaf-node I will add files to object store and replicate it to the connected nats-server. The Jetstream data is replicated from leaf node to nats server:
nats --server=localhost:4222 object ls
but when I try to list the files there is an error:
nats --server=localhost:4222 object ls dms
**nats: error: nats: stream not found**
Expected behavior
nats --server=localhost:4222 object ls dms should show the same files like on the leaf node
nats --server=localhost:6222 object ls dms
Server and client version
nats-server: v2.10.11
nats-cli: 0.1.3
Host environment
Steps to reproduce
Nats-server config:
Leaf Node config
Adding Object Store and files with Golang
leaf-node:
nats --server=localhost:6222 object info dms
Mirror OBJ_dms
nats --server=localhost:4222 stream add OBJ_dms_mirror --mirror OBJ_dms
Jetstream is mirrored
nats --server=localhost:4222 object ls
But showing files inside causes an error:
nats --server=localhost:4222 object ls dms_mirror
### nats: error: nats: no stream matches subject
The text was updated successfully, but these errors were encountered: