Open IoTopenTech opened 4 years ago
After updating node and npm to the latest versions, and replacing the docker-compose.yml with this one (https://stackoverflow.com/questions/57944790/fiware-ttn-iot-agent) it is working properly. `version: "3.1"
services: iot-agent: image: fiware/iotagent-lorawan:1.2.2 hostname: iot-agent container_name: fiware-iot-agent depends_on:
IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
mongo-db: image: mongo:3.6 hostname: mongo-db container_name: db-mongo expose:
mongo-db:/data
orion: image: fiware/orion hostname: orion container_name: fiware-orion depends_on:
volumes: mongo-db: ~`
I'm having the same issue and I guess @IoTopenTech wants to mean this one docker-compose.yml
file
version: "3.1"
services:
iot-agent:
image: fiware/iotagent-lorawan:1.2.2
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
expose:
- "4041"
ports:
- "4041:4041"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongo-db"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-lorawan"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
expose:
- "27017"
ports:
- "27017:27017"
command: --bind_ip_all --smallfiles
volumes:
- mongo-db:/data
orion:
image: fiware/orion
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
expose:
- "1026"
ports:
- "1026:1026"
command: -dbhost mongo-db
volumes:
mongo-db: ~
Just to clarify. I'm going to try it.
Well, I would like to remark a few things.
This docu seems apparently to be deprecated; I mean, I was in fact following that docu, but when you use the suggested docker-compose.yml
file inside docker folder you are probably going to get that curl: (52) Empty response from server
or as in my case curl: (56) Recv failure: Connection reset by peer
To solve this, I've tried the docker-compose.yml
which this answer in StackOverflow suggests.
I've noticed a variation of this alternative docker-compose.yml
is also suggested in the README.md
inside the docker folder of the repo itself. However, is still nonfunctional due few typos/indentation issues. Also the docker-compose.yml
included in the repo was not updated properly. Neither the mentioned docu.
Once you've deployed the docker containers using that alternative docker-compose.yml
, you have to be aware this new docker-compose.yml
exposes a different port, 4041
instead 4061
(as the docu suggests). So your curl
request has to take this into account: curl -v http://localhost:4041/iot/about
then curl should be able to give you the right response: {"libVersion":"2.10.0-next","port":"4041","baseRoot":"/"}
. You also can modify the container exposed ports in the docker-compose.yml
and keep curl
requesting to http://localhost:4061/iot/about
; this is totally up to you.
In conclusion,
The contributors have to update the documentation in order to get the web tutorial also upgraded
Also I think both docker-compose.yml
and README.md
need to be upgraded.
Finally, this is my suggestion for a newer and fixed docker-compose.yml
version: "3.1"
services:
iot-agent:
image: ioeari/iotagent-lora
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
expose:
- "4061"
ports:
- "4061:4061"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4061"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongo-db"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-lorawan"
- "IOTA_PROVIDER_URL=http://iot-agent:4061"
mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
ports:
- "27017:27017"
command: --bind_ip_all --smallfiles
volumes:
- mongo-db:/data
orion:
image: fiware/orion
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
expose:
- "1026"
ports:
- "1026:1026"
command: -dbhost mongo-db
volumes:
mongo-db: ~
I had the same issue. Any progress on updating the doc?
Hi, I have installed this agent using the recommeded docker-compose.yml.
It seems to be installed properly:
But if I issue this command: curl -v http://localhost:4061/iot/about
The result is:
How could I solve this. Kind regards