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

[fiware-stackoverflow] Problems running Cygnus with Postgresql

    Details

      Description

      Created question in FIWARE Q/A platform on 02-03-2018 at 15:03
      Please, ANSWER this question AT https://stackoverflow.com/questions/49070738/problems-running-cygnus-with-postgresql

      Question:
      Problems running Cygnus with Postgresql

      Description:
      So I have installed Cygnus and in the simple test configuration case which I took from here (https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-ngsi/README.md) everything works fine.

      But I need Postgresql as a backend for my application.
      For this I adjusted the agent_1.conf file with all postgresql parameters found from http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsi_agent_conf/

      cygnus-ngsi.sources = http-source
      cygnus-ngsi.sinks = postgresql-sink
      cygnus-ngsi.channels = postgresql-channel

      cygnus-ngsi.sources.http-source.channels = hdfs-channel mysql-channel ckan-channel mongo-channel sth-channel kafka-channel dynamo-channel postgresql-channel
      cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
      cygnus-ngsi.sources.http-source.port = 5050
      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.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
      cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf

      cygnus-ngsi.sinks.postgresql-sink.channel = postgresql-channel
      cygnus-ngsi.sinks.postgresql-sink.type = com.telefonica.iot.cygnus.sinks.NGSIPostgreSQLSink
      cygnus-ngsi.sinks.postgresql-sink.postgresql_host = 127.0.0.1
      cygnus-ngsi.sinks.postgresql-sink.postgresql_port = 5432
      cygnus-ngsi.sinks.postgresql-sink.postgresql_database = myUser
      cygnus-ngsi.sinks.postgresql-sink.postgresql_username = mydb
      cygnus-ngsi.sinks.postgresql-sink.postgresql_password = xxxx
      cygnus-ngsi.sinks.postgresql-sink.attr_persistence = row
      cygnus-ngsi.sinks.postgresql-sink.batch_size = 100
      cygnus-ngsi.sinks.postgresql-sink.batch_timeout = 30
      cygnus-ngsi.sinks.postgresql-sink.batch_ttl = 10

      1. postgresql-channel configuration
        cygnus-ngsi.channels.postgresql-channel.type = memory
        cygnus-ngsi.channels.postgresql-channel.capacity = 1000
        cygnus-ngsi.channels.postgresql-channel.transactionCapacity = 100

      I didn'r really find any information about other files I am supposed to change and aren't really sure if all parameters are correct.
      I also tried the sample configuration from here http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/flume_extensions_catalogue/ngsi_postgresql_sink/index.html

      Cygnus seems to start correctly but all if I try to send a notification I get connection refused

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        18d 20h 44m 1 Andres Muñoz 21/Mar/18 11:49 AM
        In Progress In Progress Answered Answered
        1m 24s 1 Andres Muñoz 21/Mar/18 11:51 AM
        Answered Answered Closed Closed
        1s 1 Andres Muñoz 21/Mar/18 11:51 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        andres.munoza Andres Muñoz made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        andres.munoza Andres Muñoz made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        andres.munoza Andres Muñoz made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        joaquin.salvachua Joaquín Salvachúa made changes -
        Assignee Joaquín Salvachúa [ joaquin.salvachua ] Andres Muñoz [ andres.munoza ]
        fla Fernando Lopez made changes -
        Assignee Joaquín Salvachúa [ joaquin.salvachua ]
        fla Fernando Lopez made changes -
        HD-Enabler Cygnus [ 11304 ]
        Description
        Created question in FIWARE Q/A platform on 02-03-2018 at 15:03
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/49070738/problems-running-cygnus-with-postgresql


        +Question:+
        Problems running Cygnus with Postgresql

        +Description:+
        So I have installed Cygnus and in the simple test configuration case which I took from here (https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-ngsi/README.md) everything works fine.

        But I need Postgresql as a backend for my application.
        For this I adjusted the agent_1.conf file with all postgresql parameters found from http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsi_agent_conf/

        cygnus-ngsi.sources = http-source
        cygnus-ngsi.sinks = postgresql-sink
        cygnus-ngsi.channels = postgresql-channel

        cygnus-ngsi.sources.http-source.channels = hdfs-channel mysql-channel ckan-channel mongo-channel sth-channel kafka-channel dynamo-channel postgresql-channel
        cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
        cygnus-ngsi.sources.http-source.port = 5050
        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.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
        cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf

        cygnus-ngsi.sinks.postgresql-sink.channel = postgresql-channel
        cygnus-ngsi.sinks.postgresql-sink.type = com.telefonica.iot.cygnus.sinks.NGSIPostgreSQLSink
        cygnus-ngsi.sinks.postgresql-sink.postgresql_host = 127.0.0.1
        cygnus-ngsi.sinks.postgresql-sink.postgresql_port = 5432
        cygnus-ngsi.sinks.postgresql-sink.postgresql_database = myUser
        cygnus-ngsi.sinks.postgresql-sink.postgresql_username = mydb
        cygnus-ngsi.sinks.postgresql-sink.postgresql_password = xxxx
        cygnus-ngsi.sinks.postgresql-sink.attr_persistence = row
        cygnus-ngsi.sinks.postgresql-sink.batch_size = 100
        cygnus-ngsi.sinks.postgresql-sink.batch_timeout = 30
        cygnus-ngsi.sinks.postgresql-sink.batch_ttl = 10

        # postgresql-channel configuration
        cygnus-ngsi.channels.postgresql-channel.type = memory
        cygnus-ngsi.channels.postgresql-channel.capacity = 1000
        cygnus-ngsi.channels.postgresql-channel.transactionCapacity = 100


        I didn'r really find any information about other files I am supposed to change and aren't really sure if all parameters are correct.
        I also tried the sample configuration from here http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/flume_extensions_catalogue/ngsi_postgresql_sink/index.html

        Cygnus seems to start correctly but all if I try to send a notification I get connection refused
        Created question in FIWARE Q/A platform on 02-03-2018 at 15:03
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/49070738/problems-running-cygnus-with-postgresql


        +Question:+
        Problems running Cygnus with Postgresql

        +Description:+
        So I have installed Cygnus and in the simple test configuration case which I took from here (https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-ngsi/README.md) everything works fine.

        But I need Postgresql as a backend for my application.
        For this I adjusted the agent_1.conf file with all postgresql parameters found from http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsi_agent_conf/

        cygnus-ngsi.sources = http-source
        cygnus-ngsi.sinks = postgresql-sink
        cygnus-ngsi.channels = postgresql-channel

        cygnus-ngsi.sources.http-source.channels = hdfs-channel mysql-channel ckan-channel mongo-channel sth-channel kafka-channel dynamo-channel postgresql-channel
        cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
        cygnus-ngsi.sources.http-source.port = 5050
        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.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
        cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf

        cygnus-ngsi.sinks.postgresql-sink.channel = postgresql-channel
        cygnus-ngsi.sinks.postgresql-sink.type = com.telefonica.iot.cygnus.sinks.NGSIPostgreSQLSink
        cygnus-ngsi.sinks.postgresql-sink.postgresql_host = 127.0.0.1
        cygnus-ngsi.sinks.postgresql-sink.postgresql_port = 5432
        cygnus-ngsi.sinks.postgresql-sink.postgresql_database = myUser
        cygnus-ngsi.sinks.postgresql-sink.postgresql_username = mydb
        cygnus-ngsi.sinks.postgresql-sink.postgresql_password = xxxx
        cygnus-ngsi.sinks.postgresql-sink.attr_persistence = row
        cygnus-ngsi.sinks.postgresql-sink.batch_size = 100
        cygnus-ngsi.sinks.postgresql-sink.batch_timeout = 30
        cygnus-ngsi.sinks.postgresql-sink.batch_ttl = 10

        # postgresql-channel configuration
        cygnus-ngsi.channels.postgresql-channel.type = memory
        cygnus-ngsi.channels.postgresql-channel.capacity = 1000
        cygnus-ngsi.channels.postgresql-channel.transactionCapacity = 100


        I didn'r really find any information about other files I am supposed to change and aren't really sure if all parameters are correct.
        I also tried the sample configuration from here http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/flume_extensions_catalogue/ngsi_postgresql_sink/index.html

        Cygnus seems to start correctly but all if I try to send a notification I get connection refused
        HD-Chapter Data [ 10838 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-03-02 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-03-02 15:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            andres.munoza Andres Muñoz
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: