BroadbandForum / obuspa

OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent. https://github.com/BroadbandForum/obuspa/wiki
BSD 3-Clause "New" or "Revised" License
87 stars 61 forks source link

Error in OBUSPAgent connectivity with STOMP server "ValidateUspRecord: Ignoring USP record as it was addressed to endpoint_id=proto::ControllerA not os::" #83

Closed M0ulinamary closed 1 year ago

M0ulinamary commented 1 year ago

Starting ob-usp-agent pointing to STOMP setup(which is running in another server).

When i start agent, i get the below issue.

USP_CONNECT_RECORD sending at time 2023-05-12T11:37:30Z, to host stomp-server.com over STOMP SEND content-length:68 content-type:application/vnd.bbf.usp.msg reply-to-dest:/queue/agent-1 destination:/queue/agent-1 version: "1.2" to_id: "proto::ControllerA" from_id: "os::012345-005056BFACD0" payload_security: PLAINTEXT mac_signature[0] sender_cert[0] stomp_connect { version: V1_2 subscribed_destination: "/queue/agent-1" }

Message received at time 2023-05-12T11:37:30Z, from host stomp-server.com over STOMP MESSAGE subscription:0 destination:/queue/agent-1 message-id:T_0@@session-tqLmamAABrmdsadadlR8JQ@@1 redelivered:false reply-to-dest:/queue/agent-1 content-type:application/vnd.bbf.usp.msg content-length:68 Received 1 heartbeats at time 1683891450 ValidateUspRecord: Ignoring USP record as it was addressed to endpoint_id=proto::ControllerA not os::012345-005056BFACD0

Can you help to solve the connectivity issue from Agent ?

holme-r commented 1 year ago

The test controller setup is wrong. reply-to-dest should be the STOMP destination of the test controller, but instead it is the same destination as the Agent. Likewise the test controller thinks that the Agent's endpoint ID is proto::ControllerA, but that's wrong, the agent's endpoint_id is os::012345-005056BFACD0.

The test controller is quite hard to setup because the meanings of the Agent and Controller in its database are swapped around. Please see https://github.com/BroadbandForum/obuspa-test-controller/blob/master/CONTROLLER_SETUP.md. You cannot use the same USP database for the test controller as the agent.

M0ulinamary commented 1 year ago

Hi , I have fixed the controller error. Now, when i issue the commands from Controller to USP like below, it fails.

Trial 1: root@usp-tr369-controller:~/obuspa-test-controller/mouli_tests# obuspa -c get GetSupportedDM HandleCliCommandRemotely(178): connect failed : (err=111) Connection refused

Trial 2 : root@usp-tr369-controller:~/obuspa-test-controller/mouli_tests# obuspa -x get Cannot find get USP Agent aborted unexpectedly root@usp-tr369-controller:~/obuspa-test-controller/mouli_tests# obuspa -x get GetSupportedDM Cannot find get USP Agent aborted unexpectedly

What is the issue here ? I could see that Agent running in 1 instance running fine, Likewise Controller running in another instance running fine.

But, when i run the commands from Controller to Agent, Nothing works.

Can you highlight what am i missing here ?

M0ulinamary commented 1 year ago

I am able to run commands from Controller to Agents using "-x" command. Hence closing the issue