简体   繁体   中英

Fiware: Issue when registering a service through IDAS

I'm using IDAS. I can register a service through an IoT Agent, but if I try to do it using the iota manager, seems that I can't due to an issue with the protocols. When I try to register it:

curl -X POST 172.21.0.23:8091/iot/services \
-i  \
-H "Content-Type: application/json" \
-H "Fiware-Service: sanitysrvm" \
-H "Fiware-ServicePath: /sanitysspath" \
-d '{"services": [{ "apikey": "apikey", "token": "token", "cbroker": "http://127.0.0.1:1026", "entity_type": "thingsrv", "protocol": ["PDI-IoTA-UltraLight"] }]}'  

I get this response:

HTTP/1.1 400 Bad Request
Connection: close
Host: 172.21.0.23:8091
Content-Length: 94
Content-Type: application/json

{"reason":"The request is not well formed","details":"No exists protocol PDI-IoTA-UltraLight"}

I have checked the protocols:

http://172.21.0.23:8091/iot/protocols

But seems that there are none:

{ "count": 0,"protocols": []}

Is this issue related, as it seems, with the protocol? Can be that the protocol wan't correctly defined when installing the IDAS? How should I define the protocols?

Thanks!

I think you just installed IDAS iot-agent-base-xxxxxxx, and not the iot-agent-ul-xxxxxxx rpm package

I have a running installation and I installed it as follows (you may change the DGIT_VERSION and DGIT_COMMIT values in cmake command to build a newer version if possible):

git clone https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus.git
pwd
cd fiware....
mkdir -p build/Release
cd build/Release
cmake -DGIT_VERSION=20527 -DGIT_COMMIT=217023407f25ed258043cfc00a46b6c05fb0b52c -DMQTT=ON -DCMAKE_BUILD_TYPE=Release ../../
make install
make package

The packages will be created in pack/Linux/RPM/

rpm -i iot-agent-base-xxxxxxx
rpm -i iot-agent-ul-xxxxxx

IDAS will be installed in /usr/local/iot

Hope this helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM