wmde / wikibase-release-pipeline

BSD 3-Clause "New" or "Revised" License
46 stars 33 forks source link

WDQS - No matching records found for content added to main wikibase store #659

Closed felipe-mr1 closed 6 months ago

felipe-mr1 commented 6 months ago

I'm encountering an issue while working with the tags/wmde.17 branch and setting up the extended installation on my server, which includes Wikibase, WDQS, and Quickstatements. Despite adding data to Wikibase, I'm unable to retrieve any results when executing my query.

I've configured the necessary variables in my .env file

## 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=***
MW_ADMIN_NAME=***
MW_ADMIN_EMAIL=***
MW_SECRET_KEY=***
MW_WG_ENABLE_UPLOADS=false

## Jobrunner Configuration
MAX_JOBS=1

## Database Configuration
DB_NAME=my_wiki
DB_USER=sqluser
DB_PASS=***

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

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

## 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://qs.my.example:8010
QUICKSTATEMENTS_HOST=qs.my.example
QUICKSTATEMENTS_PORT=8010

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

and have not made any major changes to docker-compose.extra.yml

version: "3.4"

x-common-variables: &wikibase_extra_variables
  MW_ELASTIC_HOST: ${MW_ELASTIC_HOST}
  MW_ELASTIC_PORT: ${MW_ELASTIC_PORT}

services:
  wikibase:
    volumes:
      - quickstatements-data:/quickstatements/data
      - ./extra-install.sh:/extra-install.sh
    environment:
      <<: *wikibase_extra_variables
      QS_PUBLIC_SCHEME_HOST_AND_PORT:

  wikibase-jobrunner:
    environment:
      <<: *wikibase_extra_variables

  elasticsearch:
    image: "${ELASTICSEARCH_IMAGE_NAME}"
    restart: unless-stopped
    volumes:
      - elasticsearch-data:/usr/share/elasticsearch/data
    networks:
      default:
        aliases:
          - elasticsearch.svc
    environment:
      discovery.type: single-node
      ES_JAVA_OPTS: -Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true

  wdqs-frontend:
    image: "${WDQS_FRONTEND_IMAGE_NAME}"
    restart: unless-stopped
    ports:
      - "${WDQS_FRONTEND_PORT}:80"
    depends_on:
      - wdqs-proxy
    networks:
      default:
        aliases:
          - ${WDQS_FRONTEND_HOST}
    environment:
      - WIKIBASE_HOST
      - WDQS_HOST=wdqs-proxy.svc

  wdqs:
    image: "${WDQS_IMAGE_NAME}"
    restart: unless-stopped
    command: /runBlazegraph.sh
    # Set number of files ulimit high enough, otherwise blazegraph will abort with:
    # library initialization failed - unable to allocate file descriptor table - out of memory
    # Appeared on Docker 24.0.5, containerd 1.7.9, Linux 6.6.6, NixOS 23.11
    ulimits:
      nofile:
        soft: 32768
        hard: 32768
    volumes:
      - query-service-data:/wdqs/data
    networks:
      default:
        aliases:
          - wdqs.svc
    environment:
      - WIKIBASE_HOST
      - WDQS_HOST=wdqs.svc
      - WDQS_PORT=9999
    expose:
      - 9999

  wdqs-proxy:
    image: "${WDQS_PROXY_IMAGE_NAME}"
    restart: unless-stopped
    environment:
      - PROXY_PASS_HOST=wdqs.svc:9999
    depends_on:
      - wdqs
    networks:
      default:
        aliases:
          - wdqs-proxy.svc

  wdqs-updater:
    image: "${WDQS_IMAGE_NAME}"
    restart: unless-stopped
    command: /runUpdate.sh
    # Set number of files ulimit high enough, otherwise blazegraph will abort with:
    # library initialization failed - unable to allocate file descriptor table - out of memory
    # Appeared on Docker 24.0.5, containerd 1.7.9, Linux 6.6.6, NixOS 23.11
    ulimits:
      nofile:
        soft: 32768
        hard: 32768
    depends_on:
      - wdqs
      - wikibase
    networks:
      default:
        aliases:
          - wdqs-updater.svc
    environment:
      - WIKIBASE_HOST
      - WDQS_HOST=wdqs.svc
      - WDQS_PORT=9999
      - WIKIBASE_SCHEME
      # CONFIG - WIKIBASE_SCHEME can be set to 'https' if the updater should expect https concept uris

  quickstatements:
    image: "${QUICKSTATEMENTS_IMAGE_NAME}"
    restart: unless-stopped
    volumes:
      - quickstatements-data:/quickstatements/data
    ports:
      - "${QUICKSTATEMENTS_PORT}:80"
    depends_on:
      - wikibase
    networks:
      default:
        aliases:
          - ${QUICKSTATEMENTS_HOST}
    environment:
      - QUICKSTATEMENTS_HOST
      - QS_PUBLIC_SCHEME_HOST_AND_PORT
      - WB_PUBLIC_SCHEME_HOST_AND_PORT=http://${WIKIBASE_HOST}
      - WB_PROPERTY_NAMESPACE=122
      - "WB_PROPERTY_PREFIX=Property:"
      - WB_ITEM_NAMESPACE=120
      - "WB_ITEM_PREFIX=Item:"
      - OAUTH_CONSUMER_KEY=${OAUTH_CONSUMER_KEY}
      - OAUTH_CONSUMER_SECRET=${OAUTH_CONSUMER_SECRET}
      # This can be removed on release of WMDE15 to example
      - WIKIBASE_SCHEME_AND_HOST=http://${WIKIBASE_HOST}

volumes:
  LocalSettings:
  query-service-data:
  elasticsearch-data:
  quickstatements-data:
  mediawiki-mysql-data:

Executing this simple query, I only get results when I'm running Wikibase locally.

SELECT ?itemLabel
WHERE {
  wd:Q2 rdfs:label ?itemLabel.
  FILTER(LANG(?itemLabel) = "en")
}

That said, when I hover over the Item Q1, I get the correct title of the item wdqs

Is there something wrong with the configuration?

felipe-mr1 commented 6 months ago

I switched to the tags/wmde.20 branch and now WDQS and QS are working fine.