Przemyslaw Wroblewski created SOLR-16526:
--------------------------------------------

             Summary: java.lang.IllegalArgumentException: Invalid URI host: null
                 Key: SOLR-16526
                 URL: https://issues.apache.org/jira/browse/SOLR-16526
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Przemyslaw Wroblewski


I'm deploying Solr:9.0.0 to docker swarm, 2 services each with 2 replicas, when 
I set SOLR_HOST to {\{.Task.Name}} which in my case is something like 
solr-cloud_solr1.2.jbdb6xllge1vxx123xtg3y2tw
I can see a lot exceptions in logs like:
 
{quote}ERROR (zkCallback-13-thread-14) [c:.system s:shard1 r:core_node6 
x:.system_shard1_replica_n4] o.a.s.c.SyncStrategy Sync Failed => 
java.lang.IllegalArgumentException: Invalid URI host: null (authority: 
solr-cloud_solr1.2.jbdb6xllge1vxx123xtg3y2tw:8983)
at org.eclipse.jetty.client.HttpClient.checkHost(HttpClient.java:521)
java.lang.IllegalArgumentException: Invalid URI host: null (authority: 
solr-cloud_solr1.2.jbdb6xllge1vxx123xtg3y2tw:8983)
at org.eclipse.jetty.client.HttpClient.checkHost(HttpClient.java:521) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newHttpRequest(HttpClient.java:506) 
~[?:?]
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:464) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:453) ~[?:?]
at 
org.apache.solr.client.solrj.impl.Http2SolrClient.createRequest(Http2SolrClient.java:626)
 ~[?:?]
at 
org.apache.solr.client.solrj.impl.Http2SolrClient.makeRequest(Http2SolrClient.java:507)
 ~[?:?]
at 
org.apache.solr.client.solrj.impl.Http2SolrClient.asyncRequest(Http2SolrClient.java:395)
 ~[?:?]
at 
org.apache.solr.client.solrj.impl.LBHttp2SolrClient.doRequest(LBHttp2SolrClient.java:176)
 ~[?:?]
at 
org.apache.solr.client.solrj.impl.LBHttp2SolrClient.asyncReq(LBHttp2SolrClient.java:139)
 ~[?:?]
at 
org.apache.solr.handler.component.HttpShardHandler.submit(HttpShardHandler.java:166)
 ~[?:?]
at org.apache.solr.update.PeerSync.requestVersions(PeerSync.java:346) ~[?:?]
at org.apache.solr.update.PeerSync.sync(PeerSync.java:201) ~[?:?]
at org.apache.solr.cloud.SyncStrategy.syncWithReplicas(SyncStrategy.java:215) 
~[?:?]
at org.apache.solr.cloud.SyncStrategy.syncReplicas(SyncStrategy.java:134) ~[?:?]
at org.apache.solr.cloud.SyncStrategy.sync(SyncStrategy.java:111) ~[?:?]
at 
org.apache.solr.cloud.ShardLeaderElectionContext.runLeaderProcess(ShardLeaderElectionContext.java:213)
 ~[?:?]
at 
org.apache.solr.cloud.LeaderElector.runIamLeaderProcess(LeaderElector.java:175) 
~[?:?]
at org.apache.solr.cloud.LeaderElector.checkIfIamLeader(LeaderElector.java:135) 
~[?:?]
at 
org.apache.solr.cloud.LeaderElector$ElectionWatcher.process(LeaderElector.java:355)
 ~[?:?]
at 
org.apache.solr.common.cloud.SolrZkClient$ProcessWatchWithExecutor.lambda$process$1(SolrZkClient.java:952)
 ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:259)
 ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) [?:?]{quote}
When I enter container I can reach following URL just fine with curl, tested on 
all instances in cluster. However when I changed start command to curl -v 
$SOLR_HOST I was able to reproduce the problem with not known hostname. It 
seems that docker swarm takes a while to populate dnses but Solr caches then 
indefinitely. Also when querying index I'm receiving 500 with same error:
{quote}"error":{ "msg":"Invalid URI host: null (authority: 
solr-cloud_solr2.2.xsnu79ow2o6h5z5swe3tzcz7l:8983)", {quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to