Page MenuHomePhabricator

Elastica\Exception\Connection\HttpException: Malformed URL
Closed, ResolvedPublic


MediaWiki 1.32.1 (3efaceb)17:46, 11. Apr. 2019
PHP 7.2.15-0ubuntu0.18.04.2 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
Elasticsearch 6.5.4
CirrusSearch 0.2 (3bcae30) 18:19, 18. Apr. 2019
Elastica (286dfb3) 21:01, 9. Apr. 2019

When trying to set CirrusSearch to use a non-standard port for Elasticsearch with the following setting

$wgCirrusSearchClusters = [
        'default' => [ '' ]

this error is being issued when running php extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php:

indexing namespaces...
[e0441e0e542b2b67c6de9c27] [no req]   Elastica\Exception\Connection\HttpException from line 189 of /../w/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: Malformed URL

I know that "ruflin/elastica" complains but I suspect that CirrusSearch fails in constructing a wellformed URL. Since it is not documented, at least I did not find an example, how to set a non-standard port with $wgCirrusSearchClusters this could already be an admin error.


#0 /../w/vendor/ruflin/elastica/lib/Elastica/Request.php(193): Elastica\Transport\Http->exec(Elastica\Request, array)
#1 /../w/vendor/ruflin/elastica/lib/Elastica/Client.php(688): Elastica\Request->send()
#2 /../w/vendor/ruflin/elastica/lib/Elastica/Client.php(720): Elastica\Client->request(string, string, array, array)
#3 /../w/vendor/ruflin/elastica/lib/Elastica/Index.php(574): Elastica\Client->requestEndpoint(Elasticsearch\Endpoints\Indices\Exists)
#4 /../w/vendor/ruflin/elastica/lib/Elastica/Index.php(318): Elastica\Index->requestEndpoint(Elasticsearch\Endpoints\Indices\Exists)
#5 /../w/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(501): Elastica\Index->exists()
#6 /../w/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(165): CirrusSearch\MetaStore\MetaStoreIndex::cirrusReady(CirrusSearch\Connection)
#7 /../w/extensions/CirrusSearch/includes/Maintenance/Maintenance.php(220): CirrusSearch\MetaStore\MetaStoreIndex->createIfNecessary()
#8 /../w/extensions/CirrusSearch/maintenance/indexNamespaces.php(35): CirrusSearch\Maintenance\Maintenance->maybeCreateMetastore()
#9 /../w/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(54): CirrusSearch\Maintenance\IndexNamespaces->execute()
#10 /../w/maintenance/doMaintenance.php(94): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()
#11 /../w/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(70): require_once(string)
#12 {main}

Event Timeline

Kghbln created this task.Apr 22 2019, 2:39 PM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptApr 22 2019, 2:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Try defining the configuration as follows. Likely we need to improve the documentation in this area.

$wgCirrusSearchClusters = [
    'default' => [
        [ 'host' => '', 'port' => 6800 ],
debt added a subscriber: debt.

feel free to close this, @Kghbln, if the above tip works.

Kghbln added a comment.May 2 2019, 5:18 PM

Hey, yeah, sorry for not immediately responding. Actually I wanted to test this already. Will do so soon and create a pull for the docu.

Change 508129 had a related patch set uploaded (by Kghbln; owner: Kghbln):
[mediawiki/extensions/CirrusSearch@master] Extend and change docu for $wgCirrusSearchClusters

Kghbln added a comment.May 5 2019, 7:48 PM

@EBernhardson @debt

Yesterday I successfully tested switching to a non-standard elasticsearch port and the configuration example works out fine. So I guess I was up improving the docu. :)

Change 508129 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Extend and change docu for $wgCirrusSearchClusters

Kghbln closed this task as Resolved.May 6 2019, 3:48 PM
Kghbln claimed this task.