Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4276

FIWARE.Request.Tech.Data.BigData-Analysis.CygnusChannelStatusProblem

    Details

      Description

      Created question in FIWARE Q/A platform on 07-09-2015 at 09:09
      Please, ANSWER this question AT http://stackoverflow.com/questions/32433444/fiware-cygnus-error

      Question:
      Fiware Cygnus Error

      Description:
      Looking for why my information was not persisting in Cosmos I have found this error in the log of cygnus repeated hundreds of times:

      03 Sep 2015 02:20:18,491 ERROR [SinkRunner-PollingRunner-DefaultSinkProcessor] (com.telefonica.iot.cygnus.sinks.OrionSink.process:103) - Channel error (The Flume transaction could not be started. Details=begin() called when transaction is OPEN!)

      03 Sep 2015 02:20:18,491 ERROR [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.flume.SinkRunner$PollingRunner.run:160) - Unable to deliver event. Exception follows.

      org.apache.flume.EventDeliveryException: java.lang.IllegalStateException: begin() called when transaction is OPEN!
      at com.telefonica.iot.cygnus.sinks.OrionSink.process(OrionSink.java:104)
      at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
      at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
      at java.lang.Thread.run(Thread.java:701)
      Caused by: java.lang.IllegalStateException: begin() called when transaction is OPEN!
      at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
      at org.apache.flume.channel.BasicTransactionSemantics.begin(BasicTransactionSemantics.java:131)
      at com.telefonica.iot.cygnus.sinks.OrionSink.process(OrionSink.java:101)
      ... 3 more

      Is it a configuration error or a runtime error?
      Thanks in advance.

      Edit: This is a configuration file content of an agent:

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

      #=============================================

      1. To be put in APACHE_FLUME_HOME/conf/agent.conf
        #
      2. General configuration template explaining how to setup a sink of each of the available types (HDFS, CKAN, MySQL).

      #=============================================

      1. The next tree fields set the sources, sinks and channels used by Cygnus. You could use different names than the
      2. ones suggested below, but in that case make sure you keep coherence in properties names along the configuration file.
      3. Regarding sinks, you can use multiple types at the same time; the only requirement is to provide a channel for each
      4. one of them (this example shows how to configure 3 sink types at the same time). Even, you can define more than one
      5. sink of the same type and sharing the channel in order to improve the performance (this is like having
      6. multi-threading).
        cygnusagent.sources = http-source
        cygnusagent.sinks = hdfs-sink
        cygnusagent.channels = hdfs-channel

      #=============================================

      1. source configuration
      2. channel name where to write the notification events
        cygnusagent.sources.http-source.channels = hdfs-channel
      3. source class, must not be changed
        cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
      4. listening port the Flume source will use for receiving incoming notifications
        cygnusagent.sources.http-source.port = 5050
      5. Flume handler that will parse the notifications, must not be changed
        cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler
      6. URL target
        cygnusagent.sources.http-source.handler.notification_target = /notify
      7. Default service (service semantic depends on the persistence sink)
        cygnusagent.sources.http-source.handler.default_service = my_service
      8. Default service path (service path semantic depends on the persistence sink)
        cygnusagent.sources.http-source.handler.default_service_path = my_path
      9. Number of channel re-injection retries before a Flume event is definitely discarded (-1 means infinite retries)
        cygnusagent.sources.http-source.handler.events_ttl = 0
      10. Source interceptors, do not change
        cygnusagent.sources.http-source.interceptors = ts
      11. TimestampInterceptor, do not change
        cygnusagent.sources.http-source.interceptors.ts.type = timestamp
      12. GroupinInterceptor, do not change
        #cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder
      13. Grouping rules for the GroupingInterceptor, put the right absolute path to the file if necessary
      14. See the doc/design/interceptors document for more details
        #cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf
      1. ============================================
      2. OrionHDFSSink configuration
      3. channel name from where to read notification events
        cygnusagent.sinks.hdfs-sink.channel = hdfs-channel
      4. sink class, must not be changed
        cygnusagent.sinks.hdfs-sink.type = com.telefonica.iot.cygnus.sinks.OrionHDFSSink
      5. Comma-separated list of FQDN/IP address regarding the HDFS Namenode endpoints
      6. If you are using Kerberos authentication, then the usage of FQDNs instead of IP addresses is mandatory
        cygnusagent.sinks.hdfs-sink.hdfs_host = cosmos.lab.fiware.org
      7. port of the HDFS service listening for persistence operations; 14000 for httpfs, 50070 for webhdfs
        cygnusagent.sinks.hdfs-sink.hdfs_port = 14000
      8. username allowed to write in HDFS
        cygnusagent.sinks.hdfs-sink.hdfs_username = my_username
      9. OAuth2 token
        cygnusagent.sinks.hdfs-sink.oauth2_token = my_token
      10. how the attributes are stored, either per row either per column (row, column)
        cygnusagent.sinks.hdfs-sink.attr_persistence = column
      11. Hive FQDN/IP address of the Hive server
        cygnusagent.sinks.hdfs-sink.hive_host = cosmos.lab.fiware.org
      12. Hive port for Hive external table provisioning
        cygnusagent.sinks.hdfs-sink.hive_port = 10000
      13. Kerberos-based authentication enabling
        cygnusagent.sinks.hdfs-sink.krb5_auth = false
      14. Kerberos username
        cygnusagent.sinks.hdfs-sink.krb5_auth.krb5_user = krb5_username
      15. Kerberos password
        cygnusagent.sinks.hdfs-sink.krb5_auth.krb5_password = xxxxxxxxxxxxx
      16. Kerberos login file
        cygnusagent.sinks.hdfs-sink.krb5_auth.krb5_login_conf_file = /usr/cygnus/conf/krb5_login.conf
      17. Kerberos configuration file
        cygnusagent.sinks.hdfs-sink.krb5_auth.krb5_conf_file = /usr/cygnus/conf/krb5.conf

      #=============================================

      1. hdfs-channel configuration
      2. channel type (must not be changed)
        cygnusagent.channels.hdfs-channel.type = memory
      3. capacity of the channel
        cygnusagent.channels.hdfs-channel.capacity = 10000
      4. amount of bytes that can be sent per transaction
        cygnusagent.channels.hdfs-channel.transactionCapacity = 1000

        Activity

        Hide
        frb Francisco Romero added a comment -

        Closing since the user said the problem disappeared after rebooting his/her VM.

        Show
        frb Francisco Romero added a comment - Closing since the user said the problem disappeared after rebooting his/her VM.

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: