Fiware 为什么Cygnus不能在我的CentOS 6.7上获得订阅?

Fiware 为什么Cygnus不能在我的CentOS 6.7上获得订阅?,fiware,fiware-orion,fiware-cygnus,Fiware,Fiware Orion,Fiware Cygnus,我刚刚在虚拟机环境中完成了整个测试,现在我正试图在专用服务器上启动它。现在我遇到了一个全新的问题。首先,我确认我已经运行了context Broker和centos(分别在1026和5050上): 然后我确认我在contextBroker上有数据,因为该命令给了我一个适当的响应: (curl localhost:1026/v1/queryContext -s -S --header 'Content-Type: application/json' \ --header 'Accept:

我刚刚在虚拟机环境中完成了整个测试,现在我正试图在专用服务器上启动它。现在我遇到了一个全新的问题。首先,我确认我已经运行了context Broker和centos(分别在1026和5050上):

然后我确认我在contextBroker上有数据,因为该命令给了我一个适当的响应:

(curl localhost:1026/v1/queryContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ]
} 
EOF
然后我启动了cygnus,得到了以下日志:

Starting an ordered shutdown of Cygnus
Stopping sources
Stopping http-source (lyfecycle state=START)
All the channels are empty
Stopping channels
Stopping mysql-channel (lyfecycle state=START)
Stopping sinks
Stopping mysql-sink (lyfecycle state=START)
Info: Sourcing environment configuration script /usr/cygnus/conf/flume-env.sh
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.log.file=cygnus.log -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplic$
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-0.11.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
17 Dec 2015 13:35:37,684 INFO  [main] (com.telefonica.iot.cygnus.nodes.CygnusApplication.main:235)  - Starting a Jetty server listening on port 8081 (Management Interface)
17 Dec 2015 13:35:37,700 INFO  [main] (org.mortbay.log.Slf4jLog.info:67)  - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
17 Dec 2015 13:35:37,700 INFO  [main] (com.telefonica.iot.cygnus.nodes.CygnusApplication.main:238)  - Starting Cygnus application
17 Dec 2015 13:35:37,700 INFO  [Thread-1] (org.mortbay.log.Slf4jLog.info:67)  - jetty-6.1.26
17 Dec 2015 13:35:37,713 INFO  [lifecycleSupervisor-1-0] (org.apache.flume.node.PollingPropertiesFileConfigurationProvider.start:61)  - Configuration provider starting
17 Dec 2015 13:35:37,715 INFO  [conf-file-poller-0] (org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run:133)  - Reloading configuration file:/usr/cygnus/conf/agent_1.conf
17 Dec 2015 13:35:37,725 INFO  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016)  - Processing:mysql-sink
17 Dec 2015 13:35:37,725 INFO  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016)  - Processing:mysql-sink
17 Dec 2015 13:35:37,725 INFO  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016)  - Processing:mysql-sink
17 Dec 2015 13:35:37,755 INFO  [Thread-1] (org.mortbay.log.Slf4jLog.info:67)  - Started SocketConnector@0.0.0.0:8081
17 Dec 2015 13:35:37,764 WARN  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.isValid:319)  - Agent configuration for 'cygunsagent' does not contain any channels. Marking it as invalid.
17 Dec 2015 13:35:37,765 WARN  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration.validateConfiguration:127)  - Agent configuration invalid for agent 'cygunsagent'. It will be removed.
17 Dec 2015 13:35:37,766 INFO  [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration.validateConfiguration:140)  - Post-validation flume configuration contains configuration for agents: [cygnusagent]
17 Dec 2015 13:35:37,766 INFO  [conf-file-poller-0] (org.apache.flume.node.AbstractConfigurationProvider.loadChannels:150)  - Creating channels
17 Dec 2015 13:35:37,778 INFO  [conf-file-poller-0] (org.apache.flume.channel.DefaultChannelFactory.create:40)  - Creating instance of channel mysql-channel type memory
17 Dec 2015 13:35:37,782 INFO  [conf-file-poller-0] (org.apache.flume.node.AbstractConfigurationProvider.loadChannels:205)  - Created channel mysql-channel
17 Dec 2015 13:35:37,783 INFO  [conf-file-poller-0] (org.apache.flume.source.DefaultSourceFactory.create:39)  - Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource
17 Dec 2015 13:35:37,791 INFO  [conf-file-poller-0] (com.telefonica.iot.cygnus.handlers.OrionRestHandler.<init>:75)  - Cygnus version (0.11.0.2a9c87fb7fd6156225e2eed7fbc9792f1d9c5dfe)
17 Dec 2015 13:35:37,807 INFO  [conf-file-poller-0] (com.telefonica.iot.cygnus.handlers.OrionRestHandler.configure:141)  - Startup completed
17 Dec 2015 13:35:37,826 INFO  [conf-file-poller-0] (org.apache.flume.sink.DefaultSinkFactory.create:40)  - Creating instance of sink: mysql-sink, type: com.telefonica.iot.cygnus.sinks.OrionMySQLSink
17 Dec 2015 13:35:37,839 INFO  [conf-file-poller-0] (org.apache.flume.node.AbstractConfigurationProvider.getConfiguration:119)  - Channel mysql-channel connected to [http-source, mysql-sink]
17 Dec 2015 13:35:37,843 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:138)  - Starting new configuration:{ sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTT$
17 Dec 2015 13:35:37,844 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:145)  - Starting Channel mysql-channel
17 Dec 2015 13:35:37,910 INFO  [lifecycleSupervisor-1-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.register:110)  - Monitoried counter group for type: CHANNEL, name: mysql-channel, registered successfully.
17 Dec 2015 13:35:37,910 INFO  [lifecycleSupervisor-1-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.start:94)  - Component type: CHANNEL, name: mysql-channel started
17 Dec 2015 13:35:37,911 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:173)  - Starting Sink mysql-sink
17 Dec 2015 13:35:37,913 INFO  [lifecycleSupervisor-1-1] (com.telefonica.iot.cygnus.sinks.OrionMySQLSink.start:153)  - [mysql-sink] Startup completed
17 Dec 2015 13:35:37,915 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:184)  - Starting Source http-source
17 Dec 2015 13:35:37,916 INFO  [lifecycleSupervisor-1-2] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.initialize:92)  - Grouping rules read:
17 Dec 2015 13:35:37,916 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:101)  - Shutting down configuration: { sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HT$
17 Dec 2015 13:35:37,917 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:105)  - Stopping Source http-source
17 Dec 2015 13:35:37,920 ERROR [lifecycleSupervisor-1-2] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.parseGroupingRules:165)  - Error while parsing the Json-based grouping rules file. Details=null
17 Dec 2015 13:35:37,921 WARN  [lifecycleSupervisor-1-2] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.initialize:98)  - Grouping rules syntax has errors
17 Dec 2015 13:35:37,948 INFO  [lifecycleSupervisor-1-2] (org.mortbay.log.Slf4jLog.info:67)  - jetty-6.1.26
17 Dec 2015 13:35:37,973 INFO  [lifecycleSupervisor-1-2] (org.mortbay.log.Slf4jLog.info:67)  - Started SocketConnector@0.0.0.0:5050
17 Dec 2015 13:35:37,974 INFO  [lifecycleSupervisor-1-2] (org.apache.flume.instrumentation.MonitoredCounterGroup.register:110)  - Monitoried counter group for type: SOURCE, name: http-source, registered successfully.
17 Dec 2015 13:35:37,974 INFO  [lifecycleSupervisor-1-2] (org.apache.flume.instrumentation.MonitoredCounterGroup.start:94)  - Component type: SOURCE, name: http-source started
17 Dec 2015 13:35:37,974 INFO  [conf-file-poller-0] (org.apache.flume.lifecycle.LifecycleSupervisor.unsupervise:171)  - Stopping component: EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state$
17 Dec 2015 13:35:37,974 INFO  [conf-file-poller-0] (org.mortbay.log.Slf4jLog.info:67)  - Stopped SocketConnector@0.0.0.0:5050
17 Dec 2015 13:35:37,975 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:139)  - Component type: SOURCE, name: http-source stopped
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:145)  - Shutdown Metric for type: SOURCE, name: http-source. source.start.time == 1450355737974
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:151)  - Shutdown Metric for type: SOURCE, name: http-source. source.stop.time == 1450355737975
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.append-batch.accepted == 0
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.append-batch.received == 0
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.append.accepted == 0
17 Dec 2015 13:35:37,976 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.append.received == 0
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.events.accepted == 0
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.events.received == 0
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: SOURCE, name: http-source. src.open-connection.count == 0
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.source.http.HTTPSource.stop:172)  - Http source http-source stopped. Metrics: SOURCE:http-source{src.events.accepted=0, src.open-connection.count=0, src.append.receiv$
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:115)  - Stopping Sink mysql-sink
17 Dec 2015 13:35:37,977 INFO  [conf-file-poller-0] (org.apache.flume.lifecycle.LifecycleSupervisor.unsupervise:171)  - Stopping component: SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor@76da521f counterGroup:{ name:nul$
17 Dec 2015 13:35:37,987 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:125)  - Stopping Channel mysql-channel
17 Dec 2015 13:35:37,987 INFO  [conf-file-poller-0] (org.apache.flume.lifecycle.LifecycleSupervisor.unsupervise:171)  - Stopping component: org.apache.flume.channel.MemoryChannel{name: mysql-channel}
17 Dec 2015 13:35:37,987 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:139)  - Component type: CHANNEL, name: mysql-channel stopped
17 Dec 2015 13:35:37,987 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:145)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.start.time == 1450355737910
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:151)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.stop.time == 1450355737987
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.capacity == 1000
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.current.size == 0
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.event.put.attempt == 0
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.event.put.success == 0
17 Dec 2015 13:35:37,988 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.event.take.attempt == 1
17 Dec 2015 13:35:37,989 INFO  [conf-file-poller-0] (org.apache.flume.instrumentation.MonitoredCounterGroup.stop:167)  - Shutdown Metric for type: CHANNEL, name: mysql-channel. channel.event.take.success == 0
17 Dec 2015 13:35:37,989 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:138)  - Starting new configuration:{ sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTT$
17 Dec 2015 13:35:37,989 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:145)  - Starting Channel mysql-channel
17 Dec 2015 13:35:37,989 INFO  [lifecycleSupervisor-1-3] (org.apache.flume.instrumentation.MonitoredCounterGroup.start:94)  - Component type: CHANNEL, name: mysql-channel started
17 Dec 2015 13:35:37,992 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:173)  - Starting Sink mysql-sink
17 Dec 2015 13:35:37,993 INFO  [lifecycleSupervisor-1-8] (com.telefonica.iot.cygnus.sinks.OrionMySQLSink.start:153)  - [mysql-sink] Startup completed
17 Dec 2015 13:35:37,993 INFO  [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:184)  - Starting Source http-source
17 Dec 2015 13:35:37,993 INFO  [lifecycleSupervisor-1-4] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.initialize:92)  - Grouping rules read:
17 Dec 2015 13:35:37,994 ERROR [lifecycleSupervisor-1-4] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.parseGroupingRules:165)  - Error while parsing the Json-based grouping rules file. Details=null
17 Dec 2015 13:35:37,994 WARN  [lifecycleSupervisor-1-4] (com.telefonica.iot.cygnus.interceptors.GroupingInterceptor.initialize:98)  - Grouping rules syntax has errors
17 Dec 2015 13:35:37,994 INFO  [lifecycleSupervisor-1-4] (org.mortbay.log.Slf4jLog.info:67)  - jetty-6.1.26
17 Dec 2015 13:35:37,996 INFO  [lifecycleSupervisor-1-4] (org.mortbay.log.Slf4jLog.info:67)  - Started SocketConnector@0.0.0.0:5050
17 Dec 2015 13:35:37,996 INFO  [lifecycleSupervisor-1-4] (org.apache.flume.instrumentation.MonitoredCounterGroup.start:94)  - Component type: SOURCE, name: http-source started
它有5050和notify作为参考地址。我再次检查了cygnus_实例_1.conf,它指向代理_1.conf

#####
#
# Configuration file for apache-flume
#
#####
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of fiware-cygnus (FI-WARE project).
#
# fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
# later version.
# fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
# http://www.gnu.org/licenses/.
#
# For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es

# Who to run cygnus as. Note that you may need to use root if you want
# to run cygnus in a privileged port (<1024)
CYGNUS_USER=cygnus

# Where is the config folder
CONFIG_FOLDER=/usr/cygnus/conf

# Which is the config file
CONFIG_FILE=/usr/cygnus/conf/agent_1.conf

# Name of the agent. The name of the agent is not trivial, since it is the base for the Flume parameters
# naming conventions, e.g. it appears in .sources.http-source.channels=...
AGENT_NAME=cygnusagent

# Name of the logfile located at /var/log/cygnus. It is important to put the extension '.log' in order to the log rotation works properly
LOGFILE_NAME=cygnus.log

# Administration port. Must be unique per instance
ADMIN_PORT=8081

# Polling interval (seconds) for the configuration reloading
POLLING_INTERVAL=30
我注意到在/etc/cygnus/conf中有一个精确的镜像,但我什么都没碰,因为安装只要求我使用/usr/文件夹

这是我的Mysql create语句。在这个表中,我希望接收上下文代理数据,但我当然什么也没有得到,因为日志没有注册任何内容

CREATE TABLE sensor_room1_room (
sensorID INT NOT NULL AUTO_INCREMENT,
recvTime mediumtext, 
fiwareservicepath text, 
entityId text, 
entityType text, 
pressure text, 
pressure_md text, 
temperature text, 
temperature_md text,
PRIMARY KEY (sensorID));
编辑1

这是听众

[root@centos形态]#nc-l 5050

但当我尝试订阅或更新上下文时,侦听器端没有收到任何消息。我没有考虑nc的客户端:
NC127.0.0.15050
,因为它成功地发送了我键入的所有内容(甚至是胡言乱语)


我还尝试了这个测试:
/usr/cygnus/bin/cygnus flume ng agent--conf/usr/cygnus/conf/-f/usr/cygnus/conf/agent_1.conf-n cygnusagent-Dflume.root.logger=DEBUG,console
。我尝试订阅5050和8081端口,然后更新上下文,但控制台上没有读取任何内容

因为我真的不知道为什么订阅不起作用,但感谢@fgalan,我确实阅读了日志,所以我将触发事件的订阅发布到天鹅座:

(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ],
    "attributes": [
        "pressure"
        "temperature"
    ],
    "reference": "http://localhost:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "pressure",
                "temperature"
            ]
        }
    ],
    "throttling": "PT1S"
}
EOF
(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ],
    "attributes": [
        "temperature"
    ],
    "reference": "http://localhost:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "pressure"
            ]
        }
    ],
    "throttling": "PT5S"
}
EOF
(curl localhost:1026/v1/subscribeContext-s-s——标题“内容类型:application/json”\

--标题'Accept:application/json'-d@-| python-mjson.tool),因为我真的不知道订阅为什么不起作用,但由于@fgalan,我确实阅读了日志,所以我将触发事件的订阅发布到cygnus:

(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ],
    "attributes": [
        "pressure"
        "temperature"
    ],
    "reference": "http://localhost:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "pressure",
                "temperature"
            ]
        }
    ],
    "throttling": "PT1S"
}
EOF
(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ],
    "attributes": [
        "temperature"
    ],
    "reference": "http://localhost:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "pressure"
            ]
        }
    ],
    "throttling": "PT5S"
}
EOF
(curl localhost:1026/v1/subscribeContext-s-s——标题“内容类型:application/json”\

--标题“Accept:application/json'-d-| python-mjson.tool)能否暂时关闭Cygnus进程并在该端口运行一个虚拟侦听器(例如
nc-l-p5050
),然后向Orion发送新的更新,以检查是否收到了某些内容?编辑您的问题帖子以添加您的发现。@Vrankela,由于Orion更新似乎正在运行,我们只有两个选择:Cygnus没有真正倾听,或者Orion和Cygnus之间的通信被阻止(iptables、防火墙之类)。你能为Cygnus测试一个测试脚本吗?这一个模拟了一个简单的通知:。如果Cygnus记录接收模拟通知的情况,则Cygnus正常,问题是Orion和Cygnus之间的通信。@frb我创建了一个名为cygnusTest.sh的文件,并将链接的内容放入其中,然后执行了以下
[root@centos天鹅座]#sh cygnusTest.sh 127.0.0.1:5050
该命令给了我以下输出:
*即将()连接到127.0.0.1端口5050(#0)*尝试127.0.0.1。。。已连接*已连接到127.0.0.1(127.0.0.1)端口5050(#0)>POST/HTTP/1.1>主机:127.0.0.1:5050>内容类型:应用程序/json>接受:应用程序/json>用户代理:猎户座/0.10.0>固件服务:def#serv>固件服务路径:def#serv#路径>内容长度:460
并基本打印出内容…不是真的。。。您应该编辑/etc/syconfig/contextBroker文件,确保未注释BROKER\u EXTRA\u OPS,并将
-logLevel INFO
添加到该参数中(类似于
BROKER\u EXTRA\u OPS=“…-logLevel INFO”
)。然后,使用
sudo/etc/init.d/contextBroker restart
重新启动Orion。更多信息请访问是的,有。看看下面的问答帖子:和。如果你觉得+1很有用,别忘了告诉其他用户。你能暂时关闭Cygnus进程并在该端口运行一个虚拟侦听器(例如,
nc-l-p5050
)并向Orion发送新的更新,以检查是否收到了一些东西吗?编辑您的问题帖子以添加您的发现。@Vrankela,由于Orion更新似乎正在运行,我们只有两个选择:Cygnus没有真正倾听,或者Orion和Cygnus之间的通信被阻止(iptables、防火墙之类)。你能为Cygnus测试一个测试脚本吗?这一个模拟了一个简单的通知:。如果Cygnus记录接收模拟通知的情况,则Cygnus正常,问题是Orion和Cygnus之间的通信。@frb我创建了一个名为cygnusTest.sh的文件,并将链接的内容放入其中,然后执行了以下
[root@centos天鹅座]#sh cygnusTest.sh 127.0.0.1:5050
该命令给了我以下输出:
*即将()连接到127.0.0.1端口5050(#0)*尝试127.0.0.1。。。已连接*已连接到127.0.0.1(127.0.0.1)端口5050(#0)>POST/HTTP/1.1>主机:127.0.0.1:5050>内容类型:应用程序/json>接受:应用程序/json>用户代理:猎户座/0.10.0>固件服务:def#serv>固件服务路径:def#serv#路径>内容长度:460
并基本打印出内容…不是真的。。。您应该编辑/etc/syconfig/contextBroker文件,确保未注释BROKER\u EXTRA\u OPS,并将
-logLevel INFO
添加到该参数中(类似于
BROKER\u EXTRA\u OPS=“…-logLevel INFO”
)。然后,使用
sudo/etc/init.d/contextBroker restart
重新启动Orion。更多信息请访问是的,有。看看下面的问答帖子:和。如果你觉得+1有用,别忘了给他们,这样其他用户可能会知道。
[root@centos conf]# ls
agent_1.conf         cygnus_instance_1.conf         flume-env.sh           grouping_rules.conf           krb5.conf           krb5_login.conf   log4j.properties.template
agent.conf.template  cygnus_instance.conf.template  flume-env.sh.template  grouping_rules.conf.template  krb5.conf.template  log4j.properties  README.md
CREATE TABLE sensor_room1_room (
sensorID INT NOT NULL AUTO_INCREMENT,
recvTime mediumtext, 
fiwareservicepath text, 
entityId text, 
entityType text, 
pressure text, 
pressure_md text, 
temperature text, 
temperature_md text,
PRIMARY KEY (sensorID));
(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
    --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1"
        }
    ],
    "attributes": [
        "temperature"
    ],
    "reference": "http://localhost:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "pressure"
            ]
        }
    ],
    "throttling": "PT5S"
}
EOF