Page MenuHomePhabricator

PHP Fatal error: Uncaught exception 'MediaWiki\Services\ServiceDisabledException' during installation with postgres
Closed, DuplicatePublic

Description

Steps to reproduce

  • Use mw 1.28 alpha.
  • Use postgres
  • run php maintenance/install.php --pass nyan TravisWiki admin --dbtype postgres -dbname traviswiki --dbuser postgres --dbpass <pass> --scriptpath ""

Acutal results

  • it fails with

You can install MediaWiki.
Setting up database

PHP Fatal error:  Uncaught MediaWiki\Services\ServiceDisabledException: Service disabled: DBLoadBalancerFactory in /var/www/html/phabricator/includes/services/ServiceContainer.php:340
Stack trace:
#0 /var/www/html/phabricator/includes/MediaWikiServices.php(500): MediaWiki\Services\ServiceContainer->getService('DBLoadBalancerF...')
#1 /var/www/html/phabricator/includes/exception/MWExceptionHandler.php(90): MediaWiki\MediaWikiServices->getDBLoadBalancerFactory()
#2 /var/www/html/phabricator/includes/exception/MWExceptionHandler.php(121): MWExceptionHandler::rollbackMasterChangesAndLog(Object(DBQueryError))
#3 [internal function]: MWExceptionHandler::handleException(Object(DBQueryError))
#4 {main}
  thrown in /var/www/html/phabricator/includes/services/ServiceContainer.php on line 340

Expected results

  • I expect that running this script should succeed and create the tables and setup the database.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

I found on the command line, this --dbname is not used, it just presumes my_wiki, postgres or template1 as the database and no way to overwide that unless you create the database in postgres with one of those, but doing that gets a little further, then it fails at

Setting up database
done
Checking for language PL/pgSQL
done
Creating schema
done
Creating tables
PHP Fatal error: Uncaught MediaWiki\Services\ServiceDisabledException: Service disabled: DBLoadBalancerFactory in /var/www/html/phabricator/includes/services/ServiceContainer.php:340
Stack trace:

Aklapper updated the task description. (Show Details)

Use mw 1.28 alpha.

Exact version information (e.g. git revision) in bug reports is always welcome. "mw 1.28 alpha" is a span of six months. Also, Postgres version is welcome.

Oh I'm not sure the git revision but it was from yesterday and Postgres version is 9.6

Also I believe that the actual error is hidden beneath that error.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.