Code Monkey home page Code Monkey logo

Comments (6)

dhondta avatar dhondta commented on June 16, 2024

I fixed a bug the make command. Normally, a simulation/campaign can be made without error. run is not tested yet.

from rpl-attacks.

dhondta avatar dhondta commented on June 16, 2024

Note that I added an ´update´ command to make it easier to either update Contiki-OS as well as RPL Attacks Framework.

from rpl-attacks.

dhondta avatar dhondta commented on June 16, 2024

Test Environment:

  • Ubuntu 14.04 LTS
  • Contiki-3.x-2370
  • OpenJDK 7

Status: successful

user@instant-contiki:rpl-attacks>> run_all sample-attack.json
2017-02-11 14:55:34 rpla[10135] INFO PROCESSING EXPERIMENT 'test'
user@instant-contiki:rpl-attacks>> status
┌Status of opened tasks────────┬──────────────────────────────────────────┐
│       Task      │   Status   │                  Result                  │
├─────────────────┼────────────┼──────────────────────────────────────────┤
│ test[run]       │ PENDING    │ Not defined yet                          │
└─────────────────┴────────────┴──────────────────────────────────────────┘
user@instant-contiki:rpl-attacks>> 
user@instant-contiki:rpl-attacks>> 
user@instant-contiki:rpl-attacks>> 
┌Status of opened tasks────────┬──────────────────────────────────────────┐
│       Task      │   Status   │                  Result                  │
├─────────────────┼────────────┼──────────────────────────────────────────┤
│ test[run]       │ SUCCESS    │ No result                                │
└─────────────────┴────────────┴──────────────────────────────────────────┘
user@instant-contiki:rpl-attacks>> versions
2017-02-11 14:57:24 rpla[10135] INFO CHECKING VERSIONS
2017-02-11 14:57:24 rpla[10135] WARNING Contiki-OS: 3.x-2370-ge3d5b74
2017-02-11 14:57:24 rpla[10135] WARNING RPL Attacks Framework: 1.1.2-13-gdbe7986

from rpl-attacks.

dhondta avatar dhondta commented on June 16, 2024

Test Environment:

  • Ubuntu 14.04 LTS
  • Contiki-3.x-3153
  • OpenJDK 8

Status: failed

user@instant-contiki:rpl-attacks>> run_all sample-attacks.json
2017-02-11 14:32:25 rpla[2200] INFO PROCESSING EXPERIMENT 'test'
user@instant-contiki:rpl-attacks>> status
┌Status of opened tasks────────┬────────────────────────────────────────────┐
│       Task      │   Status   │                   Result                   │
├─────────────────┼────────────┼────────────────────────────────────────────┤
│ test[make]      │ SUCCESS    │  No result                                 │
│ test[run]       │ FAIL       │ ValueError: min() arg is an empty sequence │
└─────────────────┴────────────┴────────────────────────────────────────────┘
user@instant-contiki:rpl-attacks>> versions
2017-02-11 14:35:22 rpla[2200] INFO CHECKING VERSIONS
2017-02-11 14:35:22 rpla[2200] WARNING Contiki-OS: 3.x-3153-g263af6f
2017-02-11 14:35:22 rpla[2200] WARNING RPL Attacks Framework: 1.1.2-13-gdbe7986

Cooja seems to fail because of a plugin, meaning that the simulations crash very early before making the expected results, thus resulting in an error in the parser.

I must still investigate to fix this compatibility issue.

from rpl-attacks.

dhondta avatar dhondta commented on June 16, 2024

Diagnostic: Neither Contiki-OS nor RPL Attacks Framework is the problem ; it seems that Rhino Javascript Engine was replaced by Nashorn JavaScript Engine in Java 8 and that importPackage (present in simulations' script.js) is not supported anymore and throws an error at Cooja's startup.

Solution: See templates/experiment/script.js, this line was added at the beginning for Rhino code support (still works with previous JDK versions) :

try { load("nashorn:mozilla_compat.js"); } catch(e) {}

References:

from rpl-attacks.

dhondta avatar dhondta commented on June 16, 2024

Cooja error is now handled in run command (see commit e77dc5f) ;

user@instant-contiki:rpl-attacks>> run_all sample-attacks.json
2017-02-14 12:55:37 rpla[3028] INFO PROCESSING EXPERIMENT 'test'
user@instant-contiki:rpl-attacks>> status
┌Status of opened tasks────────┬──────────────────────────────────────────┐
│       Task      │   Status   │                  Result                  │
├─────────────────┼────────────┼──────────────────────────────────────────┤
│ test[run]       │ PENDING    │ Not defined yet                          │
└─────────────────┴────────────┴──────────────────────────────────────────┘
user@instant-contiki:rpl-attacks>> 2017-02-14 12:55:51 rpla[3036] ERROR Cooja error:
FATAL [Thread-1] (LogScriptEngine.java:317) - Script error:
<eval>:2 ReferenceError: "importPackage" is not defined
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
	at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
	at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1441)
	at jdk.nashorn.internal.scripts.Script$Recompilation$1$40$\^eval\_.run(<eval>:2)
	at jdk.nashorn.javaadapters.java.lang.Runnable.run(Unknown Source)
	at org.contikios.cooja.plugins.LogScriptEngine$4.run(LogScriptEngine.java:300)
	at java.lang.Thread.run(Thread.java:745)
2017-02-14 12:55:51 rpla[3036] WARNING Cooja failed to execute ; 'run' interrupted (no parsing done)

┌Status of opened tasks────────┬──────────────────────────────────────────┐
│       Task      │   Status   │                  Result                  │
├─────────────────┼────────────┼──────────────────────────────────────────┤
│ test[run]       │ FAIL       │ Exception: Cooja failed to execute       │
└─────────────────┴────────────┴──────────────────────────────────────────┘
user@instant-contiki:rpl-attacks>> 
``` #

from rpl-attacks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.