2016-05-09 46 views
2

最近我開始使用NGSIV2,但cygnus開始崩潰。 我可以有沒有配合的東西嗎?隨着v1作品完美無瑕。與錯誤爲什麼在獵戶座中使用ngsiv2時cygnus會崩潰?

我啓動跟蹤在這裏:http://pastebin.com/nP2am8GW

錯誤說:錯誤附加事件通道。頻道可能已滿。考慮增加信道容量或確保接收器執行得更快。

time=2016-05-09T05:58:28.866CDT | lvl=WARN | trans=1462791485-602-0000000000 | srv=papel-club | subsrv=events | function=intercept | comp=Cygnus | msg=com.telefonica.iot.cygnus.interceptors.GroupingInterceptor[135] : No context responses within the notified entity, nothing is done 
time=2016-05-09T05:58:28.867CDT | lvl=WARN | trans=1462791485-602-0000000000 | srv=papel-club | subsrv=events | function=doPost | comp=Cygnus | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[203] : Error appending event to channel. Channel might be full. Consider increasing the channel capacity or make sure the sinks perform faster. 
org.apache.flume.ChannelException: Unable to put batch on required channel: org.apache.flume.channel.MemoryChannel{name: ckan-channel} 
    at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:200) 
    at org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(HTTPSource.java:201) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:814) 
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) 
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) 
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) 
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) 
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) 
    at org.mortbay.jetty.Server.handle(Server.java:326) 
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) 
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) 
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) 
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) 
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) 
    at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) 
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) 
Caused by: java.lang.IllegalArgumentException: put() called with null event! 
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) 
    at org.apache.flume.channel.BasicTransactionSemantics.put(BasicTransactionSemantics.java:89) 
    at org.apache.flume.channel.BasicChannelSemantics.put(BasicChannelSemantics.java:80) 
    at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:189) 
    ... 16 more 

由於錯誤說我增加了通道內存。這裏是我的代理配置:

cygnusagent.sources = http-source 
cygnusagent.sinks = ckan-sink 
cygnusagent.channels = ckan-channel 

cygnusagent.sources.http-source.channels = ckan-channel 
cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource 
cygnusagent.sources.http-source.port = 5050 
cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler 
cygnusagent.sources.http-source.handler.notification_target = /notify 
cygnusagent.sources.http-source.handler.default_service = papel-club 
cygnusagent.sources.http-source.handler.default_service_path = /events 
cygnusagent.sources.http-source.handler.events_ttl = 5 
cygnusagent.sources.http-source.interceptors = ts gi 
cygnusagent.sources.http-source.interceptors.ts.type = timestamp 
cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder 
cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules_day.conf 

cygnusagent.channels.ckan-channel.type = memory 
cygnusagent.channels.ckan-channel.capacity = 100000 
cygnusagent.channels.ckan-channel.transactionCapacity = 100000 

# ============================================ 
# OrionCKANSink configuration 
# channel name from where to read notification events 
cygnusagent.sinks.ckan-sink.channel = ckan-channel 

# sink class, must not be changed 
cygnusagent.sinks.ckan-sink.type = com.telefonica.iot.cygnus.sinks.OrionCKANSink 

# true if the grouping feature is enabled for this sink, false otherwise 
cygnusagent.sinks.ckan-sink.enable_grouping = true 

# true if lower case is wanted to forced in all the element names, false otherwise 
cygnusagent.sinks.hdfs-sink.enable_lowercase = false 

# the CKAN API key to use 
cygnusagent.sinks.ckan-sink.api_key = xxxx 

# the FQDN/IP address for the CKAN API endpoint 
cygnusagent.sinks.ckan-sink.ckan_host = ckan-demo.ckan.io 

# the port for the CKAN API endpoint 
cygnusagent.sinks.ckan-sink.ckan_port = 80 

# Orion URL used to compose the resource URL with the convenience operation URL to query it 
cygnusagent.sinks.ckan-sink.orion_url = http://localhost:1026 

# how the attributes are stored, either per row either per column (row, column) 
cygnusagent.sinks.ckan-sink.attr_persistence = column 

# enable SSL for secure Http transportation; 'true' or 'false' 
cygnusagent.sinks.ckan-sink.ssl = false 

# number of notifications to be included within a processing batch 
cygnusagent.sinks.ckan-sink.batch_size = 100 

# timeout for batch accumulation 
cygnusagent.sinks.ckan-sink.batch_timeout = 60 

# number of retries upon persistence error 
cygnusagent.sinks.ckan-sink.batch_ttl = 10 

謝謝。

+2

可能是這個問題https://github.com/telefonicaid/fiware-cygnus/issues/953? –

+2

是的,似乎是這樣。 – fgalan

回答

1

目前,CySIus不支持NGSIv2。它是expected to be implemented,但尚未安排。

編輯:還要注意的是,你可以使用NGSIv2創建獵戶座/更新的實體,具有在NGSIv1通知,如果您:

  • 使用NGSIv1操作創建訂閱
  • 創建使用NGSIv2認購與attrsFormat相等的操作等於legacy。看看更詳細的信息here
相關問題