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

FIWARE.Request.Tech.Data.CEP.Error running sample

    Details

    • HD-Chapter:
      Data
    • HD-Enabler:
      CEP

      Description

      Hi,

      I installed the CEP GE - IBM Proactive Technology Online following the
      instructions found in the
      CEP GE - IBM Proactive Technology Online Installation and Administration
      Guide [1].

      I was able to successfully deploy the application to Tomcat. But I had a
      problem running the sample, referred in section "Sanity check procedures
      End to End Testing" [2]:
      I extracted the sample directory (sample.zip) found inside the zip file
      IBMProtonOnWebServer.zip (downloaded from the repository [3]) to the root
      directory of Tomcat.
      When starting Tomcat I can see a warning:
      "WARNING: initializeAdapters: failed to initialize adapter Input adapter
      for producer: P1, reason: ./config/input-for-dosAttack.txt (No such file or
      directory)".
      The file "./config/input-for-dosAttack.txt" is defined in the file
      ./webapps/ProtonOnWebServer/DoSAttack2.json. The JSON file is read by the
      application ProtonOnWebServer due to being configured, by default, in the
      ./webapps/ProtonOnWebServer/Proton.properties file, with "metadataFileName
      = DoSAttack2.json".
      To successfully run the sample when deploying the Proton war file I need to
      create a directory named "config" in the root directory of Tomcat and copy
      the file input-for-dosAttack.txt from ./webapps/ProtonOnWebServer/ to this
      new folder. Or alternatively, change "./config/input-for-dosAttack.txt" to
      "./webapps/ProtonOnWebServer/input-for-dosAttack.txt" in the file
      ./webapps/ProtonOnWebServer/DoSAttack2.json.

      There are other issues related with loading the samples.

      The DoSAttack_SteepDemand.txt is not generated, as described in [2], when
      running the samples (after the changes referred above). Instead, is
      generated a file named DoSAttack_PredictedCrash.txt.

      According to [2], a file named DoSAttack.json, located in the sample
      folder contains paths for the input event file and for the output files.
      Actually the file loaded with the sample is the
      file ./webapps/ProtonOnWebServer/DoSAttack2.json.

      In [2] is written"If you run on linux, you should change the 3 relative
      paths in this file to ".\/sample\/" instead of "../sample/"", but all the
      JSON files have Linux path, so is the opposite, it is the Windows users
      that need to change the path instead of the Linux ones.

      There are several JSON files with Proton definition spread over different
      locations that may confuse someone who is testing the app. Like:
      ./webapps/AuthoringToolWebServer/SavedProjects/ (3 files showed in the Open
      Project drop menu in [4])
      ./webapps/ProtonOnWebServer/DoSAttack2.json (definition file loaded when
      deploying the app)
      Additionally there are the JSON files included in the samples folder. These
      definition files found in the sample folder can be imported and loaded from
      the "Import project..." menu in [4]. These sample files do not run just by
      copying the sample folder to Tomcat root directory, as described in [2].

      Testing setup:
      OS: Linux OpenSUSE 13.1
      Tomcat: 7.0.26
      Browser: Google Chrome

      [1]
      https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_Installation_and_Administration_Guide
      [2]
      https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_Installation_and_Administration_Guide#Sanity_check_procedures
      [3] https://github.com/ishkin/Proton
      [4] http://localhost:8080/AuthoringTool/

      Regards,

      • -
        Pedro Alves
        pgalves@onesource.pt <joagonca@onesource.pt>

      [image: OneSource]
      http://onesource.pt

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

        Activity

        Hide
        TALI Fabiana Fournier added a comment -

        Thank you for the detailed findings.

        You raised several issues. I removed the sample run from the Sanity Check Procedure of [1]. Instead I pointed to Unit Test 1 [5]. In this test I didn't relay on default configuration but described how to set the engine to work with specific definition file, how to change the path of the input and output files.

        As you pointed out, there are several places where you can find JSON files. I removed one of them. Now you can find JSON files at:
        1, ./webapps/AuthoringToolWebServer/SavedProjects/ - this is the place the UI keeps its
        projects. When you save a project in the UI, it is places there.
        2. The engine repository - you didn't mention this place. The engine also manage definition repository.
        3. the JSON file located in the sample project. It is used to run the DoSAttack sample in a simple way, without the need to export it from the UI, and the need to use the REST command to set the engine to work with definition file from the engine repository.

        I removed the DoSAttack,json from ./webapps/ProtonOnWebServer/

        [5] https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_Unit_Testing_Plan#Unit_Test_1

        Show
        TALI Fabiana Fournier added a comment - Thank you for the detailed findings. You raised several issues. I removed the sample run from the Sanity Check Procedure of [1] . Instead I pointed to Unit Test 1 [5] . In this test I didn't relay on default configuration but described how to set the engine to work with specific definition file, how to change the path of the input and output files. As you pointed out, there are several places where you can find JSON files. I removed one of them. Now you can find JSON files at: 1, ./webapps/AuthoringToolWebServer/SavedProjects/ - this is the place the UI keeps its projects. When you save a project in the UI, it is places there. 2. The engine repository - you didn't mention this place. The engine also manage definition repository. 3. the JSON file located in the sample project. It is used to run the DoSAttack sample in a simple way, without the need to export it from the UI, and the need to use the REST command to set the engine to work with definition file from the engine repository. I removed the DoSAttack,json from ./webapps/ProtonOnWebServer/ [5] https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/CEP_GE_-_IBM_Proactive_Technology_Online_Unit_Testing_Plan#Unit_Test_1
        Hide
        TALI Fabiana Fournier added a comment -

        Answered long ago, forgot to close

        Show
        TALI Fabiana Fournier added a comment - Answered long ago, forgot to close

          People

          • Assignee:
            TALI Fabiana Fournier
            Reporter:
            pgalves Pedro Alves
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: