Fiware:通过IDAS注册服务时出现问题

时间:2016-01-07 16:34:42

标签: fiware

我正在使用IDAS。我可以通过物联网代理注册服务,但如果我尝试使用iota管理器,似乎我不能因为协议的问题。当我尝试注册时:

list

我收到了这个回复:

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"] }]}'  

我检查了协议:

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"}

但似乎没有:

http://172.21.0.23:8091/iot/protocols

这个问题与协议有关吗? 安装IDAS时可能无法正确定义协议吗? 我该如何定义协议?

谢谢!

1 个答案:

答案 0 :(得分:0)

我认为您刚刚安装了IDAS iot-agent-base-xxxxxxx,而不是iot-agent-ul-xxxxxxx rpm软件包

我有一个正在运行的安装,我按如下方式安装它(如果可能,您可以在cmake命令中更改DGIT_VERSION和DGIT_COMMIT值以构建更新的版本):

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

将在pack / Linux / RPM /

中创建包
rpm -i iot-agent-base-xxxxxxx
rpm -i iot-agent-ul-xxxxxx

IDAS将安装在/ usr / local / iot

希望这会对你有所帮助。