Skip to content
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

NOt a REST resouce when deploying a TDE template with the combination ML-10.0.9-3 and ML-Gradle 4.3.5 #626

Closed
DavidEnnis-CleverLlamas opened this issue Sep 26, 2022 · 4 comments

Comments

@DavidEnnis-CleverLlamas

ML: 10.0.9-3
ML-Gradle 4.3.5
Default port assignment for deploy steps.

Scenerio:

  • Create a TDE template
  • Deploy

Failure happens during the validation process of the TDE Templates (TemplateBachInsert, I believe)
-- Not a REST instance
-- Diving Deeper: It appears to be hitting port 8000, but that is causing a redirect to port 8002.

Dropping the number down for ML-Gradle fixes the issue.

@rjrudin
Copy link
Contributor

rjrudin commented Sep 26, 2022

@DavidEnnis-17llamas On ML 10.0-9, tde.templateBatchInsert is used as that performs validation - but if there's an error, the ML Java Client doesn't receive it, and it instead reports the unhelpful error you're getting.

marklogic/ml-javaclient-util#153 will be addressed in the next release, as the best that can be done is to log the script that's being run so that the user can re-run it in qconsole to see the real error. We have an internal issue for fixing the interaction between the Java Client and the REST API so that the helpful error is returned.

Note that marklogic/ml-javaclient-util#156 was just fixed this past Friday - if you're using a permissions.properties file, you may be running into that bug.

In the meantime, the workaround unfortunately is to turn TDE validation off - e.g mlTdeValidationEnabled=false .

@rjrudin rjrudin added this to the 4.3.6 milestone Sep 26, 2022
@DavidEnnis-CleverLlamas
Copy link
Author

HI Rob.

Thanks. Will see about disabling validation.

Some interesting points:
Error:
Caused by: java.lang.RuntimeException: Unable to load and validate TDE templates via tde.templateBatchInsert; cause: Local message: failed to apply resource at eval: Internal Server Error. Server Message: Server (not a REST instance?) did not respond with an expected REST Error message.

But then:
8000 access log shows a hit - but http error code 500
8000 Error log .. has no entry.. strange.

Templates validate in Query console, So I assume there is something else strange going on. For now, I will disable validation.

Thanks for the assistance.

David

@rjrudin
Copy link
Contributor

rjrudin commented Sep 26, 2022

Yup, have been seeing the same thing. The Java Client unfortunately does not get an error, and it's not shown in the ML error logs. marklogic/ml-javaclient-util#157 will recommend that the user run in Query Console the same script that ml-gradle uses to load and validate the templates, which I think is the best that ml-gradle can do, since it doesn't have access to the actual error.

Closing this as the above PR will resolve this issue.

@rjrudin rjrudin closed this as completed Sep 26, 2022
@rjrudin rjrudin removed this from the 4.3.6 milestone Sep 26, 2022
@rjrudin
Copy link
Contributor

rjrudin commented Sep 27, 2022

@DavidEnnis-17llamas Give 4.3.6 a try, just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants