ambiverse-nlu / dockerfiles

Docker files for AmbiverseNLU
Apache License 2.0
5 stars 6 forks source link

curl: (56) Recv failure: Connection reset by peer #5

Closed StudyExchange closed 4 years ago

StudyExchange commented 4 years ago
  1. run command: docker run -d --restart=always --name nlu-db-postgres \ -p 5432:5432 \ -e POSTGRES_DB=aida_20180120_cs_de_en_es_ru_zh_v18 \ -e POSTGRES_USER=ambiversenlu \ -e POSTGRES_PASSWORD=ambiversenlu \ ambiverse/nlu-db-postgres then run command: docker run -d --restart=always --name ambiverse-nlu \ -p 8080:8080 \ --link nlu-db-postgres:db \ -e AIDA_CONF=aida_20180120_cs_de_en_es_ru_zh_v18_db \ ambiverse/ambiverse-nlu then Check the status, run command docker ps, got: [root@ip-172-31-9-168 ambiverse-nlu]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2396dca587b9 ambiverse/ambiverse-nlu "mvn jetty:run" 12 minutes ago Up 12 minutes 0.0.0.0:8080->8080/tcp ambiverse-nlu 94e264d075ed ambiverse/nlu-db-postgres "docker-entrypoint.s…" 13 minutes ago Up 13 minutes 0.0.0.0:5432->5432/tcp nlu-db-postgres
  2. try to get API result, but got error. run command: curl --request POST \ --url http://localhost:8080/factextraction/analyze \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{"docId": "doc1", "text": "Jack founded Alibaba with investments from SoftBank and Goldman.", "extractConcepts": "true" }' got error: [root@ip-172-31-9-168 ambiverse-nlu]# curl --request POST \ > --url http://localhost:8080/factextraction/analyze \ > --header 'accept: application/json' \ > --header 'content-type: application/json' \ > --data '{"docId": "doc1", "text": "Jack founded Alibaba with investments from SoftBank and Goldman.", "extractConcepts": "true" }' curl: (56) Recv failure: Connection reset by peer
dmilcevski commented 4 years ago

Please check the log output of the docker containers with docker logs -f CONTAINER_[ID|NAME], in your case with docker logs -f 2396dca587b9 and docker logs -f 94e264d075ed. docker ps doesn't show anything.

StudyExchange commented 4 years ago

Thank you! Every thing is on going!

  1. docker logs -f 2396dca587b9 print continue downloading, like below: Downloading: http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar Downloaded: http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar (4.5 kB at 787 B/s)
  2. docker logs -f 94e264d075ed print below: /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/00-init-user-db.sh *** CREATING DATABASE *** Downloading database dump from http://ambiversenlu-download.mpi-inf.mpg.de/postgres/aida_20180120_cs_de_en_es_ru_zh_v18.sql.gz ...

I will waiting for this downloading, and then try to call the service. I will feedback at this issue page if I sucess, thank you!

StudyExchange commented 4 years ago

Success! Thank you very much! @dmilcevski Best practice:

  1. run command, then wait for this job finished. This task took 6 hours at my AWS machine(m5d.4xlarge: 16CPU 64G): docker run -d --restart=always --name nlu-db-postgres \ -p 5432:5432 \ -e POSTGRES_DB=aida_20180120_cs_de_en_es_ru_zh_v18 \ -e POSTGRES_USER=ambiversenlu \ -e POSTGRES_PASSWORD=ambiversenlu \ ambiverse/nlu-db-postgres
  2. then run command, this task took about 1 hour: docker run -d --restart=always --name ambiverse-nlu \ -p 8080:8080 \ --link nlu-db-postgres:db \ -e AIDA_CONF=aida_20180120_cs_de_en_es_ru_zh_v18_db \ ambiverse/ambiverse-nlu

Reference: