shlee89 / athena

Apache License 2.0
13 stars 7 forks source link

Test application running error #2

Closed ttbachyinsda closed 6 years ago

ttbachyinsda commented 7 years ago

Hi, I am trying to test some functions of athena, and I have made a successful compilation in ubuntu 14.04 64bit and oracle JDK 8. But the command ./athena-run-realtime throws an exception like this: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/ttbachyinsda/athena-1.6/athena-tester/target/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/ttbachyinsda/athena-1.6/athena-tester/target/lib/slf4j-simple-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/ttbachyinsda/athena-1.6/athena-tester/target/lib/slf4j-jdk14-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] Initialize EventDeliveryManager !! Register Online Athena Feature Register java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.(Socket.java:434) at java.net.Socket.(Socket.java:211) at athena.util.ControllerConnector.sendToController(ControllerConnector.java:103) at athena.northbound.impl.EventDeliveryManagerImpl.sendRegisterOnlineFeature(EventDeliveryManagerImpl.java:115) at athena.northbound.impl.EventDeliveryManagerImpl.registerOnlineAthenaFeature(EventDeliveryManagerImpl.java:83) at athena.user.application.Sample.testOnlineDelivery(Sample.java:167) at athena.user.application.Main.start(Main.java:153) at athena.user.application.Main.main(Main.java:124) Exception in thread "main" java.lang.NullPointerException at athena.util.ControllerConnector.sendToController(ControllerConnector.java:109) at athena.northbound.impl.EventDeliveryManagerImpl.sendRegisterOnlineFeature(EventDeliveryManagerImpl.java:115) at athena.northbound.impl.EventDeliveryManagerImpl.registerOnlineAthenaFeature(EventDeliveryManagerImpl.java:83) at athena.user.application.Sample.testOnlineDelivery(Sample.java:167) at athena.user.application.Main.start(Main.java:153) at athena.user.application.Main.main(Main.java:124) log4j:WARN No appenders could be found for logger (athena.util.ControllerConnector). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

I think this exception may due to multiple SLF4J bindings, but I have not found the reason. Could you help me to find that?

shlee89 commented 7 years ago

Hello, According to the debugging messages, I think you miss to run a controller instance. The debugging message (Exception in thread "main" java.lang.NullPointerException at athena.util.ControllerConnector.sendToController(ControllerConnector.java:109) at ) indicates that there is no controller to register the event handler. Before starting to the athena application, please run the controller to delivery Athena features in run-time.

If you want to run Athena application in a batch manner, you don`t need to register an event handler.

Thanks.

ttbachyinsda commented 7 years ago

I have carefully checked my "make install" step, and I'm sure now some athena modules are running in ONOS, but the error still exists. I guess there might be some connection errors. But I run ONOS in one bash and test program in another bash, there should be no connection problem. So could you please show me the environment and tools that you used to run athena, maybe I used a problematic environment. Thanks! Below are the console output of onos:

onos> app activate org.onosproject.athenaproxy onos> app activate org.onosproject.framework onos> feature:list Name | Version | Installed | Repository | Description

onos-app-proxyarp | 1.6.0 | x | onos-app-proxyarp-1.6.0 | Proxy ARP/NDP application. onos-app-openstackswitching | 1.6.0 | | onos-app-openstackswitching-1.6.0 | SONA Openstack Networking Application onos-app-xos-client | 1.6.0 | | onos-app-xos-client-1.6.0 | XOS Client Application. onos-drivers-corsa | 1.6.0 | | onos-drivers-corsa-1.6.0 | Corsa device drivers onos-app-messaging-perf | 1.6.0 | | onos-app-messaging-perf-1.6.0 | Messaging performance test application. onos-app-fwd | 1.6.0 | x | onos-app-fwd-1.6.0 | Reactive forwarding application using flow subsyst onos-netcfg-links-provider | 1.6.0 | | onos-netcfg-links-provider-1.6.0 | Links provider that uses network config service to onos-app-iptopology-api | 1.6.0 | | onos-app-iptopology-api-1.6.0 | IP layer topology API. framework-security | 3.0.5 | | standard-3.0.5 | OSGi Security for Karaf standard | 3.0.5 | x | standard-3.0.5 | Karaf standard feature aries-annotation | 3.0.5 | | standard-3.0.5 | Aries Annotations wrapper | 3.0.5 | | standard-3.0.5 | Provide OS integration service-wrapper | 3.0.5 | | standard-3.0.5 | Provide OS integration (alias to wrapper feature) obr | 3.0.5 | | standard-3.0.5 | Provide OSGi Bundle Repository (OBR) support config | 3.0.5 | | standard-3.0.5 | Provide OSGi ConfigAdmin support region | 3.0.5 | | standard-3.0.5 | Provide Region Support package | 3.0.5 | | standard-3.0.5 | Package commands and mbeans http | 3.0.5 | x | standard-3.0.5 | Implementation of the OSGI HTTP Service http-whiteboard | 3.0.5 | | standard-3.0.5 | Provide HTTP Whiteboard pattern support war | 3.0.5 | x | standard-3.0.5 | Turn Karaf as a full WebContainer jetty | 8.1.15.v20140411 | | standard-3.0.5 | kar | 3.0.5 | | standard-3.0.5 | Provide KAR (KARaf archive) support webconsole | 3.0.5 | x | standard-3.0.5 | Base support of the Karaf WebConsole ssh | 3.0.5 | x | standard-3.0.5 | Provide a SSHd server on Karaf management | 3.0.5 | | standard-3.0.5 | Provide a JMX MBeanServer and a set of MBeans in K scheduler | 3.0.5 | | standard-3.0.5 | Provide a scheduler service in Karaf to fire event eventadmin | 3.0.5 | | standard-3.0.5 | OSGi Event Admin service specification for event-b jasypt-encryption | 3.0.5 | | standard-3.0.5 | Advanced encryption support for Karaf security scr | 3.0.5 | x | standard-3.0.5 | Declarative Service support blueprint-web | 3.0.5 | | standard-3.0.5 | Provides an OSGI-aware Servlet ContextListener for jolokia | 1.3.0 | | standard-3.0.5 | Jolokia monitoring support onos-host-provider | 1.6.0 | x | onos-host-provider-1.6.0 | ONOS host location provider. onos-app-bmv2-demo-ecmp | 1.6.0 | | onos-app-bmv2-demo-ecmp-1.6.0 | P4/BMv2 demo application with ECMP support for a 2 onos-app-athena-fwd | 1.6.0 | | onos-app-athena-fwd-1.6.0 | Reactive forwarding application using flow subsyst onos-of-provider-message | 1.6.0 | | onos-of-provider-message-1.6.0 | ONOS OpenFlow control message provider onos-null-provider | 1.6.0 | | onos-null-provider-1.6.0 | ONOS null southbound provider. onos-app-pceweb | 1.6.0 | | onos-app-pceweb-1.6.0 | Allows the user to visualize different types of pa onos-incubator-rpc | 1.6.0 | | onos-incubator-rpc-1.6.0 | ONOS inter-cluster RPC service onos-app-athena-security | 1.6.0 | | onos-app-athena-security-1.6.0 | Simple Security Routing Application onos-drivers-ovsdb | 1.6.0 | | onos-drivers-ovsdb-1.6.0 | OVSDB device drivers onos-app-openstackinterface-app | 1.6.0 | | onos-app-openstackinterface-app-1.6.0 | Openstack Interface Application. onos-bgpcep-app | 1.6.0 | | onos-bgpcep-app-1.6.0 | BGP PCEP protocol southbound providers onos-app-newoptical | 1.6.0 | | onos-app-newoptical-1.6.0 | Application for setup optical network onos-app-cip | 1.6.0 | | onos-app-cip-1.6.0 | Cluster IP alias application. onos-app-virtualbng | 1.6.0 | | onos-app-virtualbng-1.6.0 | Virtual broadband gateway application. onos-isis-app | 1.6.0 | | onos-isis-app-1.6.0 | Isis protocol southbound providers onos-app-bmv2-demo-wcmp | 1.6.0 | | onos-app-bmv2-demo-wcmp-1.6.0 | P4/BMv2 demo application with WCMP support for a 2 onos-incubator-rpc-grpc | 1.6.0 | | onos-incubator-rpc-grpc-1.6.0 | ONOS inter-cluster RPC based on gRPC onos-app-sfc-web | 1.6.0 | | onos-app-sfc-web-1.6.0 | Allows the user to visualize different types of pa onos-ovsdb-provider-host | 1.6.0 | | onos-ovsdb-provider-host-1.6.0 | ONOS information providers and control/management onos-bmv2-app | 1.6.0 | | onos-bmv2-app-1.6.0 | ONOS BMv2 southbound providers onos-app-pim | 1.6.0 | | onos-app-pim-1.6.0 | Protocol independent multicast emulation. onos-app-flowanalyzer | 1.6.0 | | onos-app-flowanalyzer-1.6.0 | Simple flow space analyzer. onos-drivers-cisco | 1.6.0 | | onos-drivers-cisco-1.6.0 | Cisco device drivers onos-drivers-ciena | 1.6.0 | | onos-drivers-ciena-1.6.0 | Ciena device drivers onos-framework-app | 1.6.0 | | onos-framework-app-1.6.0 | ONOS framework providers. It contains ... onos-app-optical | 1.6.0 | | onos-app-optical-1.6.0 | Packet/Optical use-case application. onos-app-athena-proxy | 1.6.0 | | onos-app-athena-proxy-1.6.0 | Reactive forwarding application using flow subsyst onos-app-election | 1.6.0 | | onos-app-election-1.6.0 | Master election test application. onos-netcfg-host-provider | 1.6.0 | | onos-netcfg-host-provider-1.6.0 | Host provider that uses network config service to onos-thirdparty-base | 1.6.0 | x | onos-1.6.0 | ONOS 3rd party dependencies onos-thirdparty-web | 1.6.0 | x | onos-1.6.0 | ONOS 3rd party dependencies for web apps onos-api | 1.6.0 | x | onos-1.6.0 | ONOS services and model API onos-core | 1.6.0 | x | onos-1.6.0 | ONOS core components onos-incubator | 1.6.0 | x | onos-1.6.0 | ONOS core incubator components onos-rest | 1.6.0 | x | onos-1.6.0 | ONOS REST API components onos-gui | 1.6.0 | x | onos-1.6.0 | ONOS GUI console components onos-cli | 1.6.0 | x | onos-1.6.0 | ONOS admin command console components onos-security | 1.6.0 | | onos-1.6.0 | Security-Mode ONOS onos-restsb-app | 1.6.0 | | onos-restsb-app-1.6.0 | REST protocol southbound providers onos-app-openstacknode | 1.6.0 | | onos-app-openstacknode-1.6.0 | SONA Openstack Node Bootstrap Application onos-drivers-bmv2 | 1.6.0 | | onos-drivers-bmv2-1.6.0 | Device drivers for p4.org reference softswitch BMv onos-app-pp | 1.6.0 | | onos-app-pp-1.6.0 | Allows the user to visualize different types of pa onos-app-sdnip | 1.6.0 | | onos-app-sdnip-1.6.0 | SDN-IP peering application onos-app-mobility | 1.6.0 | x | onos-app-mobility-1.6.0 | Host mobility application. onos-drivers-optical | 1.6.0 | | onos-drivers-optical-1.6.0 | Other optical device drivers onos-app-segmentrouting | 1.6.0 | | onos-app-segmentrouting-1.6.0 | Segment routing application onos-app-openstacknetworking-app | 1.6.0 | | onos-app-openstacknetworking-app-1.6.0 | Openstack Networking Application. onos-app-bgp-flow | 1.6.0 | | onos-app-bgp-flow-1.6.0 | ONOS framework applications onos-app-acl | 1.6.0 | | onos-app-acl-1.6.0 | ONOS ACL application. onos-app-mlb | 1.6.0 | | onos-app-mlb-1.6.0 | Application that balances mastership among nodes. onos-ovsdatabase | 1.6.0 | | onos-ovsdatabase-1.6.0 | OVSDB southbound meta application onos-drivers-lumentum | 1.6.0 | | onos-drivers-lumentum-1.6.0 | Lumentum device drivers onos-app-intent-perf | 1.6.0 | | onos-app-intent-perf-1.6.0 | intent performance test application. onos-app-vrouter | 1.6.0 | | onos-app-vrouter-1.6.0 | Virtual router (vRouter) application onos-snmp-app | 1.6.0 | | onos-snmp-app-1.6.0 | SNMP protocol southbound providers onos-pcep | 1.6.0 | | onos-pcep-1.6.0 | PCEP protocol southbound providers onos-app-dhcp | 1.6.0 | | onos-app-dhcp-1.6.0 | DHCP Server application onos-app-loadtest | 1.6.0 | | onos-app-loadtest-1.6.0 | Distributed consensus load test application. onos-lldp-provider | 1.6.0 | x | onos-lldp-provider-1.6.0 | ONOS LLDP link provider. onos-app-mfwd | 1.6.0 | | onos-app-mfwd-1.6.0 | Multicast forwarding application. onos-app-metrics | 1.6.0 | | onos-app-metrics-1.6.0 | Performance metrics collection application. onos-app-cpman | 1.6.0 | | onos-app-cpman-1.6.0 | Control Plane Management Application onos-drivers | 1.6.0 | x | onos-drivers-1.6.0 | Default device drivers onos-events | 1.6.0 | | onos-events-1.6.0 | ONOS event history display application. onos-app-reactive-routing | 1.6.0 | | onos-app-reactive-routing-1.6.0 | SDN-IP reactive routing application. onos-ovsdb-base | 1.6.0 | | onos-ovsdb-base-1.6.0 | OVSDB protocol southbound providers onos-drivers-bti | 1.6.0 | | onos-drivers-bti-1.6.0 | Builtin device drivers general module onos-app-pcep-api | 1.6.0 | | onos-app-pcep-api-1.6.0 | PCEP protocol API. onos-drivers-fujitsu | 1.6.0 | | onos-drivers-fujitsu-1.6.0 | Fujitsu device drivers onos-app-ganglia | 1.6.0 | | onos-app-ganglia-1.6.0 | Performance metric service reporter onos-app-xos-integration | 1.6.0 | | onos-app-xos-integration-1.6.0 | ONOS XOS integration application. onos-incubator-protobuf | 1.6.0 | | onos-incubator-protobuf-1.6.0 | ONOS ProtoBuf models onos-app-influxdb | 1.6.0 | | onos-app-influxdb-1.6.0 | Performance metric service reporter and retriever onos-app-flow-perf | 1.6.0 | | onos-app-flow-perf-1.6.0 | Flow performance test application. onos-app-pce | 1.6.0 | | onos-app-pce-1.6.0 | PCE as central controller. onos-app-vtn-onosfw | 1.6.0 | | onos-app-vtn-onosfw-1.6.0 | ONOS framework applications onos-app-kafka | 1.6.0 | | onos-app-kafka-1.6.0 | Export onos events to a Northbound Kafka server onos-netconf-app | 1.6.0 | | onos-netconf-app-1.6.0 | NETCONF protocol southbound providers onos-drivers-netconf | 1.6.0 | | onos-drivers-netconf-1.6.0 | NETCONF device drivers onos-app-athena-loadbalance | 1.6.0 | | onos-app-athena-loadbalance-1.6.0 | Simple Loadbalancing Application onos-scalablegateway | 1.6.0 | | onos-scalablegateway-1.6.0 | ONOS Scalable Gateway applications onos-app-graphite | 1.6.0 | | onos-app-graphite-1.6.0 | Performance metric service reporter and retriever onos-app-vpls | 1.6.0 | | onos-app-vpls-1.6.0 | Application to create L2 broadcast network using V onos-app-openstackrouting | 1.6.0 | | onos-app-openstackrouting-1.6.0 | SONA Openstack Networking Application onos-openflow-base | 1.6.0 | x | onos-openflow-base-1.6.0 | OpenFlow protocol southbound providers onos-app-distributed-primitives | 1.6.0 | | onos-app-distributed-primitives-1.6.0 | ONOS app to test distributed primitives. pax-jetty | 8.1.17.v20150415 | x | org.ops4j.pax.web-3.2.6 | Provide Jetty engine support pax-tomcat | 7.0.27.1 | | org.ops4j.pax.web-3.2.6 | Provide Tomcat engine support pax-http | 3.2.6 | x | org.ops4j.pax.web-3.2.6 | Implementation of the OSGI HTTP Service pax-http-whiteboard | 3.2.6 | x | org.ops4j.pax.web-3.2.6 | Provide HTTP Whiteboard pattern support pax-war | 3.2.6 | x | org.ops4j.pax.web-3.2.6 | Provide support of a full WebContainer onos-app-fm-onosfw | 1.6.0 | | onos-app-fm-onosfw-1.6.0 | ONOS fault management application onos-ospf-app | 1.6.0 | | onos-ospf-app-1.6.0 | OSPF protocol southbound providers onos-openflow | 1.6.0 | x | onos-openflow-1.6.0 | OpenFlow southbound meta application onos-app-drivermatrix | 1.6.0 | | onos-app-drivermatrix-1.6.0 | Driver behaviour support matrix. onos-bgp-app | 1.6.0 | | onos-bgp-app-1.6.0 | BGP protocol southbound providers onos-app-bgprouter | 1.6.0 | | onos-app-bgprouter-1.6.0 | BGP router application onos-app-demo | 1.6.0 | | onos-app-demo-1.6.0 | Flow throughput test application. onos>

shlee89 commented 7 years ago

Sorry for the late. I need to update the notification settings. Here is the answer what I reply by an email.

Hello FangZe, The exception means “the Athena application fails to connect the Athena framework instance running on the controller”. The problem is the current version of Athena does not have graceful connections. So, An order of executions is crucial to avoid exceptions. So, Please do followings to fix the problem;

1) First of all, turn of an Athena framework instance on ONOS CLI (app activate org.onosproject.framework) 2) Then, run the proxy instance (app activate org.onosproject.athenaproxy) 3) Finally, execute the Athena application instance.

That would be working.

Sincerely,

Seunghyeon.