Fiware 无法启动Orion iot代理

Fiware 无法启动Orion iot代理,fiware,fiware-orion,Fiware,Fiware Orion,我不能启动我的物联网代理。它过去是有用的。有什么问题吗 这是我的开始脚本(上下文代理在192.168.1.126下运行): 这是我的config.json文件: { "resources": [ { "resource": "/iot/kuraResources", "options": { "FileName": "UL20Service" }

我不能启动我的物联网代理。它过去是有用的。有什么问题吗

这是我的开始脚本(上下文代理在192.168.1.126下运行):

这是我的config.json文件:

   {
       "resources": [
        {
            "resource": "/iot/kuraResources",
            "options": {
              "FileName": "UL20Service"
            }
       }
    ],
    "timezones": "/etc/iot/date_time_zonespec.csv",
    "storage": {
      "type": "mongodb",
      "dbname": "iot"
    },
    "ngsi_url": {
       "cbroker": "http://192.168.1.126:1026",
       "updateContext": "/NGSI10/updateContext",
       "registerContext": "/NGSI9/registerContext",
       "queryContext": "/NGSI10/queryContext"
     },
     "timeout": 11,
     "dir_log": "/var/log/"
   }
这是我尝试启动时的日志:

[root@localhost iot]# sudo ./ini_iotagent.sh
log4cplus:ERROR No appenders could be found for logger (main).
log4cplus:ERROR Please initialize the log4cplus system properly.
FATAL - ======= IoTAgent StartingWebServer: 192.168.1.126 ========
DEBUG - RestHandle constructor
INFO - type_store:mongodb
DEBUG - Setting function get in cache to find in mongo
DEBUG - Check tables in mongo
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
[root@localhost iot]# DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.DEVICE|index={ ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 32, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.SERVICE|index={ ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 33, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - iota::AdminService::AdminService
DEBUG - RestHandle constructor
INFO - type_store:mongodb
DEBUG - Setting function get in cache to find in mongo
DEBUG - Check tables in mongo
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.DEVICE|index={ ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 34, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.SERVICE|index={ ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 35, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - iota::NgsiService::NgsiService
INFO - Added request handler for HTTP resource: /iot
INFO - Loaded static web service for resource (/iot)
INFO - Added request handler for HTTP resource: /iot/ngsi
INFO - Loaded static web service for resource (/iot/ngsi)
DEBUG - Registering /iot/ngsi
DEBUG - Config file /etc/iot/config.json
DEBUG - Starting___ /iot/kuraResources
DEBUG - RestHandle constructor
INFO - type_store:mongodb
DEBUG - Setting function get in cache to find in mongo
DEBUG - Check tables in mongo
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.DEVICE|index={ ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.DEVICE", name: "shardKey", v: 1, unique: true, key: { device_id: 1, service: 1, service_path: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 36, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
DEBUG - |event=END-ALARM|code=100|origin= 127.0.0.1:27017|info=MongoConnection OK
DEBUG - Collection:ensureIndex|bbdd=iot.SERVICE|index={ ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - insert in  iot.system.indexes with { ns: "iot.SERVICE", name: "shardKey", v: 1, unique: true, key: { service: 1, service_path: 1, resource: 1 } }
DEBUG - |event=END-ALARM|code=100|origin=127.0.0.1:27017|info={ "connectionId" : 37, "n" : 0, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
DEBUG - Mongo operation ok
DEBUG - iota::UL20Service::UL20Service
INFO - Added request handler for HTTP resource: /iot/kuraResources
INFO - Loaded web service plug-in for resource (/iot/kuraResources): UL20Service
DEBUG - set_service_option: FileName UL20Service
FATAL - bad argument: FileName
INFO - Starting server on port 80
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /agents to url base /iot
DEBUG - Added url /iot/agents
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /agents/<agent> to url base /iot
DEBUG - Added url /iot/agents/<agent>
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /devices to url base /iot
DEBUG - Added url /iot/devices
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /devices/<device> to url base /iot
DEBUG - Added url /iot/devices/<device>
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /services to url base /iot
DEBUG - Added url /iot/services
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /services/<service> to url base /iot
DEBUG - Added url /iot/services/<service>
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /about to url base /iot
DEBUG - Added url /iot/about
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /agents/<agent>/services to url base /iot
DEBUG - Added url /iot/agents/<agent>/services
DEBUG - Registering /iot
DEBUG - No internal stats information in configuration file /iot
INFO - No internal stats information in configuration file /iot
DEBUG - Add url /agents/<agent>/services/<service> to url base /iot
DEBUG - Added url /iot/agents/<agent>/services/<service>
DEBUG - Load timezone database /etc/iot/date_time_zonespec.csv
ERROR - OAuth for northbound is not configured
DEBUG - START PLUGIN UL2.0
DEBUG - Registering /iot/kuraResources
DEBUG - Add url  to url base /iot
DEBUG - Added url /iot/kuraResources
DEBUG - Registering /iot/ngsi
DEBUG - No internal stats information in configuration file /iot/ngsi
INFO - No internal stats information in configuration file /iot/ngsi
DEBUG - Add url /iot/kuraResources/<operation> to url base /iot
DEBUG - Added url /iot/ngsi/kuraResources/<operation>
INFO - Init vector of services names by resource: /iot/kuraResources
DEBUG - admin service ip: 192.168.1.126
DEBUG - admin service  port: 80
DEBUG - ProvidingApp: http://192.168.1.126:80/iot/ngsi/kuraResources
DEBUG - Start NgsiService
INFO - OAuth for northbound is not configured
INFO - Start thread registrations
DEBUG - Sending all register from devices collection
DEBUG - in storage no host defined, using localhost by default
DEBUG - in storage no port defined, using 27017 by default
DEBUG - in storage no timeout defined, using 0 by default
DEBUG - in storage no user defined, mongo without auth
DEBUG - in storage no pwd defined, mongo without auth
DEBUG - Conex Mongo DBClientConnection 127.0.0.1:27017/iot timeout in seconds:0
ERROR - Unable to bind to port 80: bind: Cannot assign requested address
HTTPFilter DESTRUCTOR 0
DEBUG - Destructor iota::UL20Service::UL20Service
HTTPFilter DESTRUCTOR 0
FATAL - bind: Cannot assign requested address

端口80似乎正在被另一个进程使用

通过执行以下命令,您可以知道哪个进程正在侦听端口80:

netstat -lnp | grep 80
如果端口80正在使用中,您可以在另一个端口上启动IoAgent,例如端口8080:

/usr/local/iot/bin/iotagent -i 192.168.1.126 -p 8080 -v DEBUG -d /usr/local/iot/lib -c /etc/iot/config.json &

我在启动脚本中指定的Iot代理Ip地址方面出错


谢谢您的帮助。

不,端口80未使用,我尝试了另一个端口,但仍然存在相同的错误:(
netstat -lnp | grep 80
/usr/local/iot/bin/iotagent -i 192.168.1.126 -p 8080 -v DEBUG -d /usr/local/iot/lib -c /etc/iot/config.json &