Hello, In the past days I've been trying to make an instance of cep-r3.3.3-img work as expected in Fi-Lab. The issue I'm having is that the proton server is not writing to the output files in '/opt/tomcat10/sample/' as demonstrated in the tutorial in Topic 3 of CEP's course in edu.fiware.org, when trying the DoSAttak2 definition. As an endgoal application, I will want to have CEP send a rest report to an email service, that will use the values to send a template mail to a given email, and recieving values through a rest push from another application. So reading and writing from server files is just an intermediate test stage. To describe and recreate this issue I created a new instance of this image in my fi-lab account and, with no changes to the instance, I use Postman service to http the following verbs to the server: GET http://{ip}:{port}/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer - Response: 200 OK, with the url for the definition as DoSAttack, not the desired DoSAttack2 PUT http://{ip}:{port}/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer > Body: {"action": "ChangeDefinitions","definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack2"} To change the definition being used to the one that is tested in the tutorial. GET http://{ip}:{port}/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer - Response: 200 OK, with the url for the definition as DoSAttack2. (to check the instance is using the correct definition) At this point I ssh into the instance and check the report file on '/opt/tomcat10/sample/DoSAttack_TrafficReport.txt' with vi command. It contains the three example entries, as shown in the attached file. I also check '/opt/tomcat10/sample/DoSAttack_PredictedCrash.txt'. It contains the example report riggered by the three example values. Then, I send some values myself, with post verb:POST http://{ip}:{port}/ProtonOnWebServer/rest/events > Body: {"Name": "TrafficReport", "volume":"10"} (All POSTs and PUTs take a header with Content-Type:application/json) I check again the report file and find no entries with the value of "volume":"10". Only the tree example entries. To test it even further I send 4 more POSTs with values of 11, 25, 55, 115. This should trigger the Predicted cCrash event and write to the file DoSAttack_PredictedCrash.txt as well. I check both files and no new entries are visible. I made more tries, but no deal. By checking catalina.out I can see that the Expected Crash event was indeed triggered in the run of the 4 eventes above and passed to proton runtime, but not on next tests.____ After several tries and also checking catalina.out log file (all seems normal) I sent an email to Tali Haham (below),contact person given in the CEPs catalogue.fiware page, with a brief description of the issue. She sugested stopping and starting tomact. To do this, on the same instance as above, I check the server is ok with Postman:GET http://{ip}:{port}/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServerEverything is ok, so I access the folder '/opt/tomcat10/bin' through ssh and try to use the command '# sh shutdown.sh' to stop tomcat. I get a message that this can't be done because nor JAVA_HOME nor JRE_HOME environment valiables are defined. So I execute the following commands as root: # export JAVA_HOME=/opt/jdk1.6.0_33 # export PATH="$PATH:$JAVA_HOME/bin" I don't know if this is the correct/best way to do it, but shutdown of tomcat is successful. I restart it with # sh startup.sh. Then I tried to perform the same GET on the server to see if the application is ok and now it responds: 500 with body: 'Could not read instance state, message: null/webapps/ProtonOnWebServer/Proton.properties (No such file or directory), stack trace: [Ljava.lang.StackTraceElement;@247510e7' Because of that, I log in to the tomcat at 8080 port, into the manager, with the credentials available in the file '/opt/tomcat10/conf/tomcat-users.xml '. I stop and start all 4 applications pertaining proton, 2 authoring tool and 2 of the server. After this, I still can't get a 200 OK from the the Server, because it can't read the instance state. Some other verbs work, like GET http://{ip}:{port}/ProtonOnWebServerAdmin/resources/definitions, to check the definitions available. I'm also able do POST more values with OK response, but no new entry shows up on the files. But, because I can't check what definition is beeing used, I can't tell if the restart did work. ____I also tried to just stop and start the 4 applications in tomcat in another instance, but it didn't work. It still didn't wrote to the files. I still have some other things to try, including stopping the 4 applications before shuting down and starting tomcat. If that doesn't work I will also try to install a VM on my computer with tomcat and proton and work locally, which I would eventually do. Because catalina.out contains all actions performed on tomcat since the original image was created and configured, including the execution of the examples, I will try and study it to se if I'm missing something as well. Perhaps it's something very simple that I'm missing. Thank you, Arthur Vieira To: arthurmvieira at hotmail.com CC: FABIANA at il.ibm.com Subject: Re: Issue with CEP instance on Fi-Lab From: TALI at il.ibm.com Date: Wed, 8 Jul 2015 11:51:08 -0500 Hello Arthur, Usually this is a problem with the file path. Please stop and start tomcat (directly, not through the rest api). You can also take a look at the tomcat log file (catalina.out under <tomcat installation dir>/logs ) and see if there are error there. If you still have a problem, please write it with all the details, and with the log file attachment to fiware-tech-help at lists.fi-ware.org this way, FIWARE will open a ticket to handle it, and it will be assigned to my colleague that is replacing me during those months as a contact point for the CEP in FIWARE. Best regards, Tali Tali Yatzkar Haham Smart Decision Solutions IBM Haifa Research Lab, Israel tali at il.ibm.com 972-4-8296320 From: Arthur Vieira <arthurmvieira at hotmail.com> To: Tali Yatzkar-Haham/Haifa/IBM at IBMIL Date: 08/07/2015 11:34 AM Subject: Issue with CEP instance on Fi-Lab Hello, Recently I've been trying to work with CEP, using Fi-Lab's image cep-r3.3.3-img. After configuring the Cloud's instance (details below), I get good ssh access and am able to use Postman to test DoSAttack2. What I find is that I can't get the example DoSAttack2 to write to the files in the /sample directory, when trying to recreate what is done in the example given in the CEP tutorial, in Topic 3 of edu.fiware.org. By using Postman I send the verbs: -GET, url: <ip>/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer, and get OK 200 with state "started" and definitions-url "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack2" -GET, url: <ip>/ProtonOnWebServerAdmin/resources/definitions, and get the 'name' and 'url' for DoSAttack and DoSAttack2 (currently the only 2 projects in the repository). -POST, url <ip>/ProtonOnWebServer/rest/events, with the body content: {"Name":"TrafficReport","volume":"10"}, to test the DoSAttack2. I get OK 200. So it should have worked. To check, I access the server through ssh and check the file '/opt/tomcat10/sample/DoSAttack_TrafficReport.txt' for a new input. What I get is that the file doesn't get altered. No new entry. Sending several POSTs in a row with increasing values of 10,100,1000, doesn't alter neither files DoSAttack_TrafficReport.txt nor DoSAttack_PredictedCrash.txt. So maybe I'm missing something. --------------------- Fi-Lab's Cloud Configuration:- node: Spain - Security group with ports 22, 80, 8080 and 8686. - Flavour: Medium - 4096 RAM | 2 VCPU | 40GB Disk --------------------- If you need more information, please let me know. Thank you, Arthur -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150712/2b364a32/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: catalina.out Type: application/octet-stream Size: 158756 bytes Desc: not available URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150712/2b364a32/attachment.obj> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DoSAttack_PredictedCrash.txt URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150712/2b364a32/attachment.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DoSAttack_TrafficReport.txt URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150712/2b364a32/attachment-0001.txt>
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy