-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using localhost
in .env
with example settings, Special:Search shows an error
#384
Comments
Could you post the logs for the |
I think this is basically expected behaviour.
The way that docker networking behaves is that "localhost" is always going
to be referring to the loopback address of the container itself; there is
no magic hostname resolution to translate "localhost" into the correct
hostname for the container you wish to target. See:
https://docs.docker.com/config/containers/container-networking/#ip-address-and-hostname
This means that, for example, right now MediaWiki is trying to contact
Elasticsearch on port 9200 of the MediaWiki container; naturally this
doesn't work. You probably want to change all of these hostnames back to
their default values (and not set them to localhost).
…On Tue, 29 Nov 2022 at 09:37, addshore ***@***.***> wrote:
Could you post the logs for the wikibase container during the initial
setup?
Possibly also logs of the elasticsearch container while you are
searching, and also look in the /var/logs/mediawiki directory of the
wikibase container while you are searching?
—
Reply to this email directly, view it on GitHub
<#384 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYDJW7GXJ2C5RXRYGSTHYLWKXFHHANCNFSM6AAAAAASIHZSTQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de
Keep up to date! Current news and exciting stories about Wikimedia,
Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now.
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de
Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
|
The way that docker networking behaves is that "localhost" is always
going to be referring to the loopback address of the container itself;
there is no magic hostname resolution to translate "localhost" into
the correct hostname for the container you wish to target. See:
https://docs.docker.com/config/containers/container-networking/#ip-address-and-hostname
This means that, for example, right now MediaWiki is trying to contact
Elasticsearch on port 9200 of the MediaWiki container; naturally this
doesn't work. You probably want to change all of these hostnames back
to their default values (rather than set them to localhost).
|
Currently the comments next to the variables seem to suggest that the value should be changed. |
hi, I have the same problem with you now. Did you solve this problem? |
Table of Contents
The context
I decided to troubleshoot an issue that I had previously posted: #383. For this reason, I removed all the files that I had created in my previous attempts of installing Wikibase. These are the commands I executed.
Stop all the containers.
Remove all the containers.
Stop and remove containers, networks.
Remove all volumes.
I downloaded the files in the
example
directory from themain
branch as of the time of this writing (permalink to commit).example/docker-compose-extra.yml
(permalink)example/docker-compose.yml
(permalink)example/extra-install.sh
(permalink)example/jobrunner-entrypoint.sh
(permalink)example/template.env
(permalink)and changed the following lines (see output of the
diff
command below). After runningdiff
, I deleted the file.env-example
and renamed.env-my-modifications
to.env
.I then ran the
docker-compose
command as shown below.For the record, this was the status of the containers.
At this point, I could
api.php
(see below)The problem
When I searched for anything in http://localhost/wiki/Special:Search, the following error was shown.
Additional information
Note 1
In #381, I had reported the same error. However, the error was caused because I hadn't downloaded the files
extra-install.sh
andjobrunner-entrypoint.sh
. This time, I downloaded them, but still I couldn't perform searches.Note 2
When I use the default settings in
example
, this error doesn't happen (see image below). Recall that in.env
I had changed the value for*_HOST
variables tolocalhost
(see output ofdiff
command above).The text was updated successfully, but these errors were encountered: