You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/12/16 11:11:11 UTC

[GitHub] [solr] bszabo97 commented on pull request #1182: SOLR-16504 Convert CLI tools to Jetty HTTP 2 client.

bszabo97 commented on PR #1182:
URL: https://github.com/apache/solr/pull/1182#issuecomment-1354572598

   I have added some more commits where I was trying to migrate from apache client to the jetty client, but right now I am a bit stuck and I would need a little guidance.
   
   With the current version (at least) one tests is failing, which can be reproduced with
   ```
   ./gradlew :solr:core:test --tests "org.apache.solr.cloud.PackageManagerCLITest.testPackageManager" -Ptests.jvms=6 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=6DCD7855C98F8100 -Ptests.file.encoding=UTF-8
   ```
   I get the following error in this test:
   ```
   org.apache.solr.common.SolrException: org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from server at https://127.0.0.1:60536: Invalid version (expected 2, but 123) or the data in not in
    'javabin' format
     2>    at org.apache.solr.packagemanager.PackageManager.fetchInstalledPackageInstances(PackageManager.java:223)
     2>    at org.apache.solr.util.PackageTool.runImpl(PackageTool.java:108)
     2>    at org.apache.solr.util.SolrCLI$ToolBase.runTool(SolrCLI.java:174)
     2>    at org.apache.solr.cloud.PackageManagerCLITest.run(PackageManagerCLITest.java:219)
     2>    at org.apache.solr.cloud.PackageManagerCLITest.testPackageManager(PackageManagerCLITest.java:103)
   ...
   ```
   
   Looking at the logs of this test on the main branch I can see that the request with which we get the manifest file differs in the parameters. On the main branch it looks like this:
   ```
   5384 INFO  (qtp747046555-89) [n:127.0.0.1:61067_solr] o.a.s.s.HttpSolrCall [admin] webapp=null path=/node/files/package/question-answer/1.0.0/manifest.json params={} status=0 QTime=1
   ```
   On my branch it is like this:
   ```
   5209 INFO  (qtp1404573452-50) [n:127.0.0.1:60536_solr] o.a.s.s.HttpSolrCall [admin] webapp=null path=/node/files/package/question-answer/1.0.0/manifest.json params={wt=javabin&version=2} status=0 QTime=0
   ```
   I was not able to get rid of these parameters since I think they are there by default in every solr request(?)
   
   I also tried implementing this with the V2Request but that way I get a different error which is:
   ```
   2> org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from server at https://127.0.0.1:65494: Expected mime type in [application/octet-stream, application/vnd.apache.solr.javabin] but got text/html. <html>
     2> <head>
     2> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
     2> <title>Error 404 Not Found</title>
     2> </head>
     2> <body><h2>HTTP ERROR 404 Not Found</h2>
     2> <table>
     2> <tr><th>URI:</th><td>/____v2/api/cluster/package</td></tr>
     2> <tr><th>STATUS:</th><td>404</td></tr>
     2> <tr><th>MESSAGE:</th><td>Not Found</td></tr>
     2> <tr><th>SERVLET:</th><td>-</td></tr>
     2> </table>
     2> <hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.48.v20220622</a><hr/>
     2> 
     2> </body>
     2> </html>
     2> 
     2>    at org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:796)
     2>    at org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:509)
     2>    at org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:468)
     2>    at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:234)
     2>    at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:249)
   ```
   (Actually I get a similar message with every V2Request in this class so I had to change quite a lot of them to be GenericSolrRequests)
   
   Can somebody take a look at this problem and provide some guidance for me? Thank you in advance and sorry for the long comment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org