Topic on Talk:Parsoid

Couldn't resolve host name (curl error: 6) but able to curl MediaWiki fine

2
Summary last edited by Babajkov 11:26, 27 January 2021 3 years ago

Couldn't resolve host name (curl error: 6) but able to curl MediaWiki fine


Fix:

ubuntu

nano /etc/hosts

add

127.0.1.1 you.domen.wiki.name

FireAmpersand (talkcontribs)

Not sure if I should be posting here or on the visualeditor page, but I can't for the life of me get Parsaoid/VisualEditor working.

Here is some info about my setup:

- Host: Centos 8

- Docker Installed and MediaWiki is running on that with 80->80

- MediaWiki is a private wiki

- Parsaoid is installed on the host and mapped to 8001 (Default had a conflict with container already in use)

- VisualEditor is installed and throws no error other then the one in the title.


Now I have gone through the following pages to try to troubleshoot my issue:

Parsoid/Troubleshooting

Extension:VisualEditor#Linking with Parsoid in private wikis


Currently I can curl the api through Parsoid and get values through a private wiki but within mediawiki, I can not edit with visual editor.


LocalSetting.php


<?php

# This file was automatically generated by the MediaWiki 1.34.0

# installer. If you make manual changes, please keep track in case you

# need to recreate them later.

#

# See includes/DefaultSettings.php for all configurable settings

# and their default values, but don't forget to make changes in _this_

# file, not there.

#

# Further documentation for configuration settings may be found at:

# https://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry

if ( !defined( 'MEDIAWIKI' ) ) {

   exit;

}

## Uncomment this to disable output compression

# $wgDisableOutputCompression = true;

$wgSitename = "FireAmpersand Documentation";

$wgMetaNamespace = "FireAmpersand_Documentation";

## The URL base path to the directory containing the wiki;

## defaults for all runtime URL paths are based off of this.

## For more information on customizing the URLs

## (like /w/index.php/Page_title to /wiki/Page_title) please see:

## https://www.mediawiki.org/wiki/Manual:Short_URL

$wgScriptPath = "";

## The protocol and server name to use in fully-qualified URLs

$wgServer = "http://bumblebee.fireampersand.ca";

## The URL path to static resources (images, scripts, etc.)

$wgResourceBasePath = $wgScriptPath;

## The URL path to the logo.  Make sure you change this from the default,

## or else you'll overwrite your logo when you upgrade!

$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";

## UPO means: this is also a user preference option

$wgEnableEmail = false;

$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "apache@🌻.invalid";

$wgPasswordSender = "apache@🌻.invalid";

$wgEnotifUserTalk = false; # UPO

$wgEnotifWatchlist = false; # UPO

$wgEmailAuthentication = true;

## Database settings

$wgDBtype = "sqlite";

$wgDBserver = "";

$wgDBname = "my_wiki";

$wgDBuser = "";

$wgDBpassword = "";

# SQLite-specific settings

$wgSQLiteDataDir = "/var/www/data";

$wgObjectCaches[CACHE_DB] = [

   'class' => SqlBagOStuff::class,

   'loggroup' => 'SQLBagOStuff',

   'server' => [

       'type' => 'sqlite',

       'dbname' => 'wikicache',

       'tablePrefix' => '',

       'variables' => [ 'synchronous' => 'NORMAL' ],

       'dbDirectory' => $wgSQLiteDataDir,

       'trxMode' => 'IMMEDIATE',

       'flags' => 0

   ]

];

$wgLocalisationCacheConf['storeServer'] = [

   'type' => 'sqlite',

   'dbname' => "{$wgDBname}_l10n_cache",

   'tablePrefix' => '',

   'variables' => [ 'synchronous' => 'NORMAL' ],

   'dbDirectory' => $wgSQLiteDataDir,

   'trxMode' => 'IMMEDIATE',

   'flags' => 0

];

$wgJobTypeConf['default'] = [

   'class' => 'JobQueueDB',

   'claimTTL' => 3600,

   'server' => [

       'type' => 'sqlite',

       'dbname' => "{$wgDBname}_jobqueue",

       'tablePrefix' => '',

       'variables' => [ 'synchronous' => 'NORMAL' ],

       'dbDirectory' => $wgSQLiteDataDir,

       'trxMode' => 'IMMEDIATE',

       'flags' => 0

   ]

];

## Shared memory settings

$wgMainCacheType = CACHE_ACCEL;

$wgMemCachedServers = [];

## To enable image uploads, make sure the 'images' directory

## is writable, then set this to true:

$wgEnableUploads = true;

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from https://commons.wikimedia.org

$wgUseInstantCommons = false;

# Periodically send a pingback to https://www.mediawiki.org/ with basic data

# about this MediaWiki instance. The Wikimedia Foundation shares this data

# with MediaWiki developers to help guide future development efforts.

$wgPingback = false;

## If you use ImageMagick (or any other shell command) on a

## Linux server, this will need to be set to the name of an

## available UTF-8 locale

$wgShellLocale = "C.UTF-8";

## Set $wgCacheDirectory to a writable directory on the web server

## to make your wiki go slightly faster. The directory should not

## be publicly accessible from the web.

#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/data/Names.php

$wgLanguageCode = "en-ca";

$wgSecretKey = "d8f1a050a167350916861d1c65c428ec2e15ef1ddde8c3d305533350dd83f480";

# Changing this will log out all existing sessions.

$wgAuthenticationTokenVersion = "1";

# Site upgrade key. Must be set to a string (default provided) to turn on the

# web installer while LocalSettings.php is in place

$wgUpgradeKey = "364ffa43b8516e75";

## For attaching licensing metadata to pages, and displaying an

## appropriate copyright notice / icon. GNU Free Documentation

## License and Creative Commons licenses are supported so far.

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "";

$wgRightsText = "";

$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.

$wgDiff3 = "/usr/bin/diff3";

# The following permissions were set based on your choice in the installer

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;

$wgGroupPermissions['*']['read'] = false;

## Default skin: you can change the default skin. Use the internal symbolic

## names, ie 'vector', 'monobook':

$wgDefaultSkin = "vector";

# Enabled skins.

# The following skins were automatically enabled:

wfLoadSkin( 'MonoBook' );

wfLoadSkin( 'Timeless' );

wfLoadSkin( 'Vector' );

# End of automatically generated settings.

# Add more configuration options below.

#Extensions

# VisualEditor

wfLoadExtension( 'VisualEditor' );

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgHiddenPrefs[] = 'visualeditor-enable';

#Parsoid Connection

$wgVirtualRestConfig['modules']['parsoid'] = array(

   #URL to the Parsoid instance

   'url' => 'http://bumblebee.fireampersand.ca:8001',

   'domain' => 'localhost',

   'prefix' => 'localhost'

   );

//$wgSessionsInObjectCache = true;

//$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

if ( $_SERVER['REMOTE_ADDR'] == '172.17.0.1'){

   $wgGroupPermissions['*']['read'] = true;

   $wgGroupPermissions['*']['edit'] = true;

};

ini_set('error_log','/tmp/php-error.log');

error_log($_SERVER['REMOTE_ADDR']);



Any help would be apreciated, been working on this since last night.

Arlolra (talkcontribs)