foo.app sample command not found

37 views
Skip to first unread message

Anthony C

unread,
Oct 12, 2022, 7:05:50 PM10/12/22
to ONOS Developers
Hello!  I followed the well known "Template Application Tutorial" and had a 100% successful build of the org.foo.app application using the ONOS Tutorial OVA (version 1.15.0). I encountered NO issues whatsoever during the build per the instructions in the application tutorial, and I installed the required tools per instructions (python, python3, maven, java-11-jdk, etc.) and had a successful build of the foo app.  

However, the "sample" command returns a "Command not found:sample", see below.

Onos version 3.0.8
Ubuntu 16.04
(no further modifications made to ONOS Tutorial OVA)

onos> apps -s -a
*  27 org.onosproject.optical-model        1.15.0   Optical Network Model
*  29 org.onosproject.openflow-base        1.15.0   OpenFlow Base Provider
*  30 org.onosproject.lldpprovider         1.15.0   LLDP Link Provider
*  31 org.onosproject.hostprovider         1.15.0   Host Location Provider
*  33 org.onosproject.drivers              1.15.0   Default Drivers
*  66 org.onosproject.openflow             1.15.0   OpenFlow Provider Suite
* 161 org.onosproject.layout               1.15.0   UI Auto-Layout
* 166 org.onosproject.proxyarp             1.15.0   Proxy ARP/NDP
* 218 org.foo.app                          1.0.SNAPSHOT Foo App
onos> sample
Command not found: sample
onos> 

Any help you can provide would be GREATLY appreciated, thank you!

Regards,

Anthony

Davide Scano

unread,
Oct 13, 2022, 2:14:35 AM10/13/22
to ONOS Developers, Anthony C
Hi Anthony,

could you please share the ONOS logs?

best
Davide

Anthony C

unread,
Oct 13, 2022, 9:06:59 AM10/13/22
to ONOS Developers, 0ice...@gmail.com, Anthony C
Many thanks in advance for your time and help!!!  All logs follow, condensed to remove downloaded packages.

sdn@onos-tutorial:~/onos/bin$ export ONOS_POM_VERSION=2.0.0
sdn@onos-tutorial:~/onos/bin$ onos-create-app app org.foo foo-app 1.0-SNAPSHOT org.foo.app
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.2.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.2.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.2.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.onosproject:onos-bundle-archetype:2.7.0] found in catalog remote
Downloading: https://repo.maven.apache.org/maven2/org/onosproject/onos-bundle-archetype/2.0.0/onos-bundle-archetype-2.0.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/onosproject/onos-bundle-archetype/2.0.0/onos-bundle-archetype-2.0.0.pom (2 KB at 11.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/onosproject/onos-archetypes/2.0.0/onos-archetypes-2.0.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/onosproject/onos-archetypes/2.0.0/onos-archetypes-2.0.0.pom (3 KB at 21.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/onosproject/onos-bundle-archetype/2.0.0/onos-bundle-archetype-2.0.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/onosproject/onos-bundle-archetype/2.0.0/onos-bundle-archetype-2.0.0.jar (4 KB at 45.4 KB/sec)
[INFO] Using property: groupId = org.foo
[INFO] Using property: artifactId = foo-app
[INFO] Using property: version = 1.0-SNAPSHOT
[INFO] Using property: package = org.foo.app
Confirm properties configuration:
groupId: org.foo
artifactId: foo-app
version: 1.0-SNAPSHOT
package: org.foo.app
 Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: onos-bundle-archetype:2.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.foo
[INFO] Parameter: artifactId, Value: foo-app
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.foo.app
[INFO] Parameter: packageInPathFormat, Value: org/foo/app
[INFO] Parameter: package, Value: org.foo.app
[INFO] Parameter: groupId, Value: org.foo
[INFO] Parameter: artifactId, Value: foo-app
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Project created from Archetype in dir: /home/sdn/onos/bin/foo-app
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.790 s
[INFO] Finished at: 2022-10-13T05:44:07-07:00
[INFO] Final Memory: 18M/74M
[INFO] ------------------------------------------------------------------------
sdn@onos-tutorial:~/onos/bin$
sdn@onos-tutorial:cd foo-app
sdn@onos-tutorial:mvn clean install
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.foo.app.AppComponentTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.214 s - in org.foo.app.AppComponentTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-bundle-plugin:3.5.0:bundle (default-bundle) @ foo-app ---
[INFO]
[INFO] --- onos-maven-plugin:2.0:app (app) @ foo-app ---
[INFO] Building ONOS application package for org.foo.app (v1.0-SNAPSHOT)
[INFO]
[INFO] --- maven-install-plugin:3.0.1:install (default-install) @ foo-app ---
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-api/1.0.0.v20140518/aether-api-1.0.0.v20140518.jar
Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar (143 KB at 1924.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-api/1.0.0.v20140518/aether-api-1.0.0.v20140518.jar (134 KB at 1431.2 KB/sec)
[INFO] Installing /home/sdn/onos/bin/foo-app/pom.xml to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.pom
[INFO] Installing /home/sdn/onos/bin/foo-app/target/foo-app-1.0-SNAPSHOT.jar to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.jar
[INFO] Installing /home/sdn/onos/bin/foo-app/target/foo-app-1.0-SNAPSHOT.oar to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.oar
[INFO]
[INFO] --- maven-bundle-plugin:3.5.0:install (default-install) @ foo-app ---
[INFO] Installing org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.017 s
[INFO] Finished at: 2022-10-13T05:46:36-07:00
[INFO] Final Memory: 28M/100M
[INFO] ------------------------------------------------------------------------
sdn@onos-tutorial:~/onos/bin/foo-app$
sdn@onos-tutorial: onos-app localhost install! target/foo-app-1.0-SNAPSHOT.oar
sdn@onos-tutorial:~/onos/bin$ onos-app 172.17.0.5 install! foo-app/target/foo-app-1.0-SNAPSHOT.oar
{"name":"org.foo.app","id":278,"version":"1.0.SNAPSHOT","category":"default","description":"ONOS OSGi bundle archetype.","readme":"ONOS OSGi bundle archetype.","origin":"Foo, Inc.","url":"http://onosproject.org","featuresRepo":"mvn:org.foo/foo-app/1.0-SNAPSHOT/xml/features","state":"ACTIVE","features":["foo-app"],"permissions":[],"requiredApps":[]}
sdn@onos-tutorial:~/onos/bin$
sdn@onos-tutorial:onos-create-app cli org.foo foo-app 1.0-SNAPSHOT org.foo.app
[INFO] Using property: groupId = org.foo
[INFO] Using property: artifactId = foo-app
[INFO] Using property: version = 1.0-SNAPSHOT
[INFO] Using property: package = org.foo.app
Confirm properties configuration:
groupId: org.foo
artifactId: foo-app
version: 1.0-SNAPSHOT
package: org.foo.app
 Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: onos-cli-archetype:2.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.foo
[INFO] Parameter: artifactId, Value: foo-app
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.foo.app
[INFO] Parameter: packageInPathFormat, Value: org/foo/app
[INFO] Parameter: package, Value: org.foo.app
[INFO] Parameter: groupId, Value: org.foo
[INFO] Parameter: artifactId, Value: foo-app
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[WARNING] Can not override property: org.onosproject:onos-api:jar
[WARNING] Can not override property: org.onosproject:onlab-osgi:jar
[WARNING] Can not override property: org.onosproject:onos-api:jar:tests
[WARNING] Can not override property: junit:junit:jar
[WARNING] Can not override property: org.osgi:org.osgi.service.component.annotations:jar
[INFO] Try to merge plugin configuration of plugins with id: org.apache.felix:maven-bundle-plugin
[INFO] Try to merge plugin configuration of plugins with id: org.apache.maven.plugins:maven-compiler-plugin
[INFO] Try to merge plugin configuration of plugins with id: org.apache.felix:maven-scr-plugin
[INFO] Project created from Archetype in dir: /home/sdn/onos/bin/foo-app
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.219 s
[INFO] Finished at: 2022-10-13T05:54:19-07:00
[INFO] Final Memory: 19M/77M
[INFO] ------------------------------------------------------------------------
sdn@onos-tutorial:~/onos/bin$
sdn@onos-tutorial:mvn clean install
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ foo-app ---
[INFO] Deleting /home/sdn/onos/bin/foo-app/target
[INFO]
[INFO] --- onos-maven-plugin:2.0:swagger (swagger) @ foo-app ---
[INFO]
[INFO] --- onos-maven-plugin:2.0:cfg (cfg) @ foo-app ---
[INFO] Generating ONOS component configuration catalogues...
[INFO]
[INFO] --- maven-resources-plugin:3.3.0:resources (default-resources) @ foo-app ---
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ foo-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/sdn/onos/bin/foo-app/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.3.0:testResources (default-testResources) @ foo-app ---
[INFO] skip non existing resourceDirectory /home/sdn/onos/bin/foo-app/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ foo-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/sdn/onos/bin/foo-app/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) @ foo-app ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.foo.app.AppComponentTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.086 s - in org.foo.app.AppComponentTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-bundle-plugin:3.5.0:bundle (default-bundle) @ foo-app ---
[INFO]
[INFO] --- onos-maven-plugin:2.0:app (app) @ foo-app ---
[INFO] Building ONOS application package for org.foo.app (v1.0-SNAPSHOT)
[INFO]
[INFO] --- maven-install-plugin:3.0.1:install (default-install) @ foo-app ---
[INFO] Installing /home/sdn/onos/bin/foo-app/pom.xml to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.pom
[INFO] Installing /home/sdn/onos/bin/foo-app/target/foo-app-1.0-SNAPSHOT.jar to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.jar
[INFO] Installing /home/sdn/onos/bin/foo-app/target/foo-app-1.0-SNAPSHOT.oar to /home/sdn/.m2/repository/org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.oar
[INFO]
[INFO] --- maven-bundle-plugin:3.5.0:install (default-install) @ foo-app ---
[INFO] Installing org/foo/foo-app/1.0-SNAPSHOT/foo-app-1.0-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.831 s
[INFO] Finished at: 2022-10-13T05:55:38-07:00
[INFO] Final Memory: 34M/130M
[INFO] ------------------------------------------------------------------------
sdn@onos-tutorial:~/onos/bin/foo-app$
sdn@onos-tutorial:~/onos/bin$ onos-app 172.17.0.5 reinstall! foo-app/target/foo-app-1.0-SNAPSHOT.oar
{"name":"org.foo.app","id":278,"version":"1.0.SNAPSHOT","category":"default","description":"ONOS OSGi bundle archetype.","readme":"ONOS OSGi bundle archetype.","origin":"Foo, Inc.","url":"http://onosproject.org","featuresRepo":"mvn:org.foo/foo-app/1.0-SNAPSHOT/xml/features","state":"ACTIVE","features":["foo-app"],"permissions":[],"requiredApps":[]}
sdn@onos-tutorial:~/onos/bin$

onos> apps -s -a
*  44 org.onosproject.optical-model        1.15.0   Optical Network Model
*  46 org.onosproject.openflow-base        1.15.0   OpenFlow Base Provider
*  47 org.onosproject.lldpprovider         1.15.0   LLDP Link Provider
*  48 org.onosproject.hostprovider         1.15.0   Host Location Provider
*  51 org.onosproject.drivers              1.15.0   Default Drivers
* 104 org.onosproject.openflow             1.15.0   OpenFlow Provider Suite
* 223 org.onosproject.layout               1.15.0   UI Auto-Layout
* 226 org.onosproject.proxyarp             1.15.0   Proxy ARP/NDP
* 278 org.foo.app                          1.0.SNAPSHOT Foo App

onos> sample
Command not found: sample
onos>

Davide Scano

unread,
Oct 13, 2022, 9:14:44 AM10/13/22
to ONOS Developers, Anthony C, Davide Scano
Hi Anthony,

I'm referring to the controller's onos logs, you should see them in the bash where you run onos? wich version of onos you use?
I think that export ONOS_POM_VERSION=2.0.0 should be export ONOS_POM_VERSION=your onos version-SNAPSHOT

best
Davide

Anthony C

unread,
Oct 13, 2022, 9:23:45 AM10/13/22
to ONOS Developers, 0ice...@gmail.com, Anthony C
Hello! Many thanks for the very quick reply!  Here is all of the onos CLI output:

Waiting for onos-1 startup...
Waiting for onos-2 startup...
Waiting for onos-3 startup...
Activating OpenFlow and ProxyARP applications...
Activated org.onosproject.openflow
Activated org.onosproject.proxyarp
Activated org.onosproject.layout
Welcome to Open Network Operating System (ONOS)!
     ____  _  ______  ____    
    / __ \/ |/ / __ \/ __/  
   / /_/ /    / /_/ /\ \    
   \____/_/|_/\____/___/    
                               
Documentation: wiki.onosproject.org      
Tutorials:     tutorials.onosproject.org
Mailing lists: lists.onosproject.org    

Come help out! Find out how at: contribute.onosproject.org

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.


onos> apps -s -a
*  44 org.onosproject.optical-model        1.15.0   Optical Network Model
*  46 org.onosproject.openflow-base        1.15.0   OpenFlow Base Provider
*  47 org.onosproject.lldpprovider         1.15.0   LLDP Link Provider
*  48 org.onosproject.hostprovider         1.15.0   Host Location Provider
*  51 org.onosproject.drivers              1.15.0   Default Drivers
* 104 org.onosproject.openflow             1.15.0   OpenFlow Provider Suite
* 223 org.onosproject.layout               1.15.0   UI Auto-Layout
* 226 org.onosproject.proxyarp             1.15.0   Proxy ARP/NDP
* 278 org.foo.app                          1.0.SNAPSHOT Foo App
onos> sample
Command not found: sample
onos> version
3.0.8
onos>

Davide Scano

unread,
Oct 13, 2022, 10:06:11 AM10/13/22
to ONOS Developers, Anthony C, Davide Scano
Hi,
  1. I belive that you have to set export ONOS_POM_VERSION=your onos version-SNAPSHOT.
  2. I think that you are deploying a onos cluster, so you should run the docker container without -d

Best,
Davide

Message has been deleted

Anthony C

unread,
Oct 13, 2022, 10:37:56 AM10/13/22
to ONOS Developers, 0ice...@gmail.com, Anthony C
Hello, here is the out from setting ONOS_POM_VERSION=3.0.8-SNAPSHOT ("version" output from CLI is 3.0.8):

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.583 s
[INFO] Finished at: 2022-10-13T07:36:32-07:00
[INFO] Final Memory: 18M/70M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.onosproject:onos-bundle-archetype:3.0.8-SNAPSHOT) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Anthony C

unread,
Oct 13, 2022, 10:42:27 AM10/13/22
to ONOS Developers, Anthony C, 0ice...@gmail.com
Here is the ONOS Cluster Setup script included in the tutorial (I don't see a "-d" switch after the docker command):

#!/bin/bash
export PATH="$PATH:bin:onos/bin"

SSH_KEY=$(cut -d\  -f2 ~/.ssh/id_rsa.pub)

# Create Atomix cluster using Atomix docker image
ATOMIX_IMAGE=atomix/atomix:3.0.10
for i in {1..3}; do
    echo "Setting up atomix-$i..."
    docker container run --detach --name atomix-$i --hostname atomix-$i \
        --restart=always -v /home/sdn/bin/config:/atomix $ATOMIX_IMAGE \
        --config /atomix/atomix-$i.conf
done

# Create ONOS cluster using ONOS docker image
ONOS_IMAGE=onosproject/onos:1.15.0
for i in {1..3}; do
    echo "Setting up onos-$i..."
    docker container run --detach --name onos-$i --hostname onos-$i --restart=always $ONOS_IMAGE
    docker exec -i onos-$i /bin/bash -c "mkdir config; cat > config/cluster.json" < $(dirname $0)/config/cluster-$i.json
    docker exec -it onos-$i bin/onos-user-key sdn $SSH_KEY  >/dev/null 2>&1
    docker exec -it onos-$i bin/onos-user-password onos rocks >/dev/null 2>&1
done

function waitForStart {
    sleep 5
    for i in {1..3}; do
        echo "Waiting for onos-$i startup..."
        ip=$(docker container inspect onos-$i | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
        for t in {1..60}; do
            curl --fail -sS http://$ip:8181/onos/v1/applications --user onos:rocks 1>/dev/null 2>&1 && break;
            sleep 1;
        done
        onos $ip summary >/dev/null 2>&1
    done
}

# Extract the IP addresses of the ONOS nodes
OC1=$(docker container inspect onos-1 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
OC2=$(docker container inspect onos-2 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
OC3=$(docker container inspect onos-3 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
ONOS_INSTANCES="$OC1 $OC2 $OC3"

waitForStart

echo "Activating OpenFlow and ProxyARP applications..."
onos $OC1 app activate org.onosproject.openflow proxyarp layout
onos $OC1

Davide Scano

unread,
Oct 13, 2022, 10:46:17 AM10/13/22
to ONOS Developers, Anthony C, Davide Scano
Hi,
  • I believe that you are running the ONOS version 3.0.0-SNAPSHOT. 
  • Instead of running a onos cluster/multiple istances you should ran a single ONOS istance, an check the karaf log that you should see in the bash where you run the container
  • Here https://wiki.onosproject.org/display/ONOS/Single+Instance+Docker+deployment, under the section Attaching to the CLI  you should see how to access to the karaf log.
Best,

Davide

Anthony C

unread,
Oct 13, 2022, 11:38:13 AM10/13/22
to ONOS Developers, 0ice...@gmail.com, Anthony C
Hello!  Your 2 suggestions fixed the issue!!!

1) set ONOS_POM_VERSION=3.0.0-SNAPSHOT
2) I ran a single ONOS instance on a different machine, stopped using the ONOS Tutorial VM. 

Please see below for logs and thank you again!!!

2022-10-13T09:18:47,971 | INFO  | onos-store-app-app-activation | ApplicationManager               | 197 - org.onosproject.onos-core-net - 3.0.0.SNAPSHOT | Application org.foo.app has been activated
2022-10-13T09:18:48,227 | INFO  | CM Event Dispatcher (Fire ConfigurationEvent: pid=org.foo.app.AppComponent) | AppComponent                     | 217 - org.foo.foo-app - 1.0.0.SNAPSHOT | Reconfigured
2022-10-13T09:19:33,582 | INFO  | onos-store-app-app-activation | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Removing features: foo-app/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
2022-10-13T09:19:34,108 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Changes to perform:
2022-10-13T09:19:34,108 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   Region: root
2022-10-13T09:19:34,108 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |     Bundles to uninstall:
2022-10-13T09:19:34,109 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |       org.foo.foo-app/1.0.0.SNAPSHOT
2022-10-13T09:19:34,109 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Stopping bundles:
2022-10-13T09:19:34,109 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   org.foo.foo-app/1.0.0.SNAPSHOT
2022-10-13T09:19:34,111 | INFO  | features-3-thread-1 | AppComponent                     | 217 - org.foo.foo-app - 1.0.0.SNAPSHOT | Stopped
2022-10-13T09:19:34,116 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Uninstalling bundles:
2022-10-13T09:19:34,117 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   org.foo.foo-app/1.0.0.SNAPSHOT
2022-10-13T09:19:34,121 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Refreshing bundles:
2022-10-13T09:19:34,121 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |     org.foo.foo-app/1.0.0.SNAPSHOT (Bundle will be uninstalled)
2022-10-13T09:19:34,125 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Done.
2022-10-13T09:19:34,127 | INFO  | onos-store-app-app-activation | ApplicationManager               | 197 - org.onosproject.onos-core-net - 3.0.0.SNAPSHOT | Application org.foo.app has been uninstalled
2022-10-13T09:19:34,152 | INFO  | onos-store-app-app-activation | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Adding features: foo-app/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
2022-10-13T09:19:34,718 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Changes to perform:
2022-10-13T09:19:34,718 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   Region: root
2022-10-13T09:19:34,718 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |     Bundles to install:
2022-10-13T09:19:34,718 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |       mvn:org.foo/foo-app/1.0-SNAPSHOT
2022-10-13T09:19:34,720 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Installing bundles:
2022-10-13T09:19:34,720 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   mvn:org.foo/foo-app/1.0-SNAPSHOT
2022-10-13T09:19:34,729 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Starting bundles:
2022-10-13T09:19:34,729 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 |   org.foo.foo-app/1.0.0.SNAPSHOT
2022-10-13T09:19:34,738 | INFO  | features-3-thread-1 | AppComponent                     | 218 - org.foo.foo-app - 1.0.0.SNAPSHOT | Started
2022-10-13T09:19:34,739 | INFO  | features-3-thread-1 | CommandExtension                 | 54 - org.apache.karaf.shell.core - 4.2.14 | Registering commands for bundle org.foo.foo-app/1.0.0.SNAPSHOT
2022-10-13T09:19:34,740 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 13 - org.apache.karaf.features.core - 4.2.14 | Done.
2022-10-13T09:19:34,741 | INFO  | onos-store-app-app-activation | ApplicationManager               | 197 - org.onosproject.onos-core-net - 3.0.0.SNAPSHOT | Application org.foo.app has been activated
2022-10-13T09:19:34,990 | INFO  | CM Event Dispatcher (Fire ConfigurationEvent: pid=org.foo.app.AppComponent) | AppComponent                     | 218 - org.foo.foo-app - 1.0.0.SNAPSHOT | Reconfigured
2022-10-13T09:29:57,522 | WARN  | sshd-SshServer[18042f78](port=8101)-nio2-thread-2 | ServerSessionImpl                | 65 - org.apache.sshd.osgi - 2.5.1 | exceptionCaught(ServerSessionImpl[karaf@/127.0.0.1:46524])[state=Opened] InterruptedByTimeoutException: null

Anthony C

unread,
Sep 29, 2023, 7:25:02 PM9/29/23
to Davide Scano, ONOS Developers
Davide,

I have tried to get your network slice application working but after successfully installing and starting the application, the intents go into a "FAILED" state for the intended slices.  ONOS version is 4.2.14. Here's a quick rundown of my actions:

First:
$ sudo mn --custom dscano/QoS-Slicing-main/topology.py --mac --controller=remote,ip=127.0.0.1 --switch ovs,protocols=OpenFlow13

Second:
# bazel run onos-local -- clean debug

Third:
karaf@root > app activate org.onosproject.vpls

Fourth:
# onos-app localhost install! dscano/QoS-Slicing-main/target/qosslice-app-2.3.0-rc3.oar

Fifth:
karaf@root > app activate org.onosproject.vpls                          17:14:00
Activated org.onosproject.vpls
karaf@root > app activate org.onosproject.qosslice                      17:14:19
Activated org.onosproject.qosslice
karaf@root > interface-add of:0000000000000001/1 h1                     17:15:38
Interface added
karaf@root > interface-add of:0000000000000004/1 h2                     17:16:37
Interface added
karaf@root > vpls create VPLS-1                                         17:16:43
karaf@root > vpls add-if VPLS-1 h1                                      17:16:50
karaf@root > vpls add-if VPLS-1 h2                                      17:17:00
karaf@root >  

Then in the intents view the following is the result.  Could you help troubleshoot?  Thank you!

karaf@root > intents                                                    17:19:32
Id: 0x3
State: FAILED
Key: VPLS-1-brc-of:0000000000000001-1-FF:FF:FF:FF:FF:FF
Intent type: SinglePointToMultiPointIntent
Application Id: org.onosproject.vpls
Leader Id: 127.0.0.1
Common ingress selector: ETH_DST:FF:FF:FF:FF:FF:FF
Treatment: [NOACTION]
Constraints: [PartialFailureConstraint]
Ingress connect points and individual selectors
 -> Connect Point: of:0000000000000001/1   Selector: Inherited
Egress connect points and individual selectors
 -> Connect Point: of:0000000000000004/1   Selector: Inherited

Id: 0x2
State: FAILED
Key: VPLS-1-brc-of:0000000000000004-1-FF:FF:FF:FF:FF:FF
Intent type: SinglePointToMultiPointIntent
Application Id: org.onosproject.vpls
Leader Id: 127.0.0.1
Common ingress selector: ETH_DST:FF:FF:FF:FF:FF:FF
Treatment: [NOACTION]
Constraints: [PartialFailureConstraint]
Ingress connect points and individual selectors
 -> Connect Point: of:0000000000000004/1   Selector: Inherited
Egress connect points and individual selectors
 -> Connect Point: of:0000000000000001/1   Selector: Inherited

Id: 0x6
State: FAILED
Key: VPLS-1-uni-of:0000000000000001-1-00:00:00:00:00:01
Intent type: MultiPointToSinglePointIntent
Application Id: org.onosproject.vpls
Leader Id: 127.0.0.1
Common ingress selector: ETH_DST:00:00:00:00:00:01
Treatment: [NOACTION]
Constraints: [PartialFailureConstraint]
Ingress connect points and individual selectors
 -> Connect Point: of:0000000000000004/1   Selector: Inherited
Egress connect points and individual selectors
 -> Connect Point: of:0000000000000001/1   Selector: Inherited

karaf@root >                                                  

Regards,

Anthony C















Reply all
Reply to author
Forward
0 new messages