FIWARE / tutorials.Linked-Data

:blue_book: FIWARE 601: Linked Data for NGSI-v2 developers
https://www.fiware.org/developers/
MIT License
8 stars 7 forks source link

Neither "./services orion" nor "./services scorpio" commands can be invoked. #23

Open hsakamoto123 opened 1 year ago

hsakamoto123 commented 1 year ago
?Waiting for Orion-LD to be available

and

?Waiting for Scorpio to respond

After that, it doesn't work.

$ ./services orion
.....omit.....
[+] Running 3/3
 ? Volume "fiware_mongo-db"  Created                                       0.0s
 ? Container db-mongo        Started                                       2.3s
 ? Container fiware-orion    Started                                       1.1s

? Waiting for MongoDB to be available

Create MongoDB database indexes ... done

NAMES          STATUS                            PORTS
fiware-orion   Up 5 seconds (health: starting)   0.0.0.0:1026->1026/tcp, :::1026->1026/tcp

? Waiting for Orion-LD to be available

Context Broker HTTP state:  (waiting for 200)
  Waiting a few seconds ..
<<<<<The above two lines are repeated>>>>>

$ ./services scorpio
.....omit.....
[+] Running 4/4
 ? Container zookeeper       Started                                       2.6s
 ? Container db-postgres     Started                                       2.6s
 ? Container kafka           Started                                       1.8s
 ? Container fiware-scorpio  Started                                       2.5s

NAMES            STATUS                  PORTS
fiware-scorpio   Up Less than a second   0.0.0.0:9090->9090/tcp, :::9090->9090/tcp

? Waiting for Scorpio to respond

Context Broker HTTP state: 000 (waiting for 404)
 Waiting one minute ....
<<<<<The above two lines are repeated>>>>>

Please let me know how to avoid this.

jason-fox commented 1 year ago

I am unable to reproduce this. It is probably down to the setup of your local machine. I have re-run the scripts locally and via GitHub Actions see here for the log. I have also created the start-up on GitPod and it runs to completion.

If you are still facing issues, then I would suggest you try the GitPod version which spins up all the dependencies in the cloud, and is less prone to issues running on a local machine.

hsakamoto123 commented 1 year ago

I followed the tutorial and did the following:


$ ./services create
Pulling Docker images
Using default tag: latest
latest: Pulling from curlimages/curl
Digest: sha256:f7f265d5c64eb4463a43a99b6bf773f9e61a50aaa7cefaf564f43e42549a01dd
Status: Image is up to date for curlimages/curl:latest
docker.io/curlimages/curl:latest
WARN[0000] The "host" variable is not set. Defaulting to a blank string.
[+] Running 11/11
  ?zookeeper Pulled 2.7s
  ?neo4j Pulled 3.0s
  ?api-gateway Pulled 2.8s
  ?orion Pulled 2.4s
  ? entity-service Pulled 3.0s
  ?postgres Pulled 2.9s
  ?scorpio Pulled 2.0s
  ? search-service Pulled 2.7s
  ? subscription-service Pulled 2.8s
  ?kafka Pulled 2.3s
  ? mongo-db Pulled 3.0s
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ ./services orion

After executing the above, the following error appears in the container log.


{"log":"time=Wednesday 04 Jan 17:13:18 2023.562Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | /A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 2 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout" ,"time":"2023-01-04T17:13:18.56238982Z"}

What are the possible settings?

jason-fox commented 1 year ago

The .env file can load different tags of the Orion container image.

# Orion variables
ORION_LD_PORT=1026
ORION_LD_VERSION=1.1.0

The latest stable is 1.1.1. The bleeding edge is currently 1.2.0-PRE-1222. Where possible, the tutorials usually use a slightly older tested stable image, but you could try updating .env and see if that helps. Without more log info I can't tell what you are doing - maybe you could just attach a complete log.

fisuda commented 1 year ago

I can't reproduce this issue. Your environment may be corrupted.

$ ./services orion
Starting containers:  Orion-LD and a MongoDB database.
- Orion-LD is the context broker
- @context is supplied externally

WARN[0000] The "host" variable is not set. Defaulting to a blank string.
[+] Running 4/4
 ⠿ Network fiware_default    Created                                                                               0.0s
 ⠿ Volume "fiware_mongo-db"  Created                                                                               0.0s
 ⠿ Container db-mongo        Started                                                                               0.4s
 ⠿ Container fiware-orion    Started                                                                               1.1s

⏳ Waiting for MongoDB to be available

Create MongoDB database indexes ... done

NAMES          STATUS                   PORTS
fiware-orion   Up 5 seconds (healthy)   0.0.0.0:1026->1026/tcp, :::1026->1026/tcp

⏳ Waiting for Orion-LD to be available

$ curl http://localhost:1026/version
{
  "orionld version": "1.1.0",
  "orion version":   "1.15.0-next",
  "uptime":          "0 d, 0 h, 0 m, 38 s",
  "git_hash":        "nogitversion",
  "compile_time":    "Fri Jul 29 16:54:32 UTC 2022",
  "compiled_by":     "root",
  "compiled_in":     "",
  "release_date":    "Fri Jul 29 16:54:32 UTC 2022",
  "doc":             "https://fiware-orion.readthedocs.org/en/master/"
}

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

$ docker version -f "{{.Server.Version}}"
20.10.8

$ docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

$ git log -n 1
commit d141f360d140c79d9f409b05895caea90dc59fc6 (HEAD -> master, upstream/master, upstream/NGSI-v2, origin/master, origin/HEAD)
Author: GitHub Action <action@github.com>
Date:   Mon Jan 2 13:31:16 2023 +0100

    Update copyrights

$ cat .env
# Project name
COMPOSE_PROJECT_NAME=fiware

# Orion LD variables
ORION_LD_PORT=1026
ORION_LD_VERSION=1.1.0
hsakamoto123 commented 1 year ago

Orion version has not changed yet. Here is the information for my environment: I don't know what to look for. Any advice where could be the problem?

$ ./services create
Pulling Docker images
Using default tag: latest
latest: Pulling from curlimages/curl
Digest: sha256:f7f265d5c64eb4463a43a99b6bf773f9e61a50aaa7cefaf564f43e42549a01dd
Status: Image is up to date for curlimages/curl:latest
docker.io/curlimages/curl:latest
WARN[0000] The "host" variable is not set. Defaulting to a blank string.
[+] Running 11/11
 ? zookeeper Pulled                                                         2.0s
 ? api-gateway Pulled                                                       2.5s
 ? entity-service Pulled                                                    2.7s
 ? kafka Pulled                                                             2.1s
 ? mongo-db Pulled                                                          2.8s
 ? neo4j Pulled                                                             2.6s
 ? orion Pulled                                                             2.4s
 ? postgres Pulled                                                          2.8s
 ? scorpio Pulled                                                           2.3s
 ? search-service Pulled                                                    2.4s
 ? subscription-service Pulled                                              2.8s

$ ./services orion
Starting containers:  Orion-LD and a MongoDB database.
- Orion-LD is the context broker
- @context is supplied externally

WARN[0000] The "host" variable is not set. Defaulting to a blank string.
[+] Running 4/4
 ? Network fiware_default    Created                                        0.1s
 ? Volume "fiware_mongo-db"  Created                                        0.0s
 ? Container db-mongo        Started                                        0.7s
 ? Container fiware-orion    Started                                        0.9s

? Waiting for MongoDB to be available

Create MongoDB database indexes ... done

NAMES          STATUS                            PORTS
fiware-orion   Up 5 seconds (health: starting)   0.0.0.0:1026->1026/tcp, :::1026->1026/tcp

? Waiting for Orion-LD to be available

Context Broker HTTP state:  (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds .^C
$
$ git log -n 1
commit 36e2438b1cebf448be6e29b77dcdc015dd0f6131 (HEAD -> NGSI-v2, origin/master, origin/NGSI-v2, origin/HEAD, master)
Author: GitHub Action <action@github.com>
Date:   Thu Oct 20 12:59:34 2022 +0200

    Update versions

$ curl http://localhost:1026/version
curl: (7) Failed to connect to localhost port 1026 after 0 ms: Couldn't connect to server

$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

$ docker version -f "{{.Server.Version}}"
20.10.18

$ docker version
Client: Docker Engine - Community
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:14:08 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  8 23:12:21 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

$ docker-compose version
Docker Compose version v2.11.2

$ cat .env
# Project name
COMPOSE_PROJECT_NAME=fiware

# Orion LD variables
ORION_LD_PORT=1026
ORION_LD_VERSION=1.1.0

# Scorpio variables
SCORPIO_PORT=9090
SCORPIO_VERSION=2.1.21

# Stellio variables
STELLIO_DOCKER_TAG=v1.12.0
STELLIO_PORT=8080

# MongoDB variables
MONGO_DB_PORT=27017
MONGO_DB_VERSION=4.4

# IoT Agent Ultralight Variables
ULTRALIGHT_VERSION=1.24.0-distroless
IOTA_NORTH_PORT=4041
IOTA_SOUTH_PORT=7896

# Tutorial variables
TUTORIAL_APP_PORT=3000
TUTORIAL_DUMMY_DEVICE_PORT=3001

$ docker ps -a
CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS                      PORTS                                           NAMES
7b207a46af7e   fiware/orion-ld:1.1.0   "orionld -fg -multis…"   27 minutes ago   Exited (1) 27 minutes ago                                                   fiware-orion
ba81c004396a   mongo:4.4               "docker-entrypoint.s…"   27 minutes ago   Up 27 minutes (healthy)     0.0.0.0:27017->27017/tcp, :::27017->27017/tcp   db-mongo

The container log shows the following:

# pwd
/var/lib/docker/containers
# grep ERR */*.log
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:06 2023.514Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-05T16:58:06.514376437Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:06 2023.514Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-05T16:58:06.514463126Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:06 2023.514Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 1 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-05T16:58:06.514521575Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:11 2023.516Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-05T16:58:11.516161481Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:11 2023.516Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-05T16:58:11.516249959Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:11 2023.516Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 2 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-05T16:58:11.516256215Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:16 2023.517Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-05T16:58:16.518252234Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:16 2023.517Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-05T16:58:16.518268186Z"}
7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894/7b207a46af7ea9d7a0bd30fc14aab262f40f9a4e25bf400e49bb060136090894-json.log:{"log":"time=Thursday 05 Jan 16:58:16 2023.517Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 3 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-05T16:58:16.518271171Z"}
jason-fox commented 1 year ago

Related: https://github.com/ScorpioBroker/ScorpioBroker/issues/305

I suspect that you are unable to access a public instance of the core @context. No brokers will work without it. @hsakamoto123 I have updated the services script to explicitly request @context from ETSI. Please pull and re-run. If you have no internet, hopefully it will now fail earlier with a more intelligent message.

hsakamoto123 commented 1 year ago

I tried using the new services script. Below is the stdout result.

$ ./services orion

? Checking availability of core @context from ETSI

@context HTTP state: 000 (waiting for 200)
   Waiting a few seconds.

@context HTTP state: 000 (waiting for 200)
   Waiting a few seconds.

.....
@context HTTP state: 000 (waiting for 200)
   Waiting a few seconds.
^C

I also checked the proxy settings. Proxy settings are set in /etc/systemd/system/docker.service.d/http-proxy.conf by describing HTTP_PROXY, HTTP_PROXY and NO_PROXY.

$ more /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://xxx.xxx.xxx.xxx:8080"
Environment="HTTPS_PROXY=http://xxx.xxx.xxx.xxx:8080"
Environment="NO_PROXY=127.0.0.1,localhost"

I have also set the environment variables on the host in the same way.

$ env | grep http
http_proxy=http://xxx.xxx.xxx.xxx:8080
HTTPS_PROXY=http://xxx.xxx.xxx.xxx:8080
https_proxy=http://xxx.xxx.xxx.xxx:8080
HTTP_PROXY=http://xxx.xxx.xxx.xxx:8080
$ env | grep NO_PRO
NO_PROXY=127.0.0.1,localhost

I don't know the original behavior, so please give me advice on where to investigate.

hsakamoto123 commented 1 year ago

I added "-e HTTP_PROXY -e HTTPS_PROXY" to the following three places, thinking that the environment variables were not passed to the execution of eval.

<Excerpt>
eval "response=$(docker run --network fiware_default --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$1")"
eval "response=$(docker run --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"
eval "response=$(docker run --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"

Change the above part to:

<Excerpt>
eval "response=$(docker run -e HTTP_PROXY -e HTTPS_PROXY --network fiware_default --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$1")"
eval "response=$(docker run -e HTTP_PROXY -e HTTPS_PROXY --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"
eval "response=$(docker run -e HTTP_PROXY -e HTTPS_PROXY --rm curlimages/curl -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"

The results of running orion and scorpio are as follows.

$ ./services orion
Stopping containers
e2e73c049000
d7243173bd2d
6e76d5fa0460
be5ba8a87347
Removing old volumes
8d662259ba5239a57702de1c91ae98b006913b883253e888c2d2623433e68251
1693c93fb68b7f954b6079ece41f2ea60efd2fd9f515680890f0430bc31a1455
afd078d083993b80618b83cd9e84c40bf5d484bfb432ba0f129249ed0597c853
ecd06a04e18421740e28e7969f5bf8b83cc795f9ee6704efc4fc97bcb74c5738

? Checking availability of  core @context from ETSI

Starting containers:  Orion-LD and a MongoDB database.
- Orion-LD is the context broker
- Data models @context (Smart Supermarket) is supplied externally

WARN[0000] The "host" variable is not set. Defaulting to a blank string.
[+] Running 3/3
 ? Volume "fiware_mongo-db"  Created                                       0.0s
 ? Container db-mongo        Started                                       0.8s
 ? Container fiware-orion    Started                                       1.3s

? Waiting for MongoDB to be available

Create MongoDB database indexes ... done

NAMES          STATUS                            PORTS
fiware-orion   Up 5 seconds (health: starting)   0.0.0.0:1026->1026/tcp, :::1026->1026/tcp

? Waiting for the data models @context to be available (Smart Supermarket)

? Waiting for Orion-LD to be available

Context Broker HTTP state: 200 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..

Context Broker HTTP state: 000 (waiting for 200)
  Waiting a few seconds ..^C

# pwd
/var/lib/docker/containers
#grep ERR */*.log
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:26 2023.194Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-17T15:28:26.194935776Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:26 2023.194Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-17T15:28:26.194953898Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:26 2023.194Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 1 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-17T15:28:26.194957778Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:31 2023.196Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-17T15:28:31.196202852Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:31 2023.196Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-17T15:28:31.196284554Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:31 2023.196Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 2 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-17T15:28:31.196291085Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:36 2023.198Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[321]:orionldRequestSend | msg=Internal Error (curl_easy_perform returned error code 28)\n","stream":"stdout","time":"2023-01-17T15:28:36.198016605Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:36 2023.198Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldRequestSend.cpp[329]:orionldRequestSend | msg=curl_easy_perform error 28\n","stream":"stdout","time":"2023-01-17T15:28:36.198090447Z"}
151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353/151589bd591e454141ba51c57b16ce61aff633e8b40fdba549a5308c86e7a353-json.log:{"log":"time=Tuesday 17 Jan 15:28:36 2023.198Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldContextDownload.cpp[115]:orionldContextDownload | msg=orionldRequestSend failed (try number 3 out of 3. Timeout is: 5000ms): Internal CURL Error\n","stream":"stdout","time":"2023-01-17T15:28:36.19813159Z"}
$ ./services scorpio
Stopping containers
151589bd591e
325cb11bbfd7
Removing old volumes
411fe2498cf39c5ff342ce32cbadff7c44bcb431225187fe6cea18c2c5bd0872
f6e8b998028ac44781a6c3525e0ca3a5ccbc52f04e379d150fc566050c30fc7c
fiware_mongo-db

? Checking availability of  core @context from ETSI

Starting containers:  Scorpio, Kafka, Zookeeper and a Postgres database.
- Scorpio is the context broker
- Data models @context (Smart Supermarket) is supplied externally

[+] Running 4/4
 ? Container zookeeper       Started                                       1.1s
 ? Container db-postgres     Started                                       1.2s
 ? Container kafka           Started                                       1.5s
 ? Container fiware-scorpio  Started                                       2.0s

NAMES            STATUS                  PORTS
fiware-scorpio   Up Less than a second   0.0.0.0:9090->9090/tcp, :::9090->9090/tcp

? Waiting for the data models @context to be available (Smart Supermarket)

? Waiting for Scorpio to respond

Context Broker HTTP state: 000 (waiting for 404)
 Waiting one minute ....................
Context Broker HTTP state: 000 (waiting for 404)
 Waiting one minute ....^C

# pwd
/var/lib/docker/containers
# grep ERR */*.log
#

What other possible causes are there?

hsakamoto123 commented 1 year ago

Any new information on how to avoid it?

jason-fox commented 1 year ago

I'm still convinced that this is an "access a public instance of the core @context" somehow. Since local machine can access ETSI, it might be an issue with the dockerization of the broker itself. Have you tried running via the GitPod button? Maybe that would help.

You could also raise issues with Orion and Scorpio teams directly to see if they could help.

son-phamngoc commented 5 months ago

I am also working with proxy and met the same problem with orion (I did not try others). After started orion, service script waits for fiware-orion-ld container becomes healthy. However, the health of fiware-orion-ld container in my environment is always unhealthy. Because of that, service script stucks there, waiting infinitely until fiware-orion-ld container becomes healthy.

The health check command of fiware-orion-ld:

healthcheck:
      test: curl --fail -s http://orion:${ORION_LD_PORT}/version || exit 1
      interval: 60s

This command sends a request to http://orion:${ORION_LD_PORT}/version, which will be unreachable under proxy. I solve it by adding orion to NO_PROXY environment variable.

NO_PROXY=127.0.0.1,localhost,orion

After fixed, fiware-orion-ld container becomes healthy and script can end successfully.

Hope this help.