ONOS UI error: Invalid authentication token

0 views
Skip to first unread message

molari.a...@gmail.com

unread,
Oct 11, 2017, 2:52:09 AM10/11/17
to ONOS Developers
I'm trying to develop a ONOS UI with a tabular view that handles the click event.

The first UI (tabular view) loads correctly.
However when I try to click on a row, I get the following error:

Oops!

Server reports error...

invalid authentication token

Server-side I see the following errors:

2017-10-11 08:49:21,863 | INFO  | qtp1651654593-39 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | GUI client connected -- user <UI-user>
2017-10-11 08:49:21,865 | WARN  | qtp1651654593-39 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Invalid Authentication Token: {"event":"authentication","payload":{"token":"4k230s9791umm6lsbpbbklmv9i"}}
2017-10-11 08:49:23,375 | WARN  | qtp1651654593-40 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Non-Authenticated Web Socket: {"event":"mcs-avail-operationsDataRequest","payload":{}}

I've strictly followed the tutorial.

It seems the authentication token gets lost between requests (payload is empty in the second request).

I didn't do anything special to manage authentication token, am I supposed to do anything client-side to pass authentication token?

Thanks,
Alessandro

Alessandro Molari

unread,
Oct 11, 2017, 3:05:17 AM10/11/17
to onos...@onosproject.org

If it can help, I get this error in browser's console (see attachment).

--
You received this message because you are subscribed to a topic in the Google Groups "ONOS Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/a/onosproject.org/d/topic/onos-dev/6WzwkB7C1AI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/6a0b4531-028b-4066-bdca-00754071c93d%40onosproject.org.

--

Alessandro Molari molari.a...@gmail.com
2017-10-11-090436_2846x518_scrot.png

Alessandro Molari

unread,
Oct 11, 2017, 6:17:50 AM10/11/17
to onos...@onosproject.org

Some more logs:

onosproject.onos-gui - 1.12.0.SNAPSHOT | GUI client connected -- user <onos>
2017-10-11 12:12:54,950 | INFO  | tp1467173387-259 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Session token authenticated
2017-10-11 12:13:05,033 | WARN  | tp1467173387-290 | WebSocketConnectionRFC6455       | 57 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.19.v20160209 | java.lang.AbstractMethodError for SCEP@479a15c9{l(/10.0.2.2:34866)<->r(/10.0.2.15:8181),s=1,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{WebSocketServletConnectionRFC6455 p=WebSocketParserRFC6455@3da14617 state=DATAbuffer= g=WebSocketGeneratorRFC6455@702a7ad7 closed=false buffer=-1}
2017-10-11 12:13:05,035 | INFO  | tp1467173387-290 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Session token revoked
2017-10-11 12:13:05,035 | INFO  | tp1467173387-290 | UiSharedTopologyModel            | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Unregistering topology session {UiTopoSession for user <onos>}
2017-10-11 12:13:05,035 | INFO  | tp1467173387-290 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | GUI client disconnected [close-code=1011, message=InternalServer Error: java.lang.AbstractMethodError]
2017-10-11 12:13:05,327 | INFO  | qtp1467173387-41 | UiSharedTopologyModel            | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Registering topology session {UiTopoSession for user <UI-user>}
2017-10-11 12:13:05,331 | WARN  | qtp1467173387-41 | Topo2OverlayCache                | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | added overlay: UiTopo2Overlay{id="traffic-2-overlay", class="Traffic2Overlay"}
2017-10-11 12:13:05,332 | INFO  | qtp1467173387-41 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | GUI client connected -- user <UI-user>
2017-10-11 12:13:05,334 | WARN  | qtp1467173387-41 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Invalid Authentication Token: {"event":"authentication","payload":{"token":"f43jc6i5q70emf8tqddhu3cml2"}}
2017-10-11 12:13:07,212 | WARN  | qtp1467173387-40 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Non-Authenticated Web Socket: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-11 12:14:01,093 | INFO  | qtp1467173387-41 | UiWebSocket                      | 159 - org.onosproject.onos-gui - 1.12.0.SNAPSHOT | Session token revoked

--

Alessandro Molari molari.a...@gmail.com

Simon Hunt

unread,
Oct 11, 2017, 12:33:36 PM10/11/17
to Alessandro Molari, ONOS Developers, Steven Burrows
Hi Alessandro, 

The tutorial you followed (this one, right?) was written before we added code to include authentication tokens for UI <---> Server websocket authentication to patch a security issue.
However, I believe the changes we made handled the session token automatically at the start of the UI session, so this is puzzling.

To start debugging this issue, one approach would be to capture the conversation between the client and the server:
  • Log into ONOS
    • onos> log:set DEBUG org.onosproject.ui.impl.UiWebSocket
  • This will generate debug messages in the server log.
    • from client to server ("RX message:")
    • from server to client ("TX message:") 
  • You can focus on relevant messages with:
    • grep UiWebSocket ..../path/to/onos/karaf.log
Hopefully, this will shed more light on the behavior, to narrow down towards a possible cause.


Cheers, 
~Simon



To unsubscribe from this group and all its topics, send an email to onos-dev+unsubscribe@onosproject.org.

--

Alessandro Molari molari.a...@gmail.com

--

Alessandro Molari molari.a...@gmail.com

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+unsubscribe@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Alessandro Molari

unread,
Oct 23, 2017, 12:17:42 PM10/23/17
to onos...@onosproject.org

Hi Simon,

I've attached the logs with debug level enabled in UiWebSocket.
In the end of the attached file, you can see the authentication error (the authentication token seems to become invalid).

Do you have any idea why this error is happening? What should I do to fix the issue?

Thanks,
Alessandro
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
logs

Alessandro Molari

unread,
Oct 23, 2017, 12:22:23 PM10/23/17
to onos...@onosproject.org

Here are some more selected logs (messages prefixed with "mcs" are log messages of the onos application I'm currently developing, they're not system-wide messages):

2017-10-23 16:19:40,376 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"topoStartDone","payload":{}}
2017-10-23 16:19:40,377 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"requestSummary","payload":{}}
2017-10-23 16:19:40,384 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"showSummary","payload":{"title":"ONOS Summary","glyphId":"bird","id":null,"propOrder":["version","-","devices","links","hosts","topology_sccs","-","intents","tunnels","flows"],"propLabels":{"version":"Version","-":"-","devices":"Devices","links":"Links","hosts":"Hosts","topology_sccs":"Topology SCCs","intents":"Intents","tunnels":"Tunnels","flows":"Flows"},"propValues":{"version":"1.11.0.rc4","-":"","devices":"10","links":"18","hosts":"0","topology_sccs":"1","intents":"0","tunnels":"0","flows":"50"},"buttons":[]}}
2017-10-23 16:19:40,384 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"updatePrefReq","payload":{"key":"topo_prefs","value":{"insts":1,"summary":1,"detail":1,"hosts":0,"offdev":1,"dlbls":0,"hlbls":0,"porthl":1,"bg":0,"spr":0,"ovid":"traffic","toolbar":0}}}
2017-10-23 16:19:44,696 | DEBUG | s-gui-msg-sender | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"showSummary","payload":{"title":"ONOS Summary","glyphId":"bird","id":null,"propOrder":["version","-","devices","links","hosts","topology_sccs","-","intents","tunnels","flows"],"propLabels":{"version":"Version","-":"-","devices":"Devices","links":"Links","hosts":"Hosts","topology_sccs":"Topology SCCs","intents":"Intents","tunnels":"Tunnels","flows":"Flows"},"propValues":{"version":"1.11.0.rc4","-":"","devices":"10","links":"18","hosts":"0","topology_sccs":"1","intents":"0","tunnels":"0","flows":"50"},"buttons":[]}}
2017-10-23 16:19:49,693 | DEBUG | s-gui-msg-sender | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"showSummary","payload":{"title":"ONOS Summary","glyphId":"bird","id":null,"propOrder":["version","-","devices","links","hosts","topology_sccs","-","intents","tunnels","flows"],"propLabels":{"version":"Version","-":"-","devices":"Devices","links":"Links","hosts":"Hosts","topology_sccs":"Topology SCCs","intents":"Intents","tunnels":"Tunnels","flows":"Flows"},"propValues":{"version":"1.11.0.rc4","-":"","devices":"10","links":"18","hosts":"0","topology_sccs":"1","intents":"0","tunnels":"0","flows":"50"},"buttons":[]}}
2017-10-23 16:19:54,685 | DEBUG | s-gui-msg-sender | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"showSummary","payload":{"title":"ONOS Summary","glyphId":"bird","id":null,"propOrder":["version","-","devices","links","hosts","topology_sccs","-","intents","tunnels","flows"],"propLabels":{"version":"Version","-":"-","devices":"Devices","links":"Links","hosts":"Hosts","topology_sccs":"Topology SCCs","intents":"Intents","tunnels":"Tunnels","flows":"Flows"},"propValues":{"version":"1.11.0.rc4","-":"","devices":"10","links":"18","hosts":"0","topology_sccs":"1","intents":"0","tunnels":"0","flows":"50"},"buttons":[]}}
2017-10-23 16:19:54,770 | DEBUG | qtp250219536-42  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"topoStop","payload":{}}
2017-10-23 16:19:54,783 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:19:54,784 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:19:56,784 | DEBUG | qtp250219536-278 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:19:56,785 | DEBUG | qtp250219536-278 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:19:58,784 | DEBUG | qtp250219536-278 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:19:58,784 | DEBUG | qtp250219536-278 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:20:00,784 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:20:00,784 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:20:02,784 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:20:02,784 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:20:04,784 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:20:04,784 | DEBUG | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:20:06,784 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"mcs-avail-operationsDataRequest","payload":{}}
2017-10-23 16:20:06,784 | DEBUG | qtp250219536-344 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"mcs-avail-operationsDataResponse","payload":{"mcs-avail-operationss":[{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7","name":"Check Reachability","description":"Check the reachability between two nodes"}],"annots":{"no_rows_msg":"No operations available"}}}
2017-10-23 16:20:07,101 | DEBUG | qtp250219536-42  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | RX message: {"event":"operationDetailsRequest","payload":{"id":"529832ef-ad07-4179-a063-4fbcc319d4f7"}}
2017-10-23 16:20:07,101 | WARN  | qtp250219536-42  | WebSocketConnectionRFC6455       | 57 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.19.v20160209 | java.lang.AbstractMethodError for SCEP@bd6e8e6{l(/10.0.2.2:58072)<->r(/10.0.2.15:8181),s=1,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{WebSocketServletConnectionRFC6455 p=WebSocketParserRFC6455@37c781f5 state=DATA buffer= g=WebSocketGeneratorRFC6455@24721863 closed=false buffer=-1}
2017-10-23 16:20:07,103 | INFO  | qtp250219536-42  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Session token revoked
2017-10-23 16:20:07,103 | INFO  | qtp250219536-42  | UiSharedTopologyModel            | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Unregistering topology session {UiTopoSession for user <onos>}
2017-10-23 16:20:07,103 | DEBUG | qtp250219536-42  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Destroying handlers and overlays...
2017-10-23 16:20:07,103 | INFO  | qtp250219536-42  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | GUI client disconnected [close-code=1011, message=Internal Server Error: java.lang.AbstractMethodError]
2017-10-23 16:20:07,108 | INFO  | qtp250219536-41  | UiSharedTopologyModel            | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Registering topology session {UiTopoSession for user <UI-user>}
2017-10-23 16:20:07,108 | DEBUG | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Creating handlers and overlays...
2017-10-23 16:20:07,112 | WARN  | qtp250219536-41  | Topo2OverlayCache                | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | added overlay: UiTopo2Overlay{id="traffic-2-overlay", class="Traffic2Overlay"}
2017-10-23 16:20:07,112 | DEBUG | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | #handlers = 58, #overlays = 3
2017-10-23 16:20:07,113 | DEBUG | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"bootstrap","payload":{"clusterNodes":[{"id":"127.0.0.1","ip":"127.0.0.1","m_uiAttached":true}],"user":"UI-user"}}
2017-10-23 16:20:07,114 | DEBUG | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"uberlion","payload":{"lion":{"core.fw.Mast":{"confirm_refresh_title":"Confirm GUI Refresh","logout":"Logout","tt_help":"Show help page for current view","ui_ok_to_update":"Press OK to update the GUI.","uicomp_added":"New GUI components were added.","uicomp_removed":"Some GUI components were removed.","unknown_user":"(no one)"},"core.fw.Nav":{"cat_network":"Network","cat_other":"Other","cat_platform":"Platform","nav_item_app":"Applications","nav_item_cluster":"Cluster Nodes","nav_item_device":"Devices","nav_item_host":"Hosts","nav_item_intent":"Intents","nav_item_link":"Links","nav_item_partition":"Partitions","nav_item_processor":"Packet Processors","nav_item_settings":"Settings","nav_item_topo":"Topology","nav_item_topo2":"Topology 2","nav_item_tunnel":"Tunnels"},"core.fw.QuickHelp":{"qh_hint_close_detail":"Close the details panel","qh_hint_esc":"Dismiss dialog or cancel selections","qh_hint_show_hide_qh":"Show / hide Quick Help","qh_hint_t":"Toggle theme","qh_title":"Quick Help"},"core.view.App":{"activate":"Activate","app_id":"App ID","category":"Category","click_row":"click row","deactivate":"Deactivate","dlg_confirm_action":"Confirm Action","dlg_warn_deactivate":"Deactivating or uninstalling this component can have serious negative consequences!","dlg_warn_own_risk":"** DO SO AT YOUR OWN RISK **","dp_features":"Features","dp_permissions":"Permissions","dp_required_apps":"Required Apps","icon":"Icon","nav_item_app":"Applications","origin":"Origin","qh_hint_click_row":"Select / deselect application","qh_hint_close_detail":"Close the details panel","qh_hint_esc":"Deselect application","qh_hint_scroll_down":"See more applications","role":"Role","scroll_down":"scroll down","state":"State","title":"Title","title_apps":"Applications","total":"Total","tt_ctl_activate":"Activateselected application","tt_ctl_auto_refresh":"Toggle auto refresh","tt_ctl_deactivate":"Deactivate selected application","tt_ctl_uninstall":"Uninstall selected application","tt_ctl_upload":"Upload an application (.oar file)","uninstall":"Uninstall","version":"Version"},"core.view.Cluster":{"active":"Active","chassis_id":"Chassis ID","click":"click","devices":"Devices","hw_version":"H/W Version","ip_address":"IP Address","last_updated":"Last Updated","nav_item_cluster":"Cluster Nodes","node_id":"Node ID","protocol":"Protocol","qh_hint_click":"Select a row to show cluster node details","qh_hint_close_detail":"Close the details panel","qh_hint_scroll_down":"See available cluster nodes","scroll_down":"scroll down","serial_number":"Serial #","started":"Started","sw_version":"S/W Version","tcp_port":"TCP Port","title_cluster_nodes":"Cluster Nodes","total":"Total","type":"Type","uri":"URI","vendor":"Vendor"},"core.view.Topo":{"active":"active","added":"added","btn_show_view_device":"Show Device View","btn_show_view_flow":"Show Flow View for this Device","btn_show_view_group":"ShowGroup View for this Device","btn_show_view_meter":"Show Meter View for this Device","btn_show_view_port":"Show Port View for this Device","click":"click","close":"Close","cmd_drag":"cmd-drag","cmd_scroll":"cmd-scroll","device":"Device","devices":"Devices","direct":"direct","disable":"Disable","drag":"drag","edge":"edge","enable":"Enable","expected":"expected","fl_background_map":"background map","fl_bad_links":"Bad Links","fl_device_labels_hide":"Hide device labels","fl_device_labels_show_friendly":"Show friendly device labels","fl_device_labels_show_id":"Show device ID labels","fl_eq_masters":"Equalizing master roles","fl_host_labels_show_friendly":"Show friendly host labels","fl_host_labels_show_ip":"Show host IP addresses","fl_host_labels_show_mac":"Show host MAC addresses","fl_layer_all":"All Layers Shown","fl_layer_opt":"Optical Layer Shown","fl_layer_pkt":"Packet Layer Shown","fl_monitoring_canceled":"Monitoring Canceled","fl_normal_view":"Normal View","fl_oblique_view":"Oblique View","fl_offline_devices":"Offline Devices","fl_pan_zoom_reset":"Pan and zoom reset","fl_panel_details":"Details Panel","fl_panel_instances":"Instances Panel","fl_panel_summary":"Summary Panel","fl_port_highlighting":"Port Highlighting","fl_reset_node_locations":"Reset Node Locations","fl_selecting_intent":"Selecting Intent","fl_sprite_layer":"sprite layer","flows":"Flows","grid_x":"Grid X","grid_y":"Grid Y","hidden":"Hidden","hide":"Hide","host":"Host","hosts":"Hosts","hw_version":"H/W Version","inactive":"inactive","indirect":"indirect","intent":"Intent","intents":"Intents","ip":"IP","latitude":"Latitude","links":"Links","longitude":"Longitude","lp_label_a2b":"A to B","lp_label_a_friendly":"A friendly","lp_label_a_id":"A id","lp_label_a_port":"A port","lp_label_a_type":"A type","lp_label_b2a":"B to A","lp_label_b_friendly":"B friendly","lp_label_b_id":"B id","lp_label_b_port":"B port","lp_label_b_type":"B type","lp_label_friendly":"Friendly","lp_value_no_link":"[no link]","mac":"MAC","nav_item_topo":"Topology","no_devices_are_connected":"No Devices Are Connected","not_expected":"not expected","ok":"OK","optical":"optical","ov_tt_none":"No Overlay","ov_tt_protected_intents":"Protected Intents Overlay","ov_tt_traffic":"Traffic Overlay","ports":"Ports","protocol":"Protocol","purged":"purged","qh_gest_click":"Select the item and show details","qh_gest_cmd_drag":"Pan","qh_gest_cmd_scroll":"Zoom in / out","qh_gest_drag":"Reposition (and pin) device / host","qh_gest_shift_click":"Toggle selection state","qh_hint_close_detail":"Close the details panel","resubmitted":"resubmitted","select":"Select","serial_number":"Serial #","shift_click":"shift-click","show":"Show","sw_version":"S/W Version","tbtt_bad_links":"Show bad links","tbtt_cyc_dev_labs":"Cycle device labels","tbtt_cyc_host_labs":"Cycle host labels","tbtt_cyc_layers":"Cycle node layers","tbtt_eq_master":"Equalize mastership roles","tbtt_reset_loc":"Reset node locations","tbtt_reset_zoom":"Reset pan / zoom","tbtt_sel_map":"Select background geo map","tbtt_tog_host":"Toggle host visibility","tbtt_tog_instances":"Toggle ONOS instances panel","tbtt_tog_map":"Toggle background geo map","tbtt_tog_oblique":"Toggle oblique view (experimental)","tbtt_tog_offline":"Toggle offline visibility","tbtt_tog_porthi":"Toggle port highlighting","tbtt_tog_sprite":"Toggle sprite layer","tbtt_tog_summary":"Toggle ONOS summary panel","tbtt_tog_toolbar":"Toggle Toolbar","tbtt_tog_use_detail":"Disable / enable details panel","tbtt_unpin_node":"Unpin node (hover mouse over)","title_edge_link":"Edge Link","title_infra_link":"Infrastructure Link","title_panel_summary":"ONOS Summary","title_select_map":"Select Map","title_selected_items":"Selected Items","topology_sccs":"Topology SCCs","tr_btn_cancel_monitoring":"Cancel traffic monitoring","tr_btn_create_h2h_flow":"Create Host-to-Host Flow","tr_btn_create_msrc_flow":"Create Multi-Source Flow","tr_btn_monitor_all":"Monitor all traffic","tr_btn_monitor_sel_intent":"Monitor traffic of selected intent","tr_btn_show_all_rel_intents":"Show all related intents","tr_btn_show_dev_link_flows":"Show device link flows","tr_btn_show_device_flows":"Show Device Flows","tr_btn_show_next_rel_intent":"Show next related intent","tr_btn_show_prev_rel_intent":"Show previous related intent","tr_btn_show_related_traffic":"Show Related Traffic","tr_fl_dev_flows":"Device Flows","tr_fl_fstats_bytes":"Flow Stats (bytes)","tr_fl_h2h_flow_added":"Host-to-Host flow added","tr_fl_multisrc_flow":"Multi-Source Flow","tr_fl_next_rel_int":"Next related intent","tr_fl_prev_rel_int":"Previous related intent","tr_fl_pstats_bits":"Port Stats (bits / second)","tr_fl_pstats_pkts":"PortStats (packets / second)","tr_fl_rel_paths":"Related Paths","tr_fl_traf_on_path":"Traffic on Selected Path","tunnel":"tunnel","tunnels":"Tunnels","uri":"URI","vendor":"Vendor","version":"Version","virtual":"virtual","visible":"Visible","vlan":"VLAN","vlan_none":"None","withdrawn":"withdrawn"}},"locale":"en_US"}}
2017-10-23 16:20:07,114 | INFO  | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | GUI client connected -- user <UI-user>
2017-10-23 16:20:07,115 | WARN  | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Invalid Authentication Token: {"event":"authentication","payload":{"token":"jp7coa0lnpvo1nhrkfldhce39"}}
2017-10-23 16:20:07,116 | DEBUG | qtp250219536-41  | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | TX message: {"event":"error","payload":{"message":"invalid authentication token","badToken":"jp7coa0lnpvo1nhrkfldhce39"}}
2017-10-23 16:20:08,054 | DEBUG | Timer-2          | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | IDLE (or closed) websocket [953 ms]
2017-10-23 16:20:08,055 | DEBUG | Timer-2          | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Destroying handlers and overlays...
2017-10-23 16:20:08,784 | WARN  | qtp250219536-343 | UiWebSocket                      | 157 - org.onosproject.onos-gui - 1.11.0.rc4 | Non-Authenticated Web Socket: {"event":"mcs-avail-operationsDataRequest","payload":{}}

--

Alessandro Molari molari.a...@gmail.com

Alessandro Molari

unread,
Oct 26, 2017, 8:10:49 AM10/26/17
to onos...@onosproject.org

Do I need to add something to existing code (pre-authentication-tokens) in order to make UI work?

--

Alessandro Molari molari.a...@gmail.com

Simon Hunt

unread,
Oct 26, 2017, 1:03:37 PM10/26/17
to Alessandro Molari, ONOS Developers
Hi Alessandro -

I'm looking at the log you sent me, and at first glance it appears that you have stumbled on a Java coding issue that we have not seen before. 
Let me dig deeper into the log output, and I'll get back to you soon...

~Simon


To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+unsubscribe@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

--

Alessandro Molari molari.a...@gmail.com

--

Alessandro Molari molari.a...@gmail.com

--

Alessandro Molari molari.a...@gmail.com

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+unsubscribe@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Simon Hunt

unread,
Oct 26, 2017, 2:00:38 PM10/26/17
to Alessandro Molari, ONOS Developers
Hi Alessandro, 

From the logs you sent, in both cases we see the following sequence of events (expanded for readability):
On receiving an "operationDetailsRequest" event, whatever the server is doing is causing the web socket connection to freak out with an AbstractMethodError.
This in turn is causing the web socket to close, which causes the session token to be revoked. 

So, somewhere in your event handler code, it appears that you are attempting to invoke an abstract method.

Note: Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

Assuming you are developing with an IDE, I would suggest running a remote debug session and stepping through the RequestHandler code that handles the "operationDetailsRequest" to see where the bad call occurs. 


Cheers,
~Simon




Alessandro Molari

unread,
Oct 27, 2017, 8:10:19 AM10/27/17
to Simon Hunt, ONOS Developers

Alright, I found the issue.

The problem was caused by an API change in ONOS since 1.5.0, relative to UI request handling.

In fact, the signature of abstract method process was changed.

At compile, time everything worked correctly, because I was using the old API in POM (I forget to update pom.xml after upgrading ONOS installation).

At runtime, the process dinamically loaded my OSGi bundle, without any problems, because annotations are removed at compile-time, thus @Overrides weren't present anymore.

However when the method process was called, the compiled code tried to use the new signature (ONOS runtime was version 1.11), different than the one I had implemented, so the situation was: two different methods overloaded, the one that I implemented with two arguments (old version), instead the method called had just one argument (new version), but I didn't implement it so hierarchy went up to top class which was an abstract method, that led to the java.lang.AbstractMethodError.

This is one dark side note of using dynamic class loading in Java :-(

In any case, the problem is now fixed.


I leave reference of failing method, so if anyone has the same problem, it doesn't smashes his head:

In org.onosproject.ui.RequestHandler signature of process changed from:
void process(long sid, ObjectNode payload)
to:
void process(ObjectNode payload)

In org.onosproject.ui.RequestHandler signature of sendMessage changed from:
void sendMessage(String eventType, long sid, ObjectNode payload)
to:
void sendMessage(String eventType, ObjectNode payload)

Those were the failing points in my case.



Thanks Simon for the support,
Alessandro
--

Alessandro Molari molari.a...@gmail.com

Simon Hunt

unread,
Oct 27, 2017, 12:01:30 PM10/27/17
to Alessandro Molari, ONOS Developers
Ah, yes, that would do it!

So glad you figured out the problem finally.

Cheers, 
~Simon

rahul kumar

unread,
Oct 14, 2020, 1:07:56 AM10/14/20
to ONOS Developers, molari.a...@gmail.com
This error is thrown when an application tries to call an abstract method without actual implementation. Abstract methods have no body and cannot be executed. This error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled. It usually happens after some library is upgraded while some is not. The dependencies are missing somehow. This means that you are using an old java version of an interface implementation which is missing a new interface method. For example java.sql.Connection interface got a new getSchema method in 1.7. If you have 1.6 JDBC driver and call Connection.getSchema you will get AbstractMethodError. So, make sure you have the latest jar file in your class path not a older copy.
Reply all
Reply to author
Forward
0 new messages