Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60346

core_search: Solr connection ignores proxy settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.5, 3.3.2, 3.4
    • Fix Version/s: 3.2.6, 3.3.3
    • Component/s: Global search
    • Labels:
    • Testing Instructions:
      Hide

      You will need an existing Moodle and Apache Solr setup, where search is configured and works (and does not require a proxy server). For this main part of the test, you don't need an actual proxy server.

      1 With proxy server (admin setting 'proxyhost' under Server/HTTP) not set, visit:

      admin/settings.php?section=manageglobalsearch

      EXPECTED: Moodle should be able to connect to your search engine, which will be indicated because row '3 Setup search engine' will say 'Yes'.

      2 Using admin settings page Server/HTTP, change the proxy server settings to a bogus value for proxyhost, and ensure proxybypasshosts does not include the host of your Solr instance.

      3 Visit admin/settings.php?section=manageglobalsearch

      EXPECTED: You will see an error message at top of page (depending on debugging setting), and row 3 of the table will say 'The search engine is not available. Please contact your administrator'

      4 Using admin settings, now ensure that proxybypasshosts DOES include the host of your Solr instance

      5 Visit admin/settings.php?section=manageglobalsearch

      EXPECTED: Moodle should be able to connect to your search engine, which will be indicated because row '3 Setup search engine' will say 'Yes'.

      If you have an actual proxy server, you can do a full test with the following steps, although the preceding ones are probably sufficient in practice.

      6 Remove the host of your Solr instances from the proxybypasshosts setting, and set the proxyhost/proxyport to the correct values for your proxy server.

      7 Visit admin/settings.php?section=manageglobalsearch

      EXPECTED: The search engine should be working again

      Show
      You will need an existing Moodle and Apache Solr setup, where search is configured and works (and does not require a proxy server). For this main part of the test, you don't need an actual proxy server. 1 With proxy server (admin setting 'proxyhost' under Server/HTTP) not set, visit: admin/settings.php?section=manageglobalsearch EXPECTED: Moodle should be able to connect to your search engine, which will be indicated because row '3 Setup search engine' will say 'Yes'. 2 Using admin settings page Server/HTTP, change the proxy server settings to a bogus value for proxyhost, and ensure proxybypasshosts does not include the host of your Solr instance. 3 Visit admin/settings.php?section=manageglobalsearch EXPECTED: You will see an error message at top of page (depending on debugging setting), and row 3 of the table will say 'The search engine is not available. Please contact your administrator' 4 Using admin settings, now ensure that proxybypasshosts DOES include the host of your Solr instance 5 Visit admin/settings.php?section=manageglobalsearch EXPECTED: Moodle should be able to connect to your search engine, which will be indicated because row '3 Setup search engine' will say 'Yes'. If you have an actual proxy server, you can do a full test with the following steps, although the preceding ones are probably sufficient in practice. 6 Remove the host of your Solr instances from the proxybypasshosts setting, and set the proxyhost/proxyport to the correct values for your proxy server. 7 Visit admin/settings.php?section=manageglobalsearch EXPECTED: The search engine should be working again
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-60346-master

      Description

      The Solr search engine does not correctly apply proxy settings. This is important for sites that might use third-party Solr hosting.

      Luckily it is very easy to fix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quen Sam Marshall
                Reporter:
                quen Sam Marshall
                Peer reviewer:
                Tim Hunt
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Mark Nelson
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17