Skip to content

"No match was found" is shown when searching items and properties using default settings #381

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

Closed
rodrigo-morales-1 opened this issue Nov 13, 2022 · 7 comments

Comments

@rodrigo-morales-1
Copy link

rodrigo-morales-1 commented Nov 13, 2022

TL; DR

I'm using default settings, I haven't modified neither docker-compose.yml, docker-compose.extra.yml nor template.env. The issue is that "No match was found" is shown when searching properties and items when adding statements even though items and properties do exist. Apart from that, the error "An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later. " is shown when searching anything in Special:Search.

Fresh installation

This sections describes the steps that I followed to delete the files from previous attempts of running Wikibase in Docker and the installation process.

Remove files from previous installation

When I found this issue, this was the state of the containers.

docker container ls
CONTAINER ID   IMAGE                                    COMMAND                   CREATED          STATUS                            PORTS                                   NAMES
df6e22cb98e1   wikibase/quickstatements:wmde.9          "/bin/bash /entrypoi…"    48 seconds ago   Up 45 seconds                     0.0.0.0:8840->80/tcp, :::8840->80/tcp   wikibase-quickstatements-1
6d51727e2508   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    48 seconds ago   Up 45 seconds                                                             wikibase-wdqs-updater-1
fd643fa25321   wikibase/wdqs-frontend:wmde.9            "/entrypoint.sh ngin…"    51 seconds ago   Up 46 seconds                     0.0.0.0:8834->80/tcp, :::8834->80/tcp   wikibase-wdqs-frontend-1
86f3e672b64b   wikibase/wdqs-proxy:wmde.9               "/bin/sh -c \"/entryp…"   51 seconds ago   Up 46 seconds                     80/tcp                                  wikibase-wdqs-proxy-1
687a0b07d87a   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /jobrunne…"    51 seconds ago   Restarting (126) 17 seconds ago                                           wikibase-wikibase_jobrunner-1
1358f1361b3c   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /entrypoi…"    51 seconds ago   Up 46 seconds                     0.0.0.0:80->80/tcp, :::80->80/tcp       wikibase-wikibase-1
c39194515bcd   wikibase/elasticsearch:6.8.23-wmde.9     "/usr/local/bin/dock…"    51 seconds ago   Up 47 seconds                     9200/tcp, 9300/tcp                      wikibase-elasticsearch-1
2d3338f457bc   mariadb:10.9                             "docker-entrypoint.s…"    51 seconds ago   Up 47 seconds                     3306/tcp                                wikibase-mysql-1
30495583c5b6   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    51 seconds ago   Up 47 seconds                     9999/tcp                                wikibase-wdqs-1

I stopped all containers using the following command.

docker container ls -a -q | xargs -r docker container stop
df6e22cb98e1
6d51727e2508
fd643fa25321
86f3e672b64b
687a0b07d87a
1358f1361b3c
c39194515bcd
2d3338f457bc
30495583c5b6

I removed all containers using the following command.

docker container ls -a -q | xargs -r docker container rm
df6e22cb98e1
6d51727e2508
fd643fa25321
86f3e672b64b
687a0b07d87a
1358f1361b3c
c39194515bcd
2d3338f457bc
30495583c5b6

I stopped and removed containers and networks using the following command.

docker-compose down
Network wikibase_default  Removing
Network wikibase_default  Removed

I deleted all volumes using the following command.

docker volume ls -q | xargs -r docker volume rm
wikibase_elasticsearch-data
wikibase_mediawiki-mysql-data
wikibase_query-service-data
wikibase_quickstatements-data
wikibase_shared

I removed the configuration files for Docker using the following command.

rm -f docker-compose.yml docker-compose.extra.yml .env

Installation process

I downloaded the following files (see code block below) in that commit with hash 6ab3c2aac2bb5dc95c72ebbe8b2231799acbef35, because that was the hyperlink for the text "example directory" in https://www.mediawiki.org/wiki/Wikibase/Docker#Preparing_your_environment (revision). Here's the link to the files in that commit in the Github repository: docker-compose.yml, docker-compose.extra.yml and template.env.

wget 'https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/6ab3c2aac2bb5dc95c72ebbe8b2231799acbef35/example/docker-compose.yml'
wget 'https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/6ab3c2aac2bb5dc95c72ebbe8b2231799acbef35/example/docker-compose.extra.yml'
wget -O '.env' 'https://raw.githubusercontent.com/wmde/wikibase-release-pipeline/6ab3c2aac2bb5dc95c72ebbe8b2231799acbef35/example/template.env'

I started Docker using the following command.

docker-compose -f docker-compose.yml -f docker-compose.extra.yml up -d
time="2022-11-13T12:20:35-05:00" level=warning msg="The \"OAUTH_CONSUMER_KEY\" variable is not set. Defaulting to a blank string."
time="2022-11-13T12:20:35-05:00" level=warning msg="The \"OAUTH_CONSUMER_SECRET\" variable is not set. Defaulting to a blank string."
Network wikibase_default  Creating
Network wikibase_default  Created
Volume "wikibase_mediawiki-mysql-data"  Creating
Volume "wikibase_mediawiki-mysql-data"  Created
Volume "wikibase_quickstatements-data"  Creating
Volume "wikibase_quickstatements-data"  Created
Volume "wikibase_query-service-data"  Creating
Volume "wikibase_query-service-data"  Created
Volume "wikibase_shared"  Creating
Volume "wikibase_shared"  Created
Volume "wikibase_elasticsearch-data"  Creating
Volume "wikibase_elasticsearch-data"  Created
Container wikibase-wdqs-1  Creating
Container wikibase-elasticsearch-1  Creating
Container wikibase-mysql-1  Creating
Container wikibase-mysql-1  Created
Container wikibase-wikibase_jobrunner-1  Creating
Container wikibase-wikibase-1  Creating
Container wikibase-wdqs-1  Created
Container wikibase-elasticsearch-1  Created
Container wikibase-wdqs-proxy-1  Creating
Container wikibase-wdqs-proxy-1  Created
Container wikibase-wdqs-frontend-1  Creating
Container wikibase-wikibase_jobrunner-1  Created
Container wikibase-wdqs-frontend-1  Created
Container wikibase-wikibase-1  Created
Container wikibase-wdqs-updater-1  Creating
Container wikibase-quickstatements-1  Creating
Container wikibase-wdqs-updater-1  Created
Container wikibase-quickstatements-1  Created
Container wikibase-elasticsearch-1  Starting
Container wikibase-mysql-1  Starting
Container wikibase-wdqs-1  Starting
Container wikibase-elasticsearch-1  Started
Container wikibase-wdqs-1  Started
Container wikibase-wdqs-proxy-1  Starting
Container wikibase-mysql-1  Started
Container wikibase-wikibase_jobrunner-1  Starting
Container wikibase-wikibase-1  Starting
Container wikibase-wdqs-proxy-1  Started
Container wikibase-wdqs-frontend-1  Starting
Container wikibase-wikibase_jobrunner-1  Started
Container wikibase-wikibase-1  Started
Container wikibase-wdqs-updater-1  Starting
Container wikibase-quickstatements-1  Starting
Container wikibase-wdqs-frontend-1  Started
Container wikibase-quickstatements-1  Started
Container wikibase-wdqs-updater-1  Started

I used the following command to show the status of the containers.

docker container ls -a
CONTAINER ID   IMAGE                                    COMMAND                   CREATED          STATUS                            PORTS                                   NAMES
c0945858aa0a   wikibase/quickstatements:wmde.9          "/bin/bash /entrypoi…"    46 seconds ago   Up 43 seconds                     0.0.0.0:8840->80/tcp, :::8840->80/tcp   wikibase-quickstatements-1
7418fc53764f   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    46 seconds ago   Up 43 seconds                                                             wikibase-wdqs-updater-1
e44328a35222   wikibase/wdqs-frontend:wmde.9            "/entrypoint.sh ngin…"    49 seconds ago   Up 43 seconds                     0.0.0.0:8834->80/tcp, :::8834->80/tcp   wikibase-wdqs-frontend-1
1a243a1113b2   wikibase/wdqs-proxy:wmde.9               "/bin/sh -c \"/entryp…"   49 seconds ago   Up 44 seconds                     80/tcp                                  wikibase-wdqs-proxy-1
0334cfcd1eff   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /entrypoi…"    49 seconds ago   Up 44 seconds                     0.0.0.0:80->80/tcp, :::80->80/tcp       wikibase-wikibase-1
324bd78244e6   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /jobrunne…"    49 seconds ago   Restarting (126) 14 seconds ago                                           wikibase-wikibase_jobrunner-1
faff7683b24b   wikibase/elasticsearch:6.8.23-wmde.9     "/usr/local/bin/dock…"    49 seconds ago   Up 44 seconds                     9200/tcp, 9300/tcp                      wikibase-elasticsearch-1
57748745b48a   mariadb:10.9                             "docker-entrypoint.s…"    49 seconds ago   Up 44 seconds                     3306/tcp                                wikibase-mysql-1
d92fe8acb432   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    49 seconds ago   Up 44 seconds                     9999/tcp                                wikibase-wdqs-1

At this point, I could

curl \
  -G 'http://localhost:8834/proxy/wdqs/bigdata/namespace/wdq/sparql' \
  -H 'Accept: text/csv' \
  --data-urlencode query='
SELECT ?a ?b ?c {
  ?a ?b ?c
}'
a,b,c
http://wikibase.svc,http://schema.org/dateModified,2022-11-13T17:34:51Z
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#claim,http://wikibase.svc/prop/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#directClaim,http://wikibase.svc/prop/direct/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#novalue,http://wikibase.svc/prop/novalue/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#propertyType,http://wikiba.se/ontology#WikibaseItem
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#qualifier,http://wikibase.svc/prop/qualifier/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#qualifierValue,http://wikibase.svc/prop/qualifier/value/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#reference,http://wikibase.svc/prop/reference/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#referenceValue,http://wikibase.svc/prop/reference/value/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statementProperty,http://wikibase.svc/prop/statement/P1
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statementValue,http://wikibase.svc/prop/statement/value/P1
http://wikibase.svc/entity/P1,http://schema.org/version,3
http://wikibase.svc/entity/P1,http://schema.org/dateModified,2022-11-13T17:34:52Z
http://wikibase.svc/entity/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://wikiba.se/ontology#Property
http://wikibase.svc/entity/P1,http://www.w3.org/2000/01/rdf-schema#label,my property one
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#statements,0
http://wikibase.svc/entity/P1,http://wikiba.se/ontology#timestamp,2022-11-13T17:34:52Z
http://wikibase.svc/entity/Q1,http://schema.org/version,2
http://wikibase.svc/entity/Q1,http://schema.org/dateModified,2022-11-13T17:34:43Z
http://wikibase.svc/entity/Q1,http://www.w3.org/2000/01/rdf-schema#label,my item one
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#statements,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#sitelinks,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#identifiers,0
http://wikibase.svc/entity/Q1,http://wikiba.se/ontology#timestamp,2022-11-13T17:34:52Z
http://wikibase.svc/prop/direct/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/statement/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/statement/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/qualifier/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/qualifier/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/reference/value/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/reference/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
http://wikibase.svc/prop/novalue/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#Class
http://wikibase.svc/prop/novalue/P1,http://www.w3.org/2002/07/owl#complementOf,_:t17
http://wikibase.svc/prop/P1,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#ObjectProperty
_:t17,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://www.w3.org/2002/07/owl#Restriction
_:t17,http://www.w3.org/2002/07/owl#onProperty,http://wikibase.svc/prop/direct/P1
_:t17,http://www.w3.org/2002/07/owl#someValuesFrom,http://www.w3.org/2002/07/owl#Thing

The problem

Matches weren't shown when searching properties when adding statements (see first image below). A match was found when using the identifier of the property (see second image below).

Screenshot 2022-11-13 at 12-39-09 my property one
Screenshot 2022-11-13 at 12-39-13 my property one

Similarly, matches weren't shown when searching items when adding statements (see first image below). A match was found when using the identifier of the item (see second image below).

Screenshot 2022-11-13 at 12-41-54 my item one
Screenshot 2022-11-13 at 12-42-00 my item one

The following error was shown when using the search bar (see image below).

Screenshot 2022-11-13 at 12-51-38 Search results for foo - wikibase-docker

Similar issues

I found these issues that were related to this issue.

@rodrigo-morales-1
Copy link
Author

rodrigo-morales-1 commented Nov 14, 2022

Just in case this matters, in previous attempts of getting Wikibase running, I tried installing it without using Docker, and I recall that in the README file of the extension CirrusSearch, it was recommended to execute some commands. I've copy-pasted the relevant part from the README file in the code block below.

Installation
------------
Get Elasticsearch up and running somewhere. Elasticsearch v6.x is only supported but 6.5.4 or higher is
recommended. If you will be running Elasticsearch on a host separate from the mediawiki installation see
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html. Be careful with the
network configuration, never expose an unprotected node to the internet.

Place the CirrusSearch extension in your extensions directory.
You also need to install the Elastica MediaWiki extension.
Add this to LocalSettings.php:
 wfLoadExtension( 'Elastica' );
 wfLoadExtension( 'CirrusSearch' );
 $wgDisableSearchUpdate = true;

Configure your search servers in LocalSettings.php if you aren't running Elasticsearch on localhost:
 $wgCirrusSearchServers = [ 'elasticsearch0', 'elasticsearch1', 'elasticsearch2', 'elasticsearch3' ];
There are other $wgCirrusSearch variables that you might want to change from their defaults.

Now run this script to generate your elasticsearch index:
 php $MW_INSTALL_PATH/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php

Now remove $wgDisableSearchUpdate = true from LocalSettings.php.  Updates should start heading to Elasticsearch.

Next bootstrap the search index by running:
 php $MW_INSTALL_PATH/extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipLinks --indexOnSkip
 php $MW_INSTALL_PATH/extensions/CirrusSearch/maintenance/ForceSearchIndex.php --skipParse
Note that this can take some time.  For large wikis read "Bootstrapping large wikis" below.

Once that is complete add this to LocalSettings.php to funnel queries to ElasticSearch:
 $wgSearchType = 'CirrusSearch';

In the Wikibase instance that I used for documenting this issue, I didn't follow the steps (shown in the code block above) after performing all the steps mentioned in the README file of this repository, because I thought that when the Docker containers are created, all the necessary commands are executed.

@ross-spencer
Copy link

Another connected issue Rodrigo: #296

Perhaps sharing your .env file or other config details will help?

@rodrigo-morales-1
Copy link
Author

@ross-spencer Sure, this is my .env file. I'm using the same file from this version (i.e. I haven't made any modifications).

## Example / Template .env file for Wikibase release pipeline docker-compose example
# WARNING: Do not add comments on the same line as env vars, as in some environments they will be included in the var!

## Image Configuration
WIKIBASE_IMAGE_NAME=wikibase/wikibase:1.37.6-wmde.9
WDQS_IMAGE_NAME=wikibase/wdqs:0.3.115-wmde.9
WDQS_FRONTEND_IMAGE_NAME=wikibase/wdqs-frontend:wmde.9
ELASTICSEARCH_IMAGE_NAME=wikibase/elasticsearch:6.8.23-wmde.9
WIKIBASE_BUNDLE_IMAGE_NAME=wikibase/wikibase-bundle:1.37.6-wmde.9
QUICKSTATEMENTS_IMAGE_NAME=wikibase/quickstatements:wmde.9
WDQS_PROXY_IMAGE_NAME=wikibase/wdqs-proxy:wmde.9
MYSQL_IMAGE_NAME=mariadb:10.9

## Mediawiki Configuration
## Admin password
## Passwords must be at least 10 characters.
## Your password must be different from your username.
## Your password must not appear within your username.
## The password must not be in a list of very commonly used passwords. Please choose a unique password.
MW_ADMIN_PASS=change-this-password
MW_ADMIN_NAME=admin
[email protected]
MW_SECRET_KEY=some-secret-key
MW_WG_ENABLE_UPLOADS=false

## Jobrunner Configuration
MAX_JOBS=1

## Database Configuration
DB_NAME=my_wiki
DB_USER=sqluser
DB_PASS=change-this-sqlpassword

## Wikibase Configuration
WIKIBASE_PINGBACK=false
# wikibase.svc is the internal docker hostname, change this value to the public hostname
WIKIBASE_HOST=wikibase.svc
WIKIBASE_PORT=80

## WDQS-frontend Configuration
# wdqs-frontend.svc is the internal docker hostname, change this value to the public hostname
WDQS_FRONTEND_HOST=wdqs-frontend.svc
WDQS_FRONTEND_PORT=8834

## Quickstatements Configuration
# quickstatements.svc is the internal docker hostname, change this value to the public or local hostname
QS_PUBLIC_SCHEME_HOST_AND_PORT=http://localhost:8840
QUICKSTATEMENTS_HOST=quickstatements.svc
QUICKSTATEMENTS_PORT=8840

## ElasticSearch
## Comment out MW_ELASTIC_HOST to disable ElasticsSearch
## See https://github.com/wmde/wikibase-release-pipeline/blob/wmde.9/Docker/build/WikibaseBundle/LocalSettings.d.template/WikibaseCirrusSearch.php#L6
MW_ELASTIC_HOST=elasticsearch.svc
MW_ELASTIC_PORT=9200

@addshore
Copy link
Contributor

Hey hey, thanks for the report

I can confirm today that search with elastic search works with the wmde.9 release, but I did have some issues with the current docker-compose example.

Can you check the logs of the job runner and paste them here?

docker-compose -f docker-compose.yml -f docker-compose.extra.yml logs wikibase_jobrunner

Also what is the directory listing in your current job runner?

docker-compose -f docker-compose.yml -f docker-compose.extra.yml exec wikibase_jobrunner ls

And just to double check, what is the current entry point?

docker-compose -f docker-compose.yml -f docker-compose.extra.yml exec wikibase_jobrunner cat /entrypoint.sh

I believe that #359 may resolve your issues which changes the way settings are shared between the main wikibase container and the job runner container.

If you provide the information above I may be able to help further
You can also try the unmerged example with the wmde.9 release
But you'd need some updated files

@rodrigo-morales-1
Copy link
Author

@addshore Thanks for the response. Here's the information that you asked and some other information that I considered relevant.

Requested information

Can you check the logs of the job runner and paste them here?

I ran the command and the following message was printed 2013 times.

docker-compose -f docker-compose.yml -f docker-compose.extra.yml logs wikibase_jobrunner
(... omitted repeated lines ...)
wikibase-docker-wikibase_jobrunner-1  | /jobrunner-entrypoint.sh: /jobrunner-entrypoint.sh: Is a directory
(... omitted repeated lines ...)

I used wc to determine the number of times that line was being printed.

docker-compose -f docker-compose.yml -f docker-compose.extra.yml logs wikibase_jobrunner | wc -l
2013

I used sort -u to determine the unique lines in the output of that command.

docker-compose -f docker-compose.yml -f docker-compose.extra.yml logs wikibase_jobrunner | sort -u
wikibase-docker-wikibase_jobrunner-1  | /jobrunner-entrypoint.sh: /jobrunner-entrypoint.sh: Is a directory

Also what is the directory listing in your current job runner?

docker-compose -f docker-compose.yml -f docker-compose.extra.yml exec wikibase_jobrunner ls
time="2022-11-16T19:54:45-05:00" level=warning msg="The \"OAUTH_CONSUMER_KEY\" variable is not set. Defaulting to a blank string."
time="2022-11-16T19:54:45-05:00" level=warning msg="The \"OAUTH_CONSUMER_SECRET\" variable is not set. Defaulting to a blank string."
Error response from daemon: Container 7636d7ab255249a695d728787def480d6a76f1195ff4309b96c8c80a1150e133 is restarting, wait until the container is running

Also what is the directory listing in your current job runner?

docker-compose -f docker-compose.yml -f docker-compose.extra.yml exec wikibase_jobrunner cat /entrypoint.sh
time="2022-11-16T19:54:43-05:00" level=warning msg="The \"OAUTH_CONSUMER_KEY\" variable is not set. Defaulting to a blank string."
time="2022-11-16T19:54:43-05:00" level=warning msg="The \"OAUTH_CONSUMER_SECRET\" variable is not set. Defaulting to a blank string."
Error response from daemon: Container 7636d7ab255249a695d728787def480d6a76f1195ff4309b96c8c80a1150e133 is restarting, wait until the container is running

Additional information

These are the files that are in the directory where I ran docker-compose up. As you can see in the output below, there are two directories with name extra-install.sh and jobrunner-entrypoint.sh. I think these two directories are intended to be files because they use the .sh extension which is commonly used in files containing shell scripts.

find . -printf '%y %p\n'
d .
f ./docker-compose.yml
f ./docker-compose.extra.yml
d ./extra-install.sh
d ./jobrunner-entrypoint.sh
f ./.env

Here's the information that shows docker container.

docker container ls
CONTAINER ID   IMAGE                                    COMMAND                   CREATED      STATUS                           PORTS                                   NAMES
31636ab8f018   wikibase/quickstatements:wmde.9          "/bin/bash /entrypoi…"    2 days ago   Up 12 hours                      0.0.0.0:8840->80/tcp, :::8840->80/tcp   wikibase-docker-quickstatements-1
df1e67726056   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    2 days ago   Up 12 hours                                                              wikibase-docker-wdqs-updater-1
95c78bb9c34e   wikibase/wdqs-frontend:wmde.9            "/entrypoint.sh ngin…"    2 days ago   Up 12 hours                      0.0.0.0:8834->80/tcp, :::8834->80/tcp   wikibase-docker-wdqs-frontend-1
c200fcf5e6a6   wikibase/wdqs-proxy:wmde.9               "/bin/sh -c \"/entryp…"   2 days ago   Up 12 hours                      80/tcp                                  wikibase-docker-wdqs-proxy-1
7636d7ab2552   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /jobrunne…"    2 days ago   Restarting (126) 4 seconds ago                                           wikibase-docker-wikibase_jobrunner-1
3672563403a0   wikibase/wikibase-bundle:1.37.6-wmde.9   "/bin/bash /entrypoi…"    2 days ago   Up 12 hours                      0.0.0.0:80->80/tcp, :::80->80/tcp       wikibase-docker-wikibase-1
fce0d759309e   mariadb:10.9                             "docker-entrypoint.s…"    2 days ago   Up 12 hours                      3306/tcp                                wikibase-docker-mysql-1
a388d6e89ef8   wikibase/elasticsearch:6.8.23-wmde.9     "/usr/local/bin/dock…"    2 days ago   Up 10 hours                      9200/tcp, 9300/tcp                      wikibase-docker-elasticsearch-1
1beebae23587   wikibase/wdqs:0.3.115-wmde.9             "/entrypoint.sh /run…"    2 days ago   Up 12 hours                      9999/tcp                                wikibase-docker-wdqs-1

I searched the string jobrunner in .env, docker-compose.extra.yml and docker-compose.yml. This is what I found. I have referenced the same files from the Github repository because I haven't modified these files in my computer.

docker-compose.yml

wikibase_jobrunner:
image: "${WIKIBASE_BUNDLE_IMAGE_NAME}"
entrypoint: /bin/bash
command: /jobrunner-entrypoint.sh
links:
- mysql
depends_on:
- mysql
restart: always
volumes:
- shared:/shared/:ro
- ./jobrunner-entrypoint.sh:/jobrunner-entrypoint.sh
networks:
default:
aliases:
- wikibase-jobrunner.svc
environment:
<<: *wikibase_variables
MAX_JOBS: ${MAX_JOBS}

docker-compose.extra.yml

wikibase_jobrunner:
environment:
<<: *wikibase_extra_variables

template.env

## Jobrunner Configuration
MAX_JOBS=1

Personal thoughts

I think the problem has to do with jobrunner-entrypoint.sh being a directory, but I can't confirm this because I'm not familiar with that specific directory name and this is my first time managing a Wikibase instance.

@addshore
Copy link
Contributor

d ./extra-install.sh
d ./jobrunner-entrypoint.sh

These should be files not directories.
When using the docker-composer example you'll find these files on the same directory as the docker-compose file.
You need to copy these too.

If you still have a mostly empty set ups it'll be easiest to just run down, remove the volumes and recreate it all.

@rodrigo-morales-1
Copy link
Author

@addshore Thanks for the help. I downloaded the files extra-install.sh and jobrunner-entrypoint.sh and then executed the same command and everything worked fine.

$ docker-compose -f docker-compose.yml -f docker-compose.extra.yml up -d

Below I wrote some additional notes that are related to this issue.

Note 1

I'm a beginner Docker user and that was my first time running a Wikibase instance, so I'm not very familiar with the dependencies by Docker. When I read README.md, I thought that I didn't need to download extra-install.sh and jobrunner-entrypoint.sh, because the README.md only mentions the files docker-compose.yml, docker-compose.extra.yml and template.env (see relevant part below).

# Example docker-compose configuration
The example docker-compose configuration consists of two files:
* `docker-compose.yml` contains two services: wikibase and mysql
* `docker-compose.extra.yml` contains additional services such as wdqs, wdqs-frontend, elasticsearch and quickstatements
**We recommend you go through `docker-compose.extra.yml` and remove any unwanted services.**
**This configuration serves as an example of how the images could be used together and isn't production ready**
## Configure your installation
Copy `template.env` to `.env` and replace the passwords and secrets with your own.
## Running a Wikibase instance
To run a Wikibase instance on port 80 run the following command:
```
docker-compose up
```
This will start up the services defined in [docker-compose.yml](docker-compose.yml), a Wikibase instance, database and a job runner.

Would it be possible to be clear about the importance of those files? For example, something along these lines.

The files `extra-install.sh` and `jobrunner-entrypoint.sh` also need to be downloaded and placed in the same directory of `docker-compose.yml`, `docker-compose.extra.yml` and `.env`.

Note 2

I decided to use the tag wmde.9 instead of the commit that I referenced before to ensure that things are more stable. However, I noticed that the template.env file mentions some components from wmde.8 (see code block below).

## Image Configuration
WIKIBASE_IMAGE_NAME=wikibase/wikibase:1.36.4-wmde.8
WDQS_IMAGE_NAME=wikibase/wdqs:0.3.97-wmde.8
WDQS_FRONTEND_IMAGE_NAME=wikibase/wdqs-frontend:wmde.8
ELASTICSEARCH_IMAGE_NAME=wikibase/elasticsearch:6.8.23-wmde.8
WIKIBASE_BUNDLE_IMAGE_NAME=wikibase/wikibase-bundle:1.36.4-wmde.8
QUICKSTATEMENTS_IMAGE_NAME=wikibase/quickstatements:wmde.8
WDQS_PROXY_IMAGE_NAME=wikibase/wdqs-proxy:wmde.8
MYSQL_IMAGE_NAME=mariadb:10.9

For this reason, I decided to use the latest commit as of the time of this writing and everything seems to be working fine.

I'm not sure if it is possible to edit the files of a published tag in Git since I've never tried it before. If it were possible, I think it would be appropriate to edit that file since it could be confusing (e.g. a user creates an issue with regards to wmde.9, but that user is actually using components of wmde.8).

Note 3

Here's a summary of what happened for users that might find a similar issue: the mistake I made that caused this issue was that I didn't download the files extra-install.sh (permalink) and jobrunner-entrypoint.sh (permalink). These files are needed by Docker, but because I hadn't downloaded them, when I executed the Docker command, I had those unexpected behaviors mentioned in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants