Page MenuHomePhabricator

wikibase docker images, Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php'
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce: Run (I've tried with both 1.33 and 1.34 bundle)

docker-compose docker-compose.yml pull
docker-compose docker-compose.yml up

(Docker-compose.yml downloaded here)

after removing everything of all my former Docker contains and volumes with

docker system prune

Actual Results:

When I try to access my Wikibase instance, I see this warning (also visible in the logs related to the wikibase container):

>> Warning: require_once(/var/www/html/extensions/Wikibase/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/LocalSettings.php on line 52
>> 
>> Fatal error: require_once(): Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php' (include_path='/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/mail:/var/www/html/vendor/pear/mail_mime:/var/www/html/vendor/pear/net_smtp:/var/www/html/vendor/pear/net_socket:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/local/lib/php') in /var/www/html/LocalSettings.php on line 52

Based on this, I've tried to add "extensions/Wikibase/composer.json" in composer.local.json: no improvement.

Expected Results: to be able to run again a Wikibase instance...

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Anchardo updated the task description. (Show Details)
Anchardo updated the task description. (Show Details)
Reedy renamed this task from Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php to Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php'.Jan 30 2020, 12:51 AM
Addshore subscribed.

Hi there

Which versions of the docker image were you upgrading between?

You no longer need to load Wikibase/vendor/autoload.php in your LocalSettings.php file.

Addshore renamed this task from Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php' to [SUPPORT] Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php'.Jan 30 2020, 7:59 AM
Addshore claimed this task.
Addshore triaged this task as Medium priority.
Addshore moved this task from Incoming to Blocked / Waiting / External on the Wikidata-Campsite board.

Hi Adam,
I wanted to start from scratch because of issues with the WikibaseQualityConstraint extension, so I removed everything and made a lot of attempts, using alternatively image: wikibase/wikibase:1.33-bundle and image: wikibase/wikibase:1.34-bundle to see if it would help. As far as I remember I didn't use any previous version.

Is there anything else I can do to make sure I can start from scratch without former versions interfering?

Here is what I got with docker images |grep wikibase

wikibase/quickstatements latest c373face2397 2 days ago 433MB
wikibase/elasticsearch 5.6.14-extra c2dc188e73c7 2 days ago 488MB
wikibase/wdqs-proxy latest 4093545f1806 2 days ago 21.8MB
wikibase/wdqs-frontend latest 5c1e8ece36be 2 days ago 34.2MB
wikibase/wikibase 1.34-bundle 34c723171a76 2 days ago 1.23GB
wikibase/wikibase 1.33-bundle 91436893506b 2 days ago 1.2GB
wikibase/wdqs 0.3.10 d4fec149872e 2 days ago 217MB
wikibase/wdqs 0.3.2 2911494fbea8 2 months ago 228MB

Edit: Ok, I've seen here how to remove images, I'll let you know if it works now.

Hello,

I've also received this error with a fresh install of docker and the master branch of wikibase-docker.

Here is what I have with docker images | grep wikibase
$ docker images | grep wikibase
wikibase/quickstatements latest c373face2397 4 days ago 433MB
wikibase/elasticsearch 5.6.14-extra c2dc188e73c7 4 days ago 488MB
wikibase/wdqs-proxy latest 4093545f1806 4 days ago 21.8MB
wikibase/wdqs-frontend latest 5c1e8ece36be 4 days ago 34.2MB
wikibase/wikibase 1.33-bundle 91436893506b 4 days ago 1.2GB
wikibase/wdqs 0.3.10 d4fec149872e 4 days ago 217MB

Edit:
Could it be because the wikibase-docker/wikibase/1.33/base/LocalSettings.php.template file still makes mention to require_once "${DOLLAR}IP/extensions/Wikibase/vendor/autoload.php"; on line 52?

There seems to be more, what has to be done, to get it running:

  • After commenting out the autoload, I had to run the "composer install --no-dev" so that the instance finds the vendor/wikibase packages
  • In LocalSettings.php there is now a $wgServer="http://localhost:8181" required
  • finally the Fatal exception of type "Wikimedia\Rdbms\DBQueryError" has to be cleared with a "php maintenance/update.php"

hope that helps.

Setting $wgServer="http://localhost:8181", wouldn't that be against what this page says: https://www.mediawiki.org/wiki/Manual:$wgServer ?

Would that break the links inside Wikibase?

Addshore renamed this task from [SUPPORT] Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php' to wikibase docker images, Failed opening required '/var/www/html/extensions/Wikibase/vendor/autoload.php'.Feb 3 2020, 8:56 PM
Addshore raised the priority of this task from Medium to High.

It looks like the change in https://github.com/wmde/wikibase-docker/pull/109 missed removing the link mentioned in T243930#5842478
https://github.com/wmde/wikibase-docker/commit/3873938394d12394e3db899d12ad181d8090d10b removes this line and should fix the issue.

The new images are currently rebuilding.
You should be able to follow the builds at https://travis-ci.org/wmde/wikibase-docker/builds/645656648 and once the relevant wikibase version is green there doing a docker pull for the image should fix your problems.

Having some tests run when these images are built T182391: Tests / CI for wikibase-docker images probably would have avoided this.

With the new docker images I get:

[f90585eba61041805b39093c] [no req] Error from line 1040 of /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php: Class 'Wikibase\DataModel\Services\EntityId\EntityIdComposer' not found

As far as I can see is

"wikibase/data-model": "~6.0|~7.0" from extensions/WikibaseImport/composer.json

blocking

"wikibase/data-model": "^9.0.1" from extensions/Wikibase/composer.json

So composer does not build proper autoload files.

I get the following error with the new docker image:

[7971c42b6d51e811d388f269] 2020-02-04 22:35:40: Fatal exception of type "Error"

And finally, when switching the docker-compose.yml file from pulling the 1.33 to pulling 1.34 I am told to set $wgServer:

$wgServer must be set in LocalSettings.php. See https://www.mediawiki.org/wiki/Manual:$wgServer.

In the 1.33 Dockerfile I changed

ADD https://github.com/filbertkm/WikibaseImport/archive/master.tar.gz /WikibaseImport.tar.gz

to

ADD https://github.com/wikidata/WikibaseImport/archive/master.tar.gz /WikibaseImport.tar.gz

so that the WikibaseImport version restraints match the data-model version. But still the ready built (and running) container needs an additional "composer install --no-dev" to get rid of

Fatal exception of type "Error"

on REL1_33

[77bf49be7604c080797560d0] / Error from line 1040 of /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php: Class 'Wikibase\DataModel\Services\EntityId\EntityIdComposer' not found

Backtrace:

#0 /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php(2262): Wikibase\Repo\WikibaseRepo->getEntityIdComposer()
#1 /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php(2253): Wikibase\Repo\WikibaseRepo->newMultipleRepositoryAwareWikibaseServices()
#2 /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php(1973): Wikibase\Repo\WikibaseRepo->getWikibaseServices()
#3 /var/www/html/extensions/Wikibase/repo/RepoHooks.php(121): Wikibase\Repo\WikibaseRepo->getEntityNamespaceLookup()
#4 /var/www/html/includes/Hooks.php(174): Wikibase\RepoHooks::onSetupAfterCache()
#5 /var/www/html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#6 /var/www/html/includes/Setup.php(782): Hooks::run(string)
#7 /var/www/html/includes/WebStart.php(77): require_once(string)
#8 /var/www/html/index.php(39): require(string)
#9 {main}

I'm going to close this ticket and start a new ticket for this new issue.