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

FIWARE.Request.Lab.Problem with configuration of Cygnus in relation to MySQL.

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Good afternoon!
      For days we are having problems for the configuration of cygnus in relation
      to MySQL, since and as Fermín Galan recommended us, we want to save the
      historical data in an external database, in this way we will always have
      access to the historical data in a more comfortable and fast method.
      I explain step by step and with images our process carried out.

      1º We have deployed an instance of Orion in our Fiware Lab. Then we have
      configured our security group, as we have obtained the key pair and at our
      O.ContextBroker we have associated a public ip.

      2º Then using puttygen we have generated our ppk, then we have made the SSH
      connection through Putty and using the user "centos".

      3º In this step we have used the guide https://github.com/
      telefonicaid/fiware-cygnus/blob/master/doc/cygnus-ngsi/quick_start_guide.md.
      We have executed the following instruction

      *$ sudo cat> /etc/yum.repos.d/fiware.repo << EOL[Fiware]name = FIWARE
      repositorybaseurl = http: //repositories.lab.fiware.org/repo/rpm/6/
      <http://repositories.lab.fiware.org/repo/rpm/6/>gpgcheck = 0enabled = 1EOL**$
      sudo yum install cygnus*

      And we have updated the cygnus instacia that was included with our OrionCT.
      (image1.png)

      4th Then we have installed Java SDK, which has been installed correctly
      (image2.png).

      5º Next we have generated the variable JAVA_HOME permanently, editing / etc
      / profile (image3.png)

      sudo vi / etc / profile

      6º We have gone on to create our file cygnus_instance_1.conf and our file
      agent_1.conf. (Image4.conf)

      7º Using *sudo vi /usr/cygnus/conf/cygnus_instance_1.conf *and *sudo vi
      /usr/cygnus/conf/agent_1.conf*, we have created our configuration files
      (agent_1.txt and cygnus_instance_1.txt).

      8º Then we have created our subscription, so that when the start time of
      the activity stored in Orion is modified, it sends a notification to
      Cygnus. (image5.png).

      9º Making use of OrionExplorer I have verified that the subscription has
      been created correctly (image6.png).

      10º We do a quick test of operation to see that if we updating our entity,
      the history can is generated in MySQL. We have seen that the subscription
      works (image7.png), but the table with the historical ones is not generated
      in our server.

      In what section are we doing something wrong? This is the only step we need
      to store the data automatically, this way we can generate the .geojson
      files with a single step and thanks to the fiware technology, but
      unfortunately we have not yet been able to fix this problem.

      I have attached the cygnus.log that I obtained when running Cygnus as a
      service "sudo service cygnus start 1"

      Thank you very much for your help!
      Best regards!

      Francisco José Melgar Molina
      CTO Ciclogreen

      francisco.melgar@ciclogreen.com · www.ciclogreen.com

      41092 · Sevilla

      <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
      Libre
      de virus. www.avg.com
      <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
      <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

      __________________________________________________________________________________________

      You can get more information about our cookies and privacy policies on the following links:

      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-lab-help

      [Created via e-mail received from: Fran Melgar <francisco.melgar@ciclogreen.com>]

      1. [FIWARE-JIRA] (HELP-12983) [Fiware-lab-help] Problem with configuration of Cygnus in relation to MySQL
        9 kB
        FW External User
      2. agent_1..txt
        2 kB
        FW External User
      3. agent_1..txt
        2 kB
        FW External User
      4. cygnus_instance_1.txt
        0.2 kB
        FW External User
      5. cygnus_instance_1.txt
        0.2 kB
        FW External User
      6. cygnus.log
        11 kB
        FW External User
      7. CYGNUS.LOG.txt
        15 kB
        FW External User
      8. CYGNUS.LOG.txt
        15 kB
        FW External User
      1. image1.png
        122 kB
      2. image2.png
        108 kB
      3. image3.png
        90 kB
      4. image4.png
        136 kB
      5. image5.png
        46 kB
      6. image6.png
        42 kB
      7. image7.png
        42 kB

        Activity

        Hide
        fw.ext.user FW External User added a comment -

        Comment by francisco.melgar@ciclogreen.com :

        Good morning!
        For days we are having problems for the configuration of cygnus in relation
        to MySQL, since and as Fermín Galan recommended us, we want to save the
        historical data in an external database, in this way we will always have
        access to the historical data in a more comfortable and fast method.
        I explain step by step and with images our process carried out.

        1º We have deployed an instance of Orion in our Fiware Lab. Then we have
        configured our security group, as we have obtained the key pair and at our
        O.ContextBroker we have associated a public ip.

        2º Then using puttygen we have generated our ppk, then we have made the SSH
        connection through Putty and using the user "centos".

        3º In this step we have used the guidehttps://github.com/telefonicai
        d/fiware-cygnus/blob/master/doc/cygnus-ngsi/quick_start_guide.md. We have
        executed the following instruction

        *$ sudo cat> /etc/yum.repos.d/fiware.repo << EOL[Fiware]name = FIWARE
        repositorybaseurl = http: //repositories.lab.fiware.org/repo/rpm/6/
        <http://repositories.lab.fiware.org/repo/rpm/6/>gpgcheck = 0enabled = 1EOL**$
        sudo yum install cygnus*

        And we have updated the cygnus instacia that was included with our OrionCT.

        4th Then we have installed Java SDK, which has been installed correctly.

        5º Next we have generated the variable JAVA_HOME permanently, editing / etc
        / profile

        sudo vi / etc / profile

        6º We have gone on to create our file cygnus_instance_1.conf and our file
        agent_1.conf. (Image4.conf)

        7º Using *sudo vi /usr/cygnus/conf/cygnus_instance_1.conf *and *sudo vi
        /usr/cygnus/conf/agent_1.conf*, we have created our configuration files
        (agent_1.txt and cygnus_instance_1.txt).

        8º Then we have created our subscription, so that when the start time of
        the activity stored in Orion is modified, it sends a notification to Cygnus.

        9º Making use of OrionExplorer I have verified that the subscription has
        been created correctly.

        10º We do a quick test of operation to see that if we updating our entity,
        the history can is generated in MySQL. We have seen that the subscription
        works, but the table with the historical ones is not generated in our
        server.

        In what section are we doing something wrong? This is the only step we need
        to store the data automatically, this way we can generate the .geojson
        files with a single step and thanks to the fiware technology, but
        unfortunately we have not yet been able to fix this problem.

        I have attached the cygnus.log that I obtained when running Cygnus as a
        service "sudo service cygnus start 1"

        Thank you very much for your help!
        Best regards!

        Show
        fw.ext.user FW External User added a comment - Comment by francisco.melgar@ciclogreen.com : Good morning! For days we are having problems for the configuration of cygnus in relation to MySQL, since and as Fermín Galan recommended us, we want to save the historical data in an external database, in this way we will always have access to the historical data in a more comfortable and fast method. I explain step by step and with images our process carried out. 1º We have deployed an instance of Orion in our Fiware Lab. Then we have configured our security group, as we have obtained the key pair and at our O.ContextBroker we have associated a public ip. 2º Then using puttygen we have generated our ppk, then we have made the SSH connection through Putty and using the user "centos". 3º In this step we have used the guidehttps://github.com/telefonicai d/fiware-cygnus/blob/master/doc/cygnus-ngsi/quick_start_guide.md. We have executed the following instruction *$ sudo cat> /etc/yum.repos.d/fiware.repo << EOL [Fiware] name = FIWARE repositorybaseurl = http: //repositories.lab.fiware.org/repo/rpm/6/ < http://repositories.lab.fiware.org/repo/rpm/6/ >gpgcheck = 0enabled = 1EOL**$ sudo yum install cygnus* And we have updated the cygnus instacia that was included with our OrionCT. 4th Then we have installed Java SDK, which has been installed correctly. 5º Next we have generated the variable JAVA_HOME permanently, editing / etc / profile sudo vi / etc / profile 6º We have gone on to create our file cygnus_instance_1.conf and our file agent_1.conf. (Image4.conf) 7º Using *sudo vi /usr/cygnus/conf/cygnus_instance_1.conf *and *sudo vi /usr/cygnus/conf/agent_1.conf*, we have created our configuration files (agent_1.txt and cygnus_instance_1.txt). 8º Then we have created our subscription, so that when the start time of the activity stored in Orion is modified, it sends a notification to Cygnus. 9º Making use of OrionExplorer I have verified that the subscription has been created correctly. 10º We do a quick test of operation to see that if we updating our entity, the history can is generated in MySQL. We have seen that the subscription works, but the table with the historical ones is not generated in our server. In what section are we doing something wrong? This is the only step we need to store the data automatically, this way we can generate the .geojson files with a single step and thanks to the fiware technology, but unfortunately we have not yet been able to fix this problem. I have attached the cygnus.log that I obtained when running Cygnus as a service "sudo service cygnus start 1" Thank you very much for your help! Best regards!
        Hide
        jsalvachua Joaquin Salvachua added a comment -

        Hello Fran,

        Could you tell me, if the tests that I suggested were helpful for you?

        Show
        jsalvachua Joaquin Salvachua added a comment - Hello Fran, Could you tell me, if the tests that I suggested were helpful for you?
        Hide
        fw.ext.user FW External User added a comment -

        Comment by francisco.melgar@ciclogreen.com :

        Hi Joaquin!
        Thanks for your quick response, we have verified that the SH script has
        served us to open port 5050 that was causing a failure in the
        subscriptions, we have obtained the following result:

        • About to connect () to localhost port 5050 (# 0)
        • Trying :: 1 ... connected
        • Connected to localhost (:: 1) port 5050 (# 0)
          > POST / notify HTTP / 1.1
          > Host: localhost: 5050
          > Content-Type: application / json; charset = utf-8
          > Accept: application / json
          > User-Agent: orion / 0.10.0
          > Fiware-Service: /
          > Fiware-ServicePath: /
          > Content-Length: 460
          >
          <HTTP / 1.1 200 OK
          <Transfer-Encoding: chunked
          <Server: Jetty (6.1.26)
          <
        • Connection # 0 to host localhost left intact
        • Closing connection # 0

        So the failure with the subscription we give by resolved, but seeing the
        log of cygnus we have seen numerous errors related to Java.
        We still do not keep the historical ones in MySQL, what is happening? I
        enclose our last cygnus.log.

        Thank you very much for your cooperation!
        Best regards!

        <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
        Libre
        de virus. www.avg.com
        <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
        <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

        2017-12-04 13:34 GMT+01:00 Help-Desk <jira-help-desk@jira.fiware.org>:

        >
        >

        Show
        fw.ext.user FW External User added a comment - Comment by francisco.melgar@ciclogreen.com : Hi Joaquin! Thanks for your quick response, we have verified that the SH script has served us to open port 5050 that was causing a failure in the subscriptions, we have obtained the following result: About to connect () to localhost port 5050 (# 0) Trying :: 1 ... connected Connected to localhost (:: 1) port 5050 (# 0) > POST / notify HTTP / 1.1 > Host: localhost: 5050 > Content-Type: application / json; charset = utf-8 > Accept: application / json > User-Agent: orion / 0.10.0 > Fiware-Service: / > Fiware-ServicePath: / > Content-Length: 460 > <HTTP / 1.1 200 OK <Transfer-Encoding: chunked <Server: Jetty (6.1.26) < Connection # 0 to host localhost left intact Closing connection # 0 So the failure with the subscription we give by resolved, but seeing the log of cygnus we have seen numerous errors related to Java. We still do not keep the historical ones in MySQL, what is happening? I enclose our last cygnus.log. Thank you very much for your cooperation! Best regards! < http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail > Libre de virus. www.avg.com < http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> 2017-12-04 13:34 GMT+01:00 Help-Desk <jira-help-desk@jira.fiware.org>: > >
        Hide
        fermin Fermín Galán added a comment -

        Assigning to Fernando in the hope he can reasign to the proper people.

        Show
        fermin Fermín Galán added a comment - Assigning to Fernando in the hope he can reasign to the proper people.
        Hide
        jsalvachua Joaquin Salvachua added a comment -

        The new git repository is located at

        https://github.com/ging/fiware-cygnus

        The updated tutorial is been provided there.

        Show
        jsalvachua Joaquin Salvachua added a comment - The new git repository is located at https://github.com/ging/fiware-cygnus The updated tutorial is been provided there.
        Hide
        andres.munoza Andres Muñoz added a comment -

        Hi Fran,

        You have an error en your agent.conf file you have the wrong assignment of the cygnus-ngsi-2.sources.http-source.interceptors.gi.type you have set this with cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor when you have to set to :

        cygnus-ngsi-2.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder

        Please try that and give the feedback

        Show
        andres.munoza Andres Muñoz added a comment - Hi Fran, You have an error en your agent.conf file you have the wrong assignment of the cygnus-ngsi-2.sources.http-source.interceptors.gi.type you have set this with cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor when you have to set to : cygnus-ngsi-2.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder Please try that and give the feedback
        Hide
        andres.munoza Andres Muñoz added a comment -

        Hi Fran,

        Please, Could you give any feedback on the tests?

        Best Regards,

        Show
        andres.munoza Andres Muñoz added a comment - Hi Fran, Please, Could you give any feedback on the tests? Best Regards,
        Hide
        andres.munoza Andres Muñoz added a comment -

        Hi Fran,

        Do you have any feedback for us?

        Best Regards,

        Show
        andres.munoza Andres Muñoz added a comment - Hi Fran, Do you have any feedback for us? Best Regards,

          People

          • Assignee:
            andres.munoza Andres Muñoz
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: