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

[fiware-askbot] Make Fiware-Cygnus storing to Apache-Phoenix database

    Details

      Description

      Created question in FIWARE Q/A platform on 06-11-2017 at 17:11
      Please, ANSWER this question AT https://ask.fiware.org/question/900/make-fiware-cygnus-storing-to-apache-phoenix-database/

      Question:
      Make Fiware-Cygnus storing to Apache-Phoenix database

      Description:
      I just asked this question on Stackoverflow too.

      I'm new to Cygnus and to Phoenix db. I want Cygnus to store data in an Apache Phoenix db, so I have to configure the Phoenix Sink to work with Cygnus.

      I know that Cygnus is an extension of Apache Flume, so any Flume agent can work with it by default (theoretically). I configured my Flume agent agent_phoenix.conf file for Cygnus like this:

      cygnus-ngsi.channels = memoryChannel
      cygnus-ngsi.sinks = phoenix-sink

      cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
      cygnus-ngsi.sources.http-source.channels = memoryChannel
      cygnus-ngsi.sources.http-source.port = 5051
      cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
      cygnus-ngsi.sources.http-source.handler.notification_target = /notify
      cygnus-ngsi.sources.http-source.handler.default_service = default
      cygnus-ngsi.sources.http-source.handler.default_service_path = /
      cygnus-ngsi.sources.http-source.interceptors = ts gi
      cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
      cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
      cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /opt/apache-flume/conf/grouping_rules.conf

      cygnus-ngsi.channels.memoryChannel.type=memory
      cygnus-ngsi.channels.memoryChannel.transactionCapacity=100
      cygnus-ngsi.channels.memoryChannel.byteCapacityBufferPercentage=20

      cygnus-ngsi.sinks.phoenix-sink.type=org.apache.phoenix.flume.sink.PhoenixSink
      cygnus-ngsi.sinks.phoenix-sink.channel=memoryChannel
      cygnus-ngsi.sinks.phoenix-sink.batchSize=100
      cygnus-ngsi.sinks.phoenix-sink.table=PROVA_PHOENIX
      c.sinks.phoenix-sink.ddl=CREATETABLEIFNOTEXISTSPROVA_PHOENIX(uidVARCHARNOTNULL,f_hostVARCHARCONSTRAINTpkPRIMARYKEY(uid),colonnaProvaVARCHAR)
      cygnus-ngsi.sinks.phoenix-sink.zookeeperQuorum=localhost
      cygnus-ngsi.sinks.phoenix-sink.serializer=REGEX
      cygnus-ngsi.sinks.phoenix-sink.serializer.rowkeyType=uuid
      cygnus-ngsi.sinks.phoenix-sink.serializer.columns=colonnaProva

      and launched it using this command on CentOS command line:

      /usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_phoenix.conf -n cygnus-ngsi -Dflume.root.logger=INFO,console

      It starts doing some initializations but then I get this message:

      76666 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.serializer.BaseEventSerializer - error No suitable driver found for jdbc:phoenix:localhost; occurred during initializing connection
      176667 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.sink.PhoenixSink - Error No suitable driver found for jdbc:phoenix:localhost; in initializing the serializer.
      176667 [lifecycleSupervisor-1-8] ERROR org.apache.flume.lifecycle.LifecycleSupervisor - Unable to start SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor@29918f3 counterGroup:{ name:null counters:{} } } - Exception follows.
      java.lang.RuntimeException: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
      at com.google.common.base.Throwables.propagate(Throwables.java:156)
      at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:124)
      at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
      at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
      at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
      at java.sql.DriverManager.getConnection(DriverManager.java:596)
      at ... (more)

        Activity

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        Comment [
        Spam detection software, running on the system "fiware-forge-01", has
        identified this incoming email as possible spam. The original message
        has been attached to this so you can view it (if it isn't spam) or label
        similar future email. If you have any questions, see
        the administrator of that system for details.

        Content preview: [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           ] FW External User updated HELP-12907: > [Fiware-general-help] [SPAM] [FIWARE-JIRA]
           (HELP-13082) [SPAM] Website Job Application > > > Key: HELP-12907 > URL:
          https://jira.fiware.org/browse/HELP-12907 > Project: Help-Desk > Issue Type:
           extRequest > Reporter: FW External User > Attachments: [FIWARE-JIRA] (HELP-12907)
           [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job
           Application, [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA]
           (HELP-13082) [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-12907) [Fiware-general-help]
           [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application, [FIWARE-JIRA]
           (HELP-13082) [Fiware-general-help] [SPAM] Website Job Application > > > Spam
           detection software, running on the system "fiware-forge-01", has > identified
           this incoming email as possible spam. The original message > has been attached
           to this so you can view it (if it isn't spam) or label > similar future email.
           If you have any questions, see > the administrator of that system for details.
           > Content preview: [ https://jira.fiware.org/browse/HELP-13082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           > ] FW External User updated HELP-13082: > [Fiware-general-help] [SPAM] Website
           > Job Application > > > Key: HELP-13082 > URL: https://jira.fiware.org/browse/HELP-13082
           > > Project: Help-Desk > Issue Type: extRequest > Components: SPAM > Reporter:
           > FW External User > Attachments: [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [...]

        Content analysis details: (6.9 points, 4.5 required)

         pts rule name description
        ---- ---------------------- --------------------------------------------------
         1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
                                    [URIs: latedeliver.com]
         2.5 URIBL_DBL_SPAM Contains a spam URL listed in the DBL blocklist
                                    [URIs: latedeliver.com]
         0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
         3.8 HELO_LOCALHOST HELO_LOCALHOST
        -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
                                    [score: 0.0000]
         0.8 RDNS_NONE Delivered to internal network by a host with no rDNS

        ]
        fla Fernando Lopez made changes -
        Comment [
        Spam detection software, running on the system "fiware-forge-01", has
        identified this incoming email as possible spam. The original message
        has been attached to this so you can view it (if it isn't spam) or label
        similar future email. If you have any questions, see
        the administrator of that system for details.

        Content preview: [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           ] FW External User updated HELP-12907: Attachment: [FIWARE-JIRA] (HELP-12907)
           [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job
           Application [...]

        Content analysis details: (6.9 points, 4.5 required)

         pts rule name description
        ---- ---------------------- --------------------------------------------------
         1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
                                    [URIs: latedeliver.com]
         2.5 URIBL_DBL_SPAM Contains a spam URL listed in the DBL blocklist
                                    [URIs: latedeliver.com]
         0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
         3.8 HELO_LOCALHOST HELO_LOCALHOST
        -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
                                    [score: 0.0000]
         0.8 RDNS_NONE Delivered to internal network by a host with no rDNS

        ]
        fla Fernando Lopez made changes -
        Comment [
        Spam detection software, running on the system "fiware-forge-01", has
        identified this incoming email as possible spam. The original message
        has been attached to this so you can view it (if it isn't spam) or label
        similar future email. If you have any questions, see
        the administrator of that system for details.

        Content preview: [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           ] FW External User updated HELP-12907: > [Fiware-general-help] [SPAM] [FIWARE-JIRA]
           (HELP-13082) [SPAM] Website Job Application > > > Key: HELP-12907 > URL:
          https://jira.fiware.org/browse/HELP-12907 > Project: Help-Desk > Issue Type:
           extRequest > Reporter: FW External User > Attachments: [FIWARE-JIRA] (HELP-12907)
           [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job
           Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help] [SPAM] Website
           Job Application > > > Spam detection software, running on the system "fiware-forge-01",
           has > identified this incoming email as possible spam. The original message
           > has been attached to this so you can view it (if it isn't spam) or label
           > similar future email. If you have any questions, see > the administrator
           of that system for details. > Content preview: [ https://jira.fiware.org/browse/HELP-13082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           > ] FW External User updated HELP-13082: > [Fiware-general-help] [SPAM] Website
           > Job Application > > > Key: HELP-13082 > URL: https://jira.fiware.org/browse/HELP-13082
           > > Project: Help-Desk > Issue Type: extRequest > Components: SPAM > Reporter:
           > FW External User > Attachments: [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [...]

        Content analysis details: (6.9 points, 4.5 required)

         pts rule name description
        ---- ---------------------- --------------------------------------------------
         1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
                                    [URIs: latedeliver.com]
         2.5 URIBL_DBL_SPAM Contains a spam URL listed in the DBL blocklist
                                    [URIs: latedeliver.com]
         0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
         3.8 HELO_LOCALHOST HELO_LOCALHOST
        -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
                                    [score: 0.0000]
         0.8 RDNS_NONE Delivered to internal network by a host with no rDNS

        ]
        fla Fernando Lopez made changes -
        Comment [
        Spam detection software, running on the system "fiware-forge-01", has
        identified this incoming email as possible spam. The original message
        has been attached to this so you can view it (if it isn't spam) or label
        similar future email. If you have any questions, see
        the administrator of that system for details.

        Content preview: [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           ] FW External User updated HELP-12907: Attachment: [FIWARE-JIRA] (HELP-12907)
           [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job
           Application [...]

        Content analysis details: (6.9 points, 4.5 required)

         pts rule name description
        ---- ---------------------- --------------------------------------------------
         1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
                                    [URIs: latedeliver.com]
         2.5 URIBL_DBL_SPAM Contains a spam URL listed in the DBL blocklist
                                    [URIs: latedeliver.com]
         0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
         3.8 HELO_LOCALHOST HELO_LOCALHOST
        -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
                                    [score: 0.0000]
         0.8 RDNS_NONE Delivered to internal network by a host with no rDNS

        ]
        fla Fernando Lopez made changes -
        Comment [
        Spam detection software, running on the system "fiware-forge-01", has
        identified this incoming email as possible spam. The original message
        has been attached to this so you can view it (if it isn't spam) or label
        similar future email. If you have any questions, see
        the administrator of that system for details.

        Content preview: [ https://jira.fiware.org/browse/HELP-12907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           ] FW External User updated HELP-12907: > [Fiware-general-help] [SPAM] [FIWARE-JIRA]
           (HELP-13082) [SPAM] Website Job Application > > > Key: HELP-12907 > URL:
          https://jira.fiware.org/browse/HELP-12907 > Project: Help-Desk > Issue Type:
           extRequest > Reporter: FW External User > Attachments: [FIWARE-JIRA] (HELP-13082)
           [Fiware-general-help] [SPAM] Website Job Application > > > Spam detection
           software, running on the system "fiware-forge-01", has > identified this
          incoming email as possible spam. The original message > has been attached
          to this so you can view it (if it isn't spam) or label > similar future email.
           If you have any questions, see > the administrator of that system for details.
           > Content preview: [ https://jira.fiware.org/browse/HELP-13082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
           > ] FW External User updated HELP-13082: > [Fiware-general-help] [SPAM] Website
           > Job Application > > > Key: HELP-13082 > URL: https://jira.fiware.org/browse/HELP-13082
           > > Project: Help-Desk > Issue Type: extRequest > Components: SPAM > Reporter:
           > FW External User > Attachments: [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] Website Job Application, [FIWARE-JIRA] (HELP-13082) [Fiware-general-help]
           > [SPAM] [...]

        Content analysis details: (6.9 points, 4.5 required)

         pts rule name description
        ---- ---------------------- --------------------------------------------------
         1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
                                    [URIs: latedeliver.com]
         2.5 URIBL_DBL_SPAM Contains a spam URL listed in the DBL blocklist
                                    [URIs: latedeliver.com]
         0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
         3.8 HELO_LOCALHOST HELO_LOCALHOST
        -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
                                    [score: 0.0000]
         0.8 RDNS_NONE Delivered to internal network by a host with no rDNS

        ]
        fla Fernando Lopez made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 62067 ]
        fla Fernando Lopez made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60453 ]
        fla Fernando Lopez made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60901 ]
        fla Fernando Lopez made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60902 ]
        fla Fernando Lopez made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 62068 ]
        fw.ext.user FW External User made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 62068 ]
        fw.ext.user FW External User made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 62067 ]
        fw.ext.user FW External User made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60902 ]
        fw.ext.user FW External User made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60901 ]
        fw.ext.user FW External User made changes -
        Attachment [FIWARE-JIRA] (HELP-12907) [Fiware-general-help] [SPAM] [FIWARE-JIRA] (HELP-13082) [SPAM] Website Job Application [ 60453 ]
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        veronika Veronika Vlnkova made changes -
        Field Original Value New Value
        Assignee Joaquín Salvachúa [ joaquin.salvachua ]
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            joaquin.salvachua Joaquín Salvachúa
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: