From: Spiros <kou...@gm...> - 2019-05-28 13:05:51
|
Hello All, I have being trying to set up SMW with Docker and Docker stack and use Apache Fuseki as backed storage. I'm building SMW from a media wiki docker image: FROM mediawiki:1.31.1 RUN apt-get update -y; apt-get upgrade -y RUN apt-get install -y unzip git RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && chmod +x /usr/local/bin/composer && composer self-update COPY composer.local.json . RUN composer update --no-dev --prefer-source && composer update --no-dev --prefer-source My composer.local.json file looks like this: { "require": { "mediawiki/semantic-media-wiki": "~3.0.2", "mediawiki/semantic-cite": "~2", "mediawiki/semantic-compound-queries": "~2", "mediawiki/semantic-breadcrumb-links": "~2", "mediawiki/semantic-extra-special-properties": "~2", "mediawiki/semantic-glossary": "~3", "mediawiki/semantic-meta-tags": "~2", "mediawiki/semantic-result-formats": "~3", "php-http/curl-client": "~2" }, "extra": { "merge-plugin": { "include": [ "extensions/Mpdf/composer.json", "extensions/SyntaxHighlight_GeSHi/composer.json" ] } }, "config": { "preferred-install": "source", "optimize-autoloader": true } } My LocalSettings.php file looks like this: <?php # Protect against web entry if ( !defined( 'MEDIAWIKI' ) ) { exit; } $wgSitename = "media_wiki"; $wgMetaNamespace = "Media_wiki"; $wgScriptPath = ""; $wgServer = "http://localhost"; $wgResourceBasePath = $wgScriptPath; $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png"; $wgEnableEmail = true; $wgEnableUserEmail = true; # UPO $wgEmergencyContact = "apache@localhost"; $wgPasswordSender = "apache@localhost"; $wgEnotifUserTalk = false; # UPO $wgEnotifWatchlist = false; # UPO $wgEmailAuthentication = true; $wgMainCacheType = CACHE_ACCEL; $wgMemCachedServers = []; $wgEnableUploads = false; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgUseInstantCommons = false; $wgPingback = true; $wgShellLocale = "C.UTF-8"; $wgLanguageCode = "en"; $wgSecretKey = "14fbfe0743dd4de5b02c4d06c07"; $wgAuthenticationTokenVersion = "1"; $wgUpgradeKey = "2141e273"; $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = "https://www.gnu.org/copyleft/fdl.html"; $wgRightsText = "GNU Free Documentation License 1.3 or later"; $wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/gnu-fdl.png"; $wgDiff3 = "/usr/bin/diff3"; $wgDefaultSkin = "vector"; wfLoadSkin( 'MonoBook' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Vector' ); wfLoadExtension( 'CategoryTree' ); wfLoadExtension( 'Cite' ); wfLoadExtension( 'CiteThisPage' ); wfLoadExtension( 'CodeEditor' ); wfLoadExtension( 'ConfirmEdit' ); wfLoadExtension( 'Gadgets' ); wfLoadExtension( 'ImageMap' ); wfLoadExtension( 'InputBox' ); wfLoadExtension( 'Interwiki' ); wfLoadExtension( 'Lingo' ); wfLoadExtension( 'LocalisationUpdate' ); wfLoadExtension( 'MultimediaViewer' ); wfLoadExtension( 'Nuke' ); wfLoadExtension( 'ParserFunctions' ); wfLoadExtension( 'PdfHandler' ); wfLoadExtension( 'Poem' ); wfLoadExtension( 'Renameuser' ); wfLoadExtension( 'ReplaceText' ); wfLoadExtension( 'SemanticBreadcrumbLinks' ); wfLoadExtension( 'SemanticCite' ); wfLoadExtension( 'SemanticCompoundQueries' ); wfLoadExtension( 'SemanticExtraSpecialProperties' ); // wfLoadExtension( 'SemanticGlossary' ); wfLoadExtension( 'SemanticMediaWiki' ); wfLoadExtension( 'SemanticMetaTags' ); wfLoadExtension( 'SemanticResultFormats' ); // wfLoadExtension( 'SemanticScribunto' ); wfLoadExtension( 'SpamBlacklist' ); wfLoadExtension( 'SyntaxHighlight_GeSHi' ); wfLoadExtension( 'TitleBlacklist' ); wfLoadExtension( 'WikiEditor' ); # End of automatically generated settings. # Add more configuration options below. enableSemantics(); $wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; $smwgDefaultStore = 'SMWSparqlStore'; $smwgSparqlRepositoryConnector = 'fuseki'; $smwgSparqlQueryEndpoint = 'http://fuseki:3030/db/query'; $smwgSparqlUpdateEndpoint = 'http://fuseki:3030/db/update'; $smwgSparqlDataEndpoint = ''; $smwgSparqlDefaultGraph = 'http://example.org/mydefaultgraphname'; However when I run: 'php setupStore.php' in the SMW container I get this error: root@3165db681599:/var/www/html/extensions/SemanticMediaWiki/maintenance# php setupStore.php [356754815795dfaf33221dd1] [no req] Wikimedia\Rdbms\DBConnectionError from line 1004 of /var/www/html/includes/libs/rdbms/database/Database.php: Cannot access the database: No such file or directory (localhost) Backtrace: #0 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1134): Wikimedia\Rdbms\Database->reportConnectionError(string) #1 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(749): Wikimedia\Rdbms\LoadBalancer->reportConnectionError() #2 /var/www/html/includes/GlobalFunctions.php(2801): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean) #3 /var/www/html/maintenance/Maintenance.php(1311): wfGetDB(integer, array, boolean) #4 /var/www/html/extensions/SemanticMediaWiki/maintenance/setupStore.php(120): Maintenance->getDB(integer) #5 [internal function]: SMW\Maintenance\SetupStore->getConnection() #6 /var/www/html/extensions/SemanticMediaWiki/src/Connection/CallbackConnectionProvider.php(40): call_user_func(array) #7 /var/www/html/extensions/SemanticMediaWiki/src/Connection/ConnectionManager.php(32): SMW\Connection\CallbackConnectionProvider->getConnection() #8 /var/www/html/extensions/SemanticMediaWiki/src/Store.php(579): SMW\Connection\ConnectionManager->getConnection(integer) #9 /var/www/html/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(603): SMW\Store->getConnection(integer) #10 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/SQLStoreFactory.php(395): SMWSQLStore3->getConnection(integer) #11 /var/www/html/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMW\SQLStore\SQLStoreFactory->newInstaller() #12 /var/www/html/extensions/SemanticMediaWiki/src/SPARQLStore/SPARQLStore.php(383): SMWSQLStore3->setup(boolean) #13 /var/www/html/extensions/SemanticMediaWiki/maintenance/setupStore.php(161): SMW\SPARQLStore\SPARQLStore->setup() #14 /var/www/html/maintenance/doMaintenance.php(94): SMW\Maintenance\SetupStore->execute() #15 /var/www/html/extensions/SemanticMediaWiki/maintenance/setupStore.php(265): require_once(string) #16 {main} Any idea what am I doing wrong? Regards, Spiros |