[
https://issues.apache.org/jira/browse/SOLR-10818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man reopened SOLR-10818:
-----------------------------
Dat: It appears that every *windows* policeman jenkins build since you
committed this test has failed because you aren't doing anything to properly
JSON encode the tempDir path before including it in the payload.
This is what {{cat -vet}} on the log from
https://jenkins.thetaphi.de/job/Lucene-Solr-master-Windows/6693/ shows...
{noformat}
[junit4] 2> NOTE: reproduce with: ant test
-Dtestcase=V2ApiIntegrationTest -Dtests.method=testCollectionsApi
-Dtests.seed=2FCBA65E4E932D4F -Dtests.slow=true -Dtests.locale=ar-SY
-Dtests.timezone=Asia/Karachi -Dtests.asserts=true
-Dtests.file.encoding=US-ASCII^M$
[junit4] ERROR 0.03s J0 | V2ApiIntegrationTest.testCollectionsApi <<<^M$
[junit4] > Throwable #1:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException:
Error from server at http://127.0.0.1:62747/solr:
java.nio.file.InvalidPathException: Illegal char <^H> at index 53:
C:UsersjenkinsworkspaceLucene-Solr-master-Windowssolr^Huildsolr-core^IestJ0^Iempsolr.handler.V2ApiIntegrationTest_2FCBA65E4E932D4F-001^IempDir-002^M$
[junit4] > ^Iat
__randomizedtesting.SeedInfo.seed([2FCBA65E4E932D4F:F35541DFF68A49F1]:0)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException.create(HttpSolrClient.java:804)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:600)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:250)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:239)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:470)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:400)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1102)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:843)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:774)^M$
[junit4] > ^Iat
org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219)^M$
[junit4] > ^Iat
org.apache.solr.handler.V2ApiIntegrationTest.testCollectionsApi(V2ApiIntegrationTest.java:141)^M$
{noformat}
AFAICT: The original path, which looked something like
{{C:\Users\jenkins\workspace\Lucene-Solr-master-Windows\solr\build\solr-core\testJ0\temp\solr.handler.V2ApiIntegrationTest_2FCBA65E4E932D4F-001\tIempDir-002}}
is winding up in the JSON payload verbatim, and the JSON parser in solr is
treating most of those {{\}} as redundent escape sequences ({{\U}}, {{\j}},
etc...) but in the case of {{\b}} and {{\t}} it's treating them as literal
"BACKSPACE (0x48)" and "HORIZONTAL TAB (0x49)" characters -- and the BACKSPACE
is causing a InvalidPathException.
You can see this same underlying test bug manifest itself in a slightly diff
way on linux if you use {{mkdir path\ with\ \'quote/}} and then clone the git
repo in that directory...
{noformat}
[junit4] 2> NOTE: reproduce with: ant test
-Dtestcase=V2ApiIntegrationTest -Dtests.method=testCollectionsApi
-Dtests.seed=D6A7E5ADED6D97B1 -Dtests.slow=true -Dtests.locale=ro
-Dtests.timezone=Australia/Queensland -Dtests.asserts=true
-Dtests.file.encoding=ISO-8859-1
[junit4] ERROR 0.04s | V2ApiIntegrationTest.testCollectionsApi <<<
[junit4] > Throwable #1:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException:
Error from server at http://127.0.0.1:46450/solr:
org.noggit.JSONParser$ParseException: Expected key,value separator ':':
char=',position=223
AFTER='andler.V2ApiIntegrationTest_D6A7E5ADED6D97B1-001/tempDir-002'' BEFORE='
}}'
[junit4] > at
__randomizedtesting.SeedInfo.seed([D6A7E5ADED6D97B1:A39022C5574F30F]:0)
[junit4] > at
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException.create(HttpSolrClient.java:804)
{noformat}
> backup-collection V2 API doesn't parse params correctly
> -------------------------------------------------------
>
> Key: SOLR-10818
> URL: https://issues.apache.org/jira/browse/SOLR-10818
> Project: Solr
> Issue Type: Sub-task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: v2 API
> Reporter: Varun Thacker
> Assignee: Cao Manh Dat
>
> tried the backup-collection command and I got an error which seems to
> indicate that the location param is getting escaped? Also didn't see any
> tests for backup-collection
> {code}
> ~/solr-6.5.0$ curl -X POST -d '{backup-collection:{name: backup_test,
> collection: gettingstarted , location: '/Users/varunthacker/solr-6.5.0' }}'
> http://localhost:8983/v2/c
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> <title>Error 400
> {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.noggit.JSONParser$ParseException},msg=org.noggit.JSONParser$ParseException:
> Invalid comment: expected //, /*, or #: char=U,position=79
> BEFORE='{name: backup_test, collection: gettingstarted , location:
> /U' AFTER='sers/varunthacker/solr-6.5.0 }}',code=400}</title>
> </head>
> <body><h2>HTTP ERROR 400</h2>
> <p>Problem accessing /solr/____v2/c. Reason:
> <pre>
> {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.noggit.JSONParser$ParseException},msg=org.noggit.JSONParser$ParseException:
> Invalid comment: expected //, /*, or #: char=U,position=79
> BEFORE='{name: backup_test, collection: gettingstarted , location:
> /U' AFTER='sers/varunthacker/solr-6.5.0 }}',code=400}</pre></p>
> </body>
> </html>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]