Skip to content

Frequently Asked Questions

Andreas Both edited this page Oct 10, 2022 · 2 revisions
Table of Contents

Q: For quality benchmarks, the Qanary components have to execute the same tasks many times. Can I speed up the process?

Several components support caching. It just needs to be configured. To do so, you need to define the environment parameter qanary.webservicecalls.cache.specs. As in Qanary the Caffeine caching library is used, the configuration is done with the Caffeine syntax.

Example: application.properties

qanary.webservicecalls.cache.specs=maximumSize=33333,expireAfterAccess=360s

Example: docker-compose.yml

Here while configuring the Qanary QAnswer component:

version: "3.7"
services: 
    qb-qanswer: 
        image: qanary/qanary-component-qbe-qanswer:latest
        ports:
            - 11022:11022
        restart: unless-stopped
        environment:
            - SERVER_PORT=11022
            - SPRING_BOOT_ADMIN_URL=http://localhost:8080
            - SERVER_HOST=http://localhost
            - SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE-BASE-URL=http://localhost:11022
            - QANARY.WEBSERVICECALLS.CACHE.SPECS=maximumSize=33333,expireAfterAccess=360s
        network_mode: host

Q: While starting a component, I received an error message. How can I solve it?

I developed a component, while starting it, the following error message is printed.

Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2017-02-10 20:50:36.978  INFO 8217 --- [           main] e.w.qanary.geospatialsearch.Application  : No active profile set, falling back to default profiles: default
2017-02-10 20:50:42.541  INFO 8217 --- [           main] e.w.q.component.QanaryServiceController  : qanaryComponent: eu.wdaqua.qanary.geospatialsearch.RelationDetection@84b1aae
2017-02-10 20:50:45.622  INFO 8217 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2017-02-10 20:50:46.219 ERROR 8217 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Failed to start end point associated with ProtocolHandler ["http-nio-5555"]

A: Please check for duplicate port use.

While starting a component, it is bound to a port on your machine. If you run several components on your machine, you have to ensure that all components use different ports. To check this at a (Linux) shell, you can use the following command to check the currently used ports (execute in your main Qanary development directory):

grep -R --exclude-dir="target" "server\.port=" | sort

Q: How can I skip building the Docker image?

Building the Docker instances of the Qanary components takes some time and disk space. Can I skip the creation of the Docker images?

A: Skip the Docker instances with the Maven parameter -DskipDockerBuild.

While building the Qanary components with Maven, you can add the switch -DskipDockerBuild, e.g.:

mvn -DskipDockerBuild package

You can see the effect in the output:

[INFO] Skipping docker build
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Note: Only an executable JAR is created (see folder: /<componentname>/target).

Q: How do I create a Docker image?

A: For Components built with Maven, a Docker image is created automatically.

Note: If your component does not use Maven (i.e., components built with Python), you can find more detailed information here: How-do-I-get-Docker-images-for-Qanary-components?.

Q: How do I push a Docker image to Dockerhub?

A: Images can be pushed to Dockerhub using the command line

Push an image to Dockerhub using docker push repository/image:tag, where repository is your Dockerhub repository where the image should be published.

Note: you need to be logged in with your credentials: docker login

Q: How can I identify the available components in a Qanary system?

A: Look at the component’s configuration (mostly application.properties) or the Web-based Qanary Pipeline admin interface.

Option 1: While running, each component provides an identifier to the Qanary system where it is registered (note: make sure it actually has registered itself). It is defined (and can be changed) in the file application.properties (see also this note about configuration) of each component using the property spring.application.name (e.g., here for the Qanary DBpedia Spotlight NER Component).

Option 2: While starting the Qanary Pipeline, a Web-based admin interface is provided at the pipeline’s port. For example, while running your Qanary Pipeline on port 8080 at your localhost (see exemplary configuration), the admin interface will be available at http://localhost:8080/. The admin interface provides a Web page containing a table representing the registered (hence, available) components and their names.

Note: These component names are required to define a Qanary Pipeline.

Q: Is there a simple UI to configure and run a Qanary system?

A: A very simple Web UI already contained in the Qanary pipeline template.

See <yourserver>:<yourport>/startquestionansweringwithtextquestion to set up a simple Qanary pipeline using the currently available components.

While using the default configuration, this frontend would be available at http://localhost:8080/startquestionansweringwithtextquestion.

Q: Why does the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion) not allow queries to the Qanary triplestore?

When using the tab find computed query the request returns Unauthorized (#401). The same happens for all tabs using the Qanary triplestore endpoint.

A: Querying the Qanary triplestore requires custom headers.

For more details, see the tutorial Setting-custom-headers-in-YASGUI-tabs.

Q: An answer query was stored in the Qanary triplestore. Why can’t I add it to a new Yasgui tab in the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion)?

Your Qanary process computed an answer query that was stored in the Qanary triplestore. However, while using the button Add the computed SPARQL query of your Question Answering process as a new SPARQL query tab the created query does not appear (automatically) in one of the Yasgui tabs.

A: This is likely caused by the Web browser prohibiting access to a non-HTTPS connection.

To make sure this is not a problem with the frontend implementation, please test the functionality in a different Web browser.

If the problem only exists in Firefox, then the tutorial might provide a solution.

Q: I want to use another triplestore than the current support triplestores. What do I need to do?

A: To integrate support for another triplestore, implement the abstract class QanaryTripleStoreConnector in qanary.commons package.

There, just a couple of methods need to be implemented to provide specific support for your triplestore. Important: Just one triplestore provide is allowed to be activated while starting a Qanary system. Using the Spring annotation ConditionalOnProperty has proven to be useful to ensure a direct connection between config parameters and one specific class (examples: here and here).

A: You need to provide specific configuration parameters.

The problem is caused by the Internet access configuration of your Openlink Virtuoso instance. Therefore, the Virtuoso cannot access the public endpoints where the ontology definitions are available. E.g., the following SPARQL query cannot be executed:

LOAD <http://www.w3.org/ns/oa.rdf> INTO GRAPH <urn:graph:...>

A: Add a proxy configuration.

To solve the problem, add the following attributes to your virtuoso.ini to enable access to the proxy server address in your network:

[HTTPServer]
HTTPProxyEnabled            = 1
HTTPProxyServer             = $INSERT-YOUR-PROXY-SERVER-ADDRESS$
HTTPProxyExceptions         = localhost,127.0.0.1

Remark: Thanks to gyej7354 for providing the solution.

Clone this wiki locally