Page MenuHomePhabricator

"Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server."
Open, Needs TriagePublic

Description

Hello,

I apologize if I am posting this issue in the wrong place to begin with...I searched for help online without much success. I have been battling with this issue for the last few days and I think I am pretty close to getting it to work but need some help.

I have installed MediaWiki on Centos 7. It is working great. However, the Visual Editor is the one causing the issue. I have followed the setup guidelines as mentioned in https://www.mediawiki.org/wiki/Parsoid/Setup#Configuration. I can also access the api.php page from http://myserverip/api.php and I can also see the API documentation (Parsoid web service) under http://myserverip:8000

However, when I click "Edit" on the menu, it tries to load the Visual Editor but fails with the message "Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Would you like to retry?"

Below is my LocalSettings.php file:

# End of automatically generated settings.
# Add more configuration options below.
# This is for loading the VisualEditor
wfLoadExtension( 'VisualEditor' );

// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;

// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";

// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

$wgVirtualRestConfig['modules']['parsoid'] = array(
    // URL to the Parsoid instance
    // Use port 8142 if you use the Debian package
    'url' => 'http://localhost:8000',
    // Parsoid "domain", see below (optional)
    'domain' => 'localhost',
    // Parsoid "prefix", see below (optional)
    'prefix' => 'localhost'
);

Here is my mwAPIs file:

mwApis:
        - # This is the only required parameter,
          # the URL of you MediaWiki API endpoint.
          uri: 'http://localhost/w/api.php'
          # The "domain" is used for communication with Visual Editor
          # and RESTBase.  It defaults to the hostname portion of
          # the `uri` property above, but you can manually set it
          # to an arbitrary string. It must match the "domain" set
          # in $wgVirtualRestConfig.
          # domain: 'localhost'  # optional
          # To specify a proxy (or proxy headers) specific to this prefix
          # (which overrides defaultAPIProxyURI). Alternatively, set `proxy`
          # to `null` to override and force no proxying when a default proxy
          # has been set.
          #proxy:
          #    uri: 'http://my.proxy:1234/'
          #    headers:  # optional
          #        'X-Forwarded-Proto': 'https'
          # See below, defaults to true.
          #strictSSL: false

Could someone please help by giving me a pointer or two as to why I cannot load the Editor? Thanks in advance. Also, if I have posted this in the wrong place (not my intention at all) please let me know where I need to be posting this.

Thanks,
Ken

Event Timeline

Okcken73 created this task.Sep 27 2019, 2:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2019, 2:56 PM
Aklapper renamed this task from Visual Editor Installation to "Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server.".Sep 28 2019, 11:02 AM
JTannerWMF moved this task from To Triage to Freezer on the VisualEditor board.Oct 10 2019, 4:11 PM
JTannerWMF added a subscriber: JTannerWMF.

It looks like this may be a third party challenge, at this time due to work on Talk Pages we can't take on this task, but thank you for taking the steps to file it

Bawolff updated the task description. (Show Details)Oct 14 2019, 5:01 AM

Some standard advice for people experiencing this issue might be (not VE/parsoid specific, but for curl error 7 in general):

  • Use the netstat command to verify that parsoid is listening on the desired port
  • Use curl manually on the command line to try to connect to the parsoid api
  • Check to make sure that there are no firewalls that would prevent the connection
  • Verify that SELinux or other sandboxing techniques that may be enabled on your system, do not prevent MediaWiki from making networking connections or parsoid from recieving them.