Curl error 52: Empty reply from server when trying to annotate with dbpedia spotlight docker

@lucas0, It is interesting that the process is killed at that point.

Please try the following docker-compose without changing the configuration and let’s see if with another configuration and a medium-size language model it is possible to make it run:

version: '3.5'
  services:
    spotlight.it:
      image: dbpedia/dbpedia-spotlight
      container_name: dbpedia-spotlight.it
      volumes:
         - dbp-model:/opt/spotlight/models
      restart: unless-stopped
      ports:
         - "0.0.0.0:2223:80"
      command: /bin/spotlight.sh it
 
 
  volumes:
    dbp-model:
      external: true

@JulioNoe Thanks once more for the patience and time demanded to this issue. I have tried with italian and the model starts:

docker-compose -f spotlight-compose-it.yml up
Creating dbpedia-spotlight.it ... done
Attaching to dbpedia-spotlight.it
dbpedia-spotlight.it | Selected language: it
dbpedia-spotlight.it |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.it |                                  Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291     51    559  0:00:02  0:00:02 --:--:--   611
dbpedia-spotlight.it | http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=it.tar.gz
dbpedia-spotlight.it |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.it |                                  Dload  Upload   Total   Spent    Left  Speed
100  576M  100  576M    0     0  1885k      0  0:05:13  0:05:13 --:--:-- 1126k
dbpedia-spotlight.it | it/
dbpedia-spotlight.it | it/spotter_thresholds.txt
dbpedia-spotlight.it | it/fsa_dict.mem
dbpedia-spotlight.it | it/model.properties
dbpedia-spotlight.it | it/model/
dbpedia-spotlight.it | it/model/sf.mem
dbpedia-spotlight.it | it/model/context.mem
dbpedia-spotlight.it | it/model/candmap.mem
dbpedia-spotlight.it | it/model/res.mem
dbpedia-spotlight.it | it/model/quantized_counts.mem
dbpedia-spotlight.it | it/model/tokens.mem
dbpedia-spotlight.it | it/stopwords.list
dbpedia-spotlight.it | /opt/spotlight/models/it http://0.0.0.0:80/rest/
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (38 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2391 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (7710 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (5066 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2606 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (27716 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (510 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.

when the curl request is sent, it also receives the error 52, and the docker container is killed:

Selected language: it
/opt/spotlight/it http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (36 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (1876 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (7152 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (4114 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (3517 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (15108 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (491 ms)
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.
ott 20, 2021 3:44:55 PM com.sun.grizzly.Controller logVersion
INFORMAZIONI: GRIZZLY0001: Starting Grizzly Framework 1.9.48 - 20/10/21 15.44
Server started in /opt/spotlight listening on http://0.0.0.0:80/rest
[main] INFO org.dbpedia.spotlight.web.rest.Server -  Core threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server -   Max threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server - Max POST size: 2097152
ott 20, 2021 3:46:51 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFORMAZIONI: Scanning for root resource and provider classes in the packages:
  org.dbpedia.spotlight.web.rest.resources
ott 20, 2021 3:46:58 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFORMAZIONI: Root resource classes found:
  class org.dbpedia.spotlight.web.rest.resources.Annotate
  class org.dbpedia.spotlight.web.rest.resources.Disambiguate
  class org.dbpedia.spotlight.web.rest.resources.Feedback
  class org.dbpedia.spotlight.web.rest.resources.Candidates
  class org.dbpedia.spotlight.web.rest.resources.Spot
ott 20, 2021 3:46:58 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFORMAZIONI: No provider classes found.
ott 20, 2021 3:46:58 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFORMAZIONI: Initiating Jersey application, version 'Jersey: 1.19.3 10/24/2016 03:58 PM'
ott 20, 2021 3:47:17 PM com.sun.jersey.api.wadl.config.WadlGeneratorLoader loadWadlGenerator
INFORMAZIONI: Loading wadlGenerator org.dbpedia.spotlight.web.rest.wadl.ExternalUriWadlGenerator
ott 20, 2021 3:47:18 PM com.github.fommil.netlib.BLAS <clinit>
AVVERTENZA: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
ott 20, 2021 3:47:18 PM com.github.fommil.netlib.BLAS <clinit>
AVVERTENZA: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS
Killed

any solutions to that?

The critical line is: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS. But I am not very interested in solving this problem, as the Italian spotlight is of no use to my application. I am more interested into solving the issue regarding the starting up the english version.

Best,
Lucas

@lucas0 could you please post the following curl output, thanks

curl -v http://localhost:2223/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"

I will check that failure but it is not related with your problem. I also get this one when I send a curl request but the process continues normally.

@JulioNoe here it goes:

curl -v http://localhost:2223/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 2223 (#0)
> POST /rest/annotate HTTP/1.1
> Host: localhost:2223
> User-Agent: curl/7.54.0
> Accept: text/turtle
> Content-Length: 268
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 268 out of 268 bytes
< HTTP/1.1 200 OK
< server: grizzly/1.9.48
< Access-Control-Allow-Origin: *
< Content-Type: text/turtle
< Transfer-Encoding: chunked
< Date: Wed, 20 Oct 2021 17:10:13 GMT
<
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://www.dbpedia-spotlight.com/#collection>
        a               nif:ContextCollection ;
        nif:hasContext  <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        <http://purl.org/dc/terms/conformsTo>
                <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1> .

<http://www.dbpedia-spotlight.com/#offset_122_129>
        a                       nif:Phrase , nif:OffsetBasedString ;
        nif:anchorOf            "package" ;
        nif:beginIndex          "122"^^xsd:nonNegativeInteger ;
        nif:endIndex            "129"^^xsd:nonNegativeInteger ;
        nif:referenceContext    <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        itsrdf:taAnnotatorsRef  <http://www.dbpedia-spotlight.com> ;
        itsrdf:taConfidence     "0.6696210703350648"^^xsd:double ;
        itsrdf:taIdentRef       <http://dbpedia.org/resource/Package_(elettronica)> .

<http://www.dbpedia-spotlight.com/#offset_0_189>
        a               nif:OffsetBasedString , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "189"^^xsd:nonNegativeInteger ;
        nif:isString    "President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." .

<http://www.dbpedia-spotlight.com/#offset_10_15>
        a                       nif:OffsetBasedString , nif:Phrase ;
        nif:anchorOf            "Obama" ;
        nif:beginIndex          "10"^^xsd:nonNegativeInteger ;
        nif:endIndex            "15"^^xsd:nonNegativeInteger ;
        nif:referenceContext    <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        itsrdf:taAnnotatorsRef  <http://www.dbpedia-spotlight.com> ;
        itsrdf:taClassRef       <http://dbpedia.org/ontology/Person> , <http://www.wikidata.org/entity/Q5> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson> , <Http://xmlns.com/foaf/0.1/Person> , <http://www.wikidata.org/entity/Q215627> , <http://dbpedia.org/ontology/Agent> , <http://schema.org/Person> , <http://www.wikidata.org/entity/Q82955> , <http://www.wikidata.org/entity/Q24229398> , <http://dbpedia.org/ontology/Politician> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent> ;
        itsrdf:taConfidence     "0.9999996709445869"^^xsd:double ;
        itsrdf:taIdentRef       <http://dbpedia.org/resource/Barack_Obama> .
* Connection #0 to host localhost left intact

Apparently it works… is the -v flag all I needed? I mean, with the exception that the english model doesnt start apparently for memory reasons…

@lucas0, the -v flag is just to get more information about your request. In this case, everything goes ok, but in other cases it could be used to understand where the problem is.

@JulioNoe From this github issue it seems that the problem is not with the host machine’s RAM, but with the allowance for the java engine of the container.

The last comment suggests that using the -e JAVA_OPTS='-Xmx16g' on the java run call would solve it. That seems to increase the limit for the java engine to 16GB. I was suspecting that this was the case as the model would be killed precisely at 4GB RAM usage.

Also, from other sources, it seems that you can increase the RAM allowance for docker and so I did:

When I run the same docker-compose, the logs advance a bit further but the process is still killed after a while what makes me wonder if it needs even more RAM. Is this supposed to be that RAM greedy?

docker-compose -f spotlight-compose.yml up
Creating network "lux_default" with the default driver
Creating dbpedia-spotlight.en ... done
Attaching to dbpedia-spotlight.en
dbpedia-spotlight.en | Selected language: en
dbpedia-spotlight.en | /opt/spotlight/en http://0.0.0.0:80/rest/
dbpedia-spotlight.en | Picked up _JAVA_OPTIONS: -Xmx12g -Xms12g -XX:MaxPermSize=1024m
dbpedia-spotlight.en | OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (54 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (1859 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (10381 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (3027 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (1855 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
dbpedia-spotlight.en | Killed

I haven’t managed to set the _JAVA_OPTS variable within the .yml file, so that could be tested, since just modifying the docker preferences didn’t solved it. I have tried the suggestions included on the stackoverflow answer linked above to no avail. Can I have any help with that? How should I modify my .yml below?

version: '3.5'
services:
    spotlight.en:
        image: dbpedia/dbpedia-spotlight
        container_name: dbpedia-spotlight.en
        volumes:
            - spotlight-models:/opt/spotlight/models
        restart: unless-stopped
        ports:
            - "0.0.0.0:2222:80"
        command: /bin/spotlight.sh en

volumes:
    spotlight-models:
        external: true

Best Regards,
Lucas.

Increasing the memory on the docker application to 12GB while also setting the cache to 4GB allows the model to start and the curl requests to work properly. That is a solution.

I just want to know if there are other solutions that do not demand such massive amount of memory to be allocated to a docker image, since I will be using that image along with other applications.

Thanks for the time and attention demanded.
Best Regards,
Lucas.

1 Like

Hi @lucas0,

Thanks for the updates!!, they are really helpful.

It seems that the problem is not related to Java memory. The problem is more related to Docker memory and how Mac OS handles it. Here is the link to docker documentation which mentions something about this (related to what you already found :+1: ):

  • Memory: By default, Docker Desktop is set to use 2 GB runtime memory, allocated from the total available memory on your Mac. To increase the RAM, set this to a higher number. To decrease it, lower the number.

On the contrary, for a Linux system, the limited memory is the memory of the host. Also, the Docker documentation for Linux does not mention anything about the limit of memory used for docker. That explains why in an 8 GB system, I was able to run the English model (by the way, it consumes all the RAM but it was able to run it).

Then, the amount of memory needed to run the English model is >8GB, and, in the case of Mac OS, the docker configuration for RAM is important to take into consideration.

Thanks again for the feedback, I hope this information helps you.

1 Like

Hey I am experiencing a similar issue.

I followed your advice on using the spotlight-compose.yml file. I also increased the RAM to 14 GB. ( Also used the lt-model because its the smallest for testing). The download seems to work according to the logs below:

$ docker logs dbpedia-spotlight.lt
Selected language: lt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291     44    483  0:00:02  0:00:02 --:--:--   529
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=lt.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100 34.5M  100 34.5M    0     0  3983k      0  0:00:08  0:00:08 --:--:-- 5087k
lt/
lt/spotter_thresholds.txt
lt/fsa_dict.mem
lt/model.properties
lt/model/
lt/model/sf.mem
lt/model/context.mem
lt/model/candmap.mem
lt/model/res.mem
lt/model/quantized_counts.mem
lt/model/tokens.mem
lt/stopwords.list
/opt/spotlight/models/lt http://0.0.0.0:80/rest/

But after this the rest of the logs are empty. According to your previous conversation the

Loading MemoryContextStore...

should start. But it does not.

You also said that once the log: dbpedia-spotlight.es | /opt/spotlight/es http://0.0.0.0:80/rest/ appears I am good to send a request. But the request still returns an empty reply from the server.

$ curl http://localhost:2224/rest/annotate \
   --data-urlencode \
   "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
--data "confidence=0.35" -H "Accept: text/turtle"
curl: (52) Empty reply from server 

I really do not know what I am doing wrong. Help would be greatly appreciated since I spend two days on this problem.
Best wishes!

Hi @mingaflo,

Thanks for writing. My first question: are you using a Mac OS?. The output from the log must be something like this:

docker-compose -f spotlight-compose-it.yml up
Creating dbpedia-spotlight.it ... done
Attaching to dbpedia-spotlight.it
dbpedia-spotlight.it | Selected language: it
dbpedia-spotlight.it |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.it |                                  Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291     51    559  0:00:02  0:00:02 --:--:--   611
dbpedia-spotlight.it | http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=it.tar.gz
dbpedia-spotlight.it |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.it |                                  Dload  Upload   Total   Spent    Left  Speed
100  576M  100  576M    0     0  1885k      0  0:05:13  0:05:13 --:--:-- 1126k
dbpedia-spotlight.it | it/
dbpedia-spotlight.it | it/spotter_thresholds.txt
dbpedia-spotlight.it | it/fsa_dict.mem
dbpedia-spotlight.it | it/model.properties
dbpedia-spotlight.it | it/model/
dbpedia-spotlight.it | it/model/sf.mem
dbpedia-spotlight.it | it/model/context.mem
dbpedia-spotlight.it | it/model/candmap.mem
dbpedia-spotlight.it | it/model/res.mem
dbpedia-spotlight.it | it/model/quantized_counts.mem
dbpedia-spotlight.it | it/model/tokens.mem
dbpedia-spotlight.it | it/stopwords.list
dbpedia-spotlight.it | /opt/spotlight/models/it http://0.0.0.0:80/rest/
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (38 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2391 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (7710 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (5066 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2606 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (27716 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (510 ms)
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
dbpedia-spotlight.it | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.

If you are using Mac OS the recommendation from Lucas could help:

Increasing the memory on the docker application to 12GB while also setting the cache to 4GB allows the model to start and the curl requests to work properly. That is a solution.

If any of this help, please let me know your system configuration and the example you are running. Thanks, have a great day.

My best regards

Julio

Hi Julio,

thank you so much for the reply.
Yes I am on MacOS (MacBook Pro with a M1 Chip if that matters) and I managed to find a way to make some progress just now. But only without docker:

 # download main jar
wget https://sourceforge.net/projects/dbpedia-spotlight/files/spotlight/dbpedia-spotlight-1.0.0.jar
# download latest model (assuming en model)
wget -O en.tar.gz http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2020.11.18/spotlight-model_lang%3den.tar.gz
# extract model
tar xzf en.tar.gz
# run server
java -jar dbpedia-spotlight-1.0.0.jar en http://localhost:2222/rest

Doing that I encountered the issue that java was not installed so i got that and set the memory to export JAVA_OPTS=-Xmx16g. I was then able to at least not get an empty response but a javax.servlet.ServletException which I don’t understand.

But I am actually interested to get it running as a docker!
I set the docker application on Mac to this:

That should be more than enough.
I tried adding -e JAVA_OPTS='-Xmx16g' as well to the docker run command, with no success.

docker run -ti \
 -e JAVA_OPTS='-Xmx16g' --restart unless-stopped \
 --name dbpedia-spotlight.de \
 --mount source=spotlight-models,target=/opt/spotlight \
 -p 2222:80 \
 dbpedia/dbpedia-spotlight \
 spotlight.sh de

With docker-compose I managed to get part of the logs you are talking about. I got everything until dbpedia-spotlight.it | /opt/spotlight/models/it http://0.0.0.0:80/rest/ but everything following just does not show up.

But I do get them when running the above java-command:
java -jar dbpedia-spotlight-1.0.0.jar de http://localhost:2222/rest


This is the output of docker-compose (when running it again):

docker-compose -f spotlight-compose.yml up
[+] Running 2/2
 ⠿ Network spotlight-docker_default  Created                               0.0s
 ⠿ Container dbpedia-spotlight.lt    C...                                  0.1s
Attaching to dbpedia-spotlight.lt
dbpedia-spotlight.lt  | Selected language: lt
dbpedia-spotlight.lt  | /opt/spotlight/lt http://0.0.0.0:80/rest/

I am not able to insert anything suggesting something is happening in the background, but the logs only show this:

Selected language: lt
/opt/spotlight/lt http://0.0.0.0:80/rest/

Sending a curl just returns an empty reply.

Any ideas?

ok yeah the curl- Error looks like something is not downloading.

~ docker-compose -f spotlight.yml up
[+] Running 1/0
 ⠿ Container dbpedia-spotlight.de2  Created                                                                                              0.1s
Attaching to dbpedia-spotlight.de2
dbpedia-spotlight.de2  | Selected language: de
dbpedia-spotlight.de2  |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.de2  |                                  Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    262   2849 --:--:-- --:--:-- --:--:--  3154
dbpedia-spotlight.de2  | http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=de.tar.gz
dbpedia-spotlight.de2  |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.de2  |                                  Dload  Upload   Total   Spent    Left  Speed


 95 1003M   95  959M    0     0  1525k      0  0:11:13  0:10:43  0:00:30  706k
dbpedia-spotlight.de2  | curl: (18) transfer closed with 46329422 bytes remaining to read
dbpedia-spotlight.de2  | de/
dbpedia-spotlight.de2  | tar: unexpected end of file
dbpedia-spotlight.de2  | tar: short read
dbpedia-spotlight.de2  | de/spotter_thresholds.txt
dbpedia-spotlight.de2  | de/fsa_dict.mem
dbpedia-spotlight.de2  | de/model.properties
dbpedia-spotlight.de2  | de/model/
dbpedia-spotlight.de2  | de/model/sf.mem
dbpedia-spotlight.de2  | de/model/context.mem
dbpedia-spotlight.de2  | de/model/candmap.mem
dbpedia-spotlight.de2  | de/model/res.mem
dbpedia-spotlight.de2  | /opt/spotlight/models/de http://0.0.0.0:80/rest/

Hi @mingaflo,

Thank you so much for your postings. According to your feedback, and considering the experience with Lucas, sometimes the download process fails. Then, it is necessary to alert if something wrong happens with the model downloading process. Thanks again for the feedback and the support information.

@JulioNoe What do you mean with “it is necessary to alert if something wrong happens”?

For smaller languages like it or lt the curl works always. But it still does not run the java commands I checked spotlight.sh in the docker. It seams like the error happens in there.
But because of the lack of echos its hard to track where to programm is.

#!/bin/sh

LANG=$1

MODELFOLDER=/opt/spotlight
cd $MODELFOLDER

DIRECTORY=/opt/spotlight/models/$LANG
echo "Selected language: $LANG"
if [ -d "$DIRECTORY" ]
then
     echo "/opt/spotlight/$LANG http://0.0.0.0:80/rest/"
     if [[ $LANG == "en" ]]
     then
	 java -Dfile.encoding=UTF-8 -Xmx15G -jar /opt/spotlight/dbpedia-spotlight.jar /opt/spotlight/models/$LANG http://0.0.0.0:80/rest
     else
	 java -Dfile.encoding=UTF-8 -Xmx10G -jar /opt/spotlight/dbpedia-spotlight.jar /opt/spotlight/models/$LANG http://0.0.0.0:80/rest
     fi

else
      QUERY="PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
      PREFIX dataid-cv: <http://dataid.dbpedia.org/ns/cv#>
      PREFIX dct: <http://purl.org/dc/terms/>
      PREFIX dcat:  <http://www.w3.org/ns/dcat#>

      SELECT DISTINCT ?file WHERE {
 	?dataset dataid:artifact <https://databus.dbpedia.org/dbpedia/spotlight/spotlight-model> .
	?dataset dcat:distribution ?distribution .
	{
		?distribution dct:hasVersion ?latestVersion
		{
			SELECT (?version as ?latestVersion) WHERE {
				?dataset dataid:artifact <https://databus.dbpedia.org/dbpedia/spotlight/spotlight-model> .
				?dataset dct:hasVersion ?version .
			} ORDER BY DESC (?version) LIMIT 1
		}
                ?distribution dataid:contentVariant '$LANG'^^xsd:string .
	}
	?distribution dcat:downloadURL ?file .
       }"

      RESULT=`curl --data-urlencode query="$QUERY" --data-urlencode format="text/tab-separated-values" https://databus.dbpedia.org/repo/sparql | sed 's/"//g' | grep -v "^file$" | head -n 1 `
      echo $RESULT
      curl -O  $RESULT
      tar -C /opt/spotlight/models -xvf spotlight-model_lang=$LANG.tar.gz
      rm spotlight-model_lang=$LANG.tar.gz
      echo "/opt/spotlight/models/$LANG http://0.0.0.0:80/rest/"
      if [[ $LANG == "en" ]]
      then
	java -Dfile.encoding=UTF-8 -Xmx15G -jar /opt/spotlight/dbpedia-spotlight.jar /opt/spotlight/models/$LANG http://0.0.0.0:80/rest
       else
	 java -Dfile.encoding=UTF-8 -Xmx10G -jar /opt/spotlight/dbpedia-spotlight.jar /opt/spotlight/models/$LANG http://0.0.0.0:80/rest
      fi

fi
/bin #

Since the directory does not exist during the first run, it goes into the else statement and echos
dbpedia-spotlight.it | /opt/spotlight/models/it http://0.0.0.0:80/rest/ but then the java call just doesn’t do anything. And without any error-messages I am quite lost here.

Why is that?

Also after that the CPU Usage is at 100%.

running java inside the docker cli also doesn’t do anything.
Update:
Scratch that ps in the CLI tells me that java is running:

$ ps
PID   USER     TIME  COMMAND
    1 root      0:00 {spotlight.sh} /usr/bin/qemu-x86_64 /bin/sh /bin/spotlight.sh lt
   36 root      1:49 {java} /usr/bin/qemu-x86_64 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Dfile.encoding=UTF-8 -X
   41 root      0:00 {sh} /usr/bin/qemu-x86_64 /bin/sh
   66 root      0:00 /bin/ps

Hi @mingaflo,

About the:

What do you mean with “it is necessary to alert if something wrong happens”?

Prompt a message about the error (the download fails), specifically in the part:

curl -O $RESULT

Even when the download fails: the script continues with the following lines

tar -C /opt/spotlight/models -xvf spotlight-model_lang=$LANG.tar.gz
rm spotlight-model_lang=$LANG.tar.gz
echo "/opt/spotlight/models/$LANG http://0.0.0.0:80/rest/"

The following command is also executed (considering that the language model is not “en”)

 java -Dfile.encoding=UTF-8 -Xmx10G -jar /opt/spotlight/dbpedia-spotlight.jar /opt/spotlight/models/$LANG http://0.0.0.0:80/rest

after that, the DBpedia Spotlight service is started with errors… (that why you saw java running)

In summary, a model download failure will result in a running service with errors.

I will update the script to avoid the execution of the DBpedia Spotlight service when the model download fails. Thanks again for the feedback… have a great day.

The problem persist even if the download does not fail.
As I mentioned: For small languages the download succeeds but the java download still fails / does not print any updates. Even though it is running.

Any ideas why that is? It’s alright if you don’t have any :slight_smile:
I just wanted to clarify what is happening if someone has a similar issue. I didn’t find a fix. I will update if I find something.

Hi @mingaflo,

Please, could you share your YML file to reproduce the process?.

In the meantime, please could you try the following:

docker run -tid --restart unless-stopped --name dbpedia-spotlight.lt --mount source=models,target=/opt/spotlight -p 2222:80 dbpedia/dbpedia-spotlight spotlight.sh lt

This is the desired output:

$ docker logs dbpedia-spotlight.lt
Selected language: lt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    351   3808 --:--:-- --:--:-- --:--:--  4159
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=lt.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 34.5M  100 34.5M    0     0  9222k      0  0:00:03  0:00:03 --:--:-- 9219k
lt/
lt/spotter_thresholds.txt
lt/fsa_dict.mem
lt/model.properties
lt/model/
lt/model/sf.mem
lt/model/context.mem
lt/model/candmap.mem
lt/model/res.mem
lt/model/quantized_counts.mem
lt/model/tokens.mem
lt/stopwords.list
/opt/spotlight/models/lt http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (15 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (81 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (279 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (79 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (91 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (480 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (18 ms)
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.
Grd 10, 2021 3:58:04 PM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.48 - 21.12.10 15.58
Server started in /opt/spotlight listening on http://0.0.0.0:80/rest
[main] INFO org.dbpedia.spotlight.web.rest.Server -  Core threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server -   Max threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server - Max POST size: 2097152

After that:

curl http://localhost:2222/rest/annotate \
    --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
    --data "confidence=0.35" \
    -H "Accept: text/turtle"

the desired output:

@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://www.dbpedia-spotlight.com/#collection>
        a               nif:ContextCollection ;
        nif:hasContext  <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        <http://purl.org/dc/terms/conformsTo>
                <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1> .

<http://www.dbpedia-spotlight.com/#offset_0_189>
        a               nif:OffsetBasedString , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "189"^^xsd:nonNegativeInteger ;
        nif:isString    "President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." .

Thanks and have a great day.

When running the above docker run-command I get the following:

$ docker run -tid --restart unless-stopped --name dbpedia-spotlight.lt --mount     source=models,target=/opt/spotlight -p 2222:80 dbpedia/dbpedia-spotlight spotlight.sh lt
Unable to find image 'dbpedia/dbpedia-spotlight:latest' locally
latest: Pulling from dbpedia/dbpedia-spotlight
e7c96db7181b: Pull complete
f910a506b6cb: Pull complete
b6abafe80f63: Pull complete
54cd1b8a02b8: Pull complete
8e0905f6c0f0: Pull complete
cc062f7b308d: Pull complete
45efe250a884: Pull complete
Digest: sha256:89cd13d0ea29b7a0869ead2553d652219552b2d6bb2e85780ed6d9fb3ed42a0b
Status: Downloaded newer image for dbpedia/dbpedia-spotlight:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
1dcf8eb49fbade126ec843a76c4cfe773e7a6daa1ee8c8e3825741fd74467acdt by 4 spaces

Regarding the Warning. I tried adding --platform linux/amd64 but the resulting logs are the same.
The logs look like this:

$ docker logs dbpedia-spotlight.lt

Selected language: lt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    293   3179 --:--:-- --:--:-- --:--:--  3507
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=lt.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 34.5M  100 34.5M    0     0  1972k      0  0:00:17  0:00:17 --:--:-- 2538k
lt/
lt/spotter_thresholds.txt
lt/fsa_dict.mem
lt/model.properties
lt/model/
lt/model/sf.mem
lt/model/context.mem
lt/model/candmap.mem
lt/model/res.mem
lt/model/quantized_counts.mem
lt/model/tokens.mem
lt/stopwords.list
/opt/spotlight/models/lt http://0.0.0.0:80/rest/

The curl afterwards returns nothing:

$ curl http://localhost:2222/rest/annotate \
    --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
    --data "confidence=0.35" \
    -H "Accept: text/turtle"
curl: (52) Empty reply from server

My .yml file looks like this:

version: '3.5'
services:
    spotlight.lt:
        image: dbpedia/dbpedia-spotlight
        container_name: dbpedia-spotlight.lt2
        volumes:
            - spotlight-models:/opt/spotlight/models
        restart: unless-stopped
        ports:
            - "0.0.0.0:2223:80"
        command: /bin/spotlight.sh lt

volumes:
    spotlight-models:
        external: true

Hi @mingaflo,

It seems this warning is the main problem and according to the following quote it could be solved by changing the docker version (solution for Mac):

Source: https://github.com/google/cadvisor/issues/2763#issuecomment-757421498:
This is a docker problem in version 20.
Version 19 should work fine.
see docker/for-linux#1170 (comment)

But, this is just one solution. The other solution is to build the docker image in your own machine:

$ git clone https://github.com/dbpedia-spotlight/spotlight-docker.git
$ cd spotlight-docker
$ docker build -t dbpedia-spotlight-local --platform linux/amd64 .
$ docker run -tid --restart unless-stopped --name dbpedia-spotlight.lt --mount     source=models,target=/opt/spotlight -p 2222:80 dbpedia-spotlight-local spotlight.sh lt

and the output will be:

$ docker logs dbpedia-spotlight.lt 
Selected language: lt
/opt/spotlight/lt http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (16 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (83 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (289 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (86 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (103 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (661 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (23 ms)
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
[main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.
Grd 15, 2021 9:54:50 AM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.48 - 21.12.15 09.54
Server started in /opt/spotlight listening on http://0.0.0.0:80/rest
[main] INFO org.dbpedia.spotlight.web.rest.Server -  Core threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server -   Max threads: 5
[main] INFO org.dbpedia.spotlight.web.rest.Server - Max POST size: 2097152

and the test:

$ curl http://localhost:2222/rest/annotate \
>     --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
>     --data "confidence=0.35" \
>     -H "Accept: text/turtle"

@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://www.dbpedia-spotlight.com/#collection>
        a               nif:ContextCollection ;
        nif:hasContext  <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        <http://purl.org/dc/terms/conformsTo>
                <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1> .

<http://www.dbpedia-spotlight.com/#offset_0_189>
        a               nif:OffsetBasedString , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "189"^^xsd:nonNegativeInteger ;
        nif:isString    "President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." .

I hope the building process works for you. Have a great day.

My best regards

Julio

Hi Julio

thanks again for your reply.
Sorry for being unclear. If I add --platform linux/amd64 the warning disappears but the logs still stop after /opt/spotlight/lt http://0.0.0.0:80/rest/.

I also tried building the docker image in my own machine but with no success. The logs stay the same. I also tried it with adding --platform linux/amd64 to the run command as well since I got the warning there again but the result wasn’t any different.

I don’t know what I am missing.