[
https://issues.apache.org/jira/browse/SOLR-9272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151510#comment-16151510
]
Amrit Sarkar commented on SOLR-9272:
------------------------------------
{{http protocol not supported}}; its an http scheme issue. I have verified the
{{http protocol ...}} error happening at {{httpclient.execute(...)}}
{code}
@SuppressWarnings({"unchecked"})
public static Map<String,Object> getJson(HttpClient httpClient, String
getUrl) throws Exception {
try {
// ensure we're requesting JSON back from Solr
HttpGet httpGet = new HttpGet(new
URIBuilder(getUrl).setParameter(CommonParams.WT, CommonParams.JSON).build());
// make the request and get back a parsed JSON object
Map<String, Object> json = httpClient.execute(httpGet, new
SolrResponseHandler(), HttpClientUtil.createNewHttpClientRequestContext());
{code}
{{URIBuilder}} is creating the right-some URI to feed it to next {{HttpGet}}
and eventually {{HttpClient}}. I read about the Scheme and SchemeRegistry:
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/scheme/Scheme.html.
Please note: the patch is fine; "zk ...." is working as expected. Its only
{{SolrCLIZkUtilsTest}} while is failing when beasted.
> Auto resolve zkHost for bin/solr zk for running Solr
> ----------------------------------------------------
>
> Key: SOLR-9272
> URL: https://issues.apache.org/jira/browse/SOLR-9272
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: scripts and tools
> Affects Versions: 6.2
> Reporter: Jan Høydahl
> Assignee: Jan Høydahl
> Labels: newdev
> Attachments: SOLR-9272.patch, SOLR-9272.patch, SOLR-9272.patch,
> SOLR-9272.patch
>
>
> Spinoff from SOLR-9194:
> We can skip requiring {{-z}} for {{bin/solr zk}} for a Solr that is already
> running. We can optionally accept the {{-p}} parameter instead, and with that
> use StatusTool to fetch the {{cloud/ZooKeeper}} property from there. It's
> easier to remember solr port than zk string.
> Example:
> {noformat}
> bin/solr start -c -p 9090
> bin/solr zk ls / -p 9090
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]