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
Issue with queryAll() function - read forestInfo: cannot process response with 405 status with path #837
Comments
Hello sunnywd, I'm sorry you're having trouble using our Node client. I was able to reproduce your issue. Something I found was that the problem only occurs when the "database" property is set in the connection properties, like the following.
If the "database" property is not set, then the code works (once I changed occurrences of "summary" to "response" in your example). Unfortunately, that is only useful when the appserver for the port is assigned to the database you wish to query, but perhaps you can use that as a workaround for the time-being. At this point, I believe this is a bug in the Node client and we will need to add it to our backlog and prioritize it. Phil |
I've looked into this a little more and it's definitely a bug in the Node client. I'll get to work on this immediately and hopefully we will have a patch release soon. In the meantime, the work-around is to not have the "database" property in the connection settings and to use a REST port with the correct database assigned. |
Thank you for the prompt response. Indeed, the query functioned correctly after I removed 'database' from the connection configuration. |
@sunnywd Thank you for confirming.! We will have a release soon. Request you to update the stackoverflow as well. Thanks.! |
Hi @sunnywd, we have released a new patch version of the client, version 3.3.1, with a fix for this bug. Thank you for taking the time for reporting the bug! |
Thanks for the quick turnaround. |
I encountered a 405 error while running the queryAll() function. If I've overlooked anything, further instructions would be appreciated. Below are the details I've posted on Stack Overflow. Please let me know if any additional information or clarification is needed.
I attempted a simple
queryAll()
example, which resulted in the following error:Is this function currently operational? Do I need to make any additional configuration or permission changes, or install any extra plugins in the MarkLogic instance?
The MarkLogic documentation references the
queryAll()
function, and there's an example query on GitHub. When it comes to reading bulk data, is custom data service a more preferred approach?Here is the list of references I'm aware of, but they haven't been helpful so far:
Below is the simple code example that I got the 405 status error:
I confirmed the simple cts directory query works in this simpler query example:
Additionally, the REST API access log shows the following entry:
It's a local MarkLogic 11.1.0 instance on a MacBook with an M1 chip, using a developer license. The request was executed with MarkLogic admin user privileges. The database has three forests attached: my-db-dev-1, my-db-dev-2, and my-db-dev-3.
I was able to replicate the same 405 error when I tried
queryAll()
with a new REST API instance, created following the [MarkLogic's REST API instruction] (developer.marklogic.com/learn/rest).Marklogic npm module version: "3.3.0"
Node.js v20.9.0
Detailed error message:
The text was updated successfully, but these errors were encountered: