AIBridge unregister issues

I’m facing some problems with the unregistration of VMS and applications. I don’t know if these are due to some some kind of incorrect configuration made by me, so I will explain step by step what I did, asking about my doubts.

  1. I deployed Ai Bridge using an empty register.graphql file (I also tried with both no register.graphql file in config folder and with a file with url, username and password parameters left as empty string ). What is the correct way to deploy a no-self registration AI Bridge?

Init service still remaing running logging errors (different from case to case). Is that correct?

In attachment you can find the init, webservice, connector and health log files.

  1. I registerd VMS, applications , event topics and metadata topic using mutation register API and performed some queries. I did it using Yoga, a C++ http client and a firefox rest client extention. In each case it worked fine.

  2. When I try to unregister one or more applications , the mutation unregister query replies ok and sends to me the VMS Id (that should be the normal behavior as a result of a successful call ), but the aplications are not deleted.

  3. When I try to unregister the entire VMS sometimes I don’t get any answer from the AI Bridge and the VMS is not deleted while other times I get the correct response but still, the VMS is not deleted. In this second case if I try to delete it manually from Xprotect Managment client I get this error :

"TITLE: DeleteItem (Processing Server)

------------------------------

UnRegisterServiceUri: Could not UnRegister a service -

------------------------------

ADDITIONAL INFORMATION:

Exception of type ‘VideoOS.Platform.PathNotFoundMIPException’ was thrown. (VideoOS.Platform)"

The only way to delete it is to register the VMS again and do that manually from Xprotect Client

NOTICE : at every attempt I deployed the AI Bridge and performed registration from scratch. After every mutation query I refresh the Processing server tree in Xprotect Client to see if the changes have been performed.

Furthermore, when I perform unregistration, no additional/errors logs are added to the ones I put in attachement.

I’m quite confused about how it works and what I’m doing wrong. I hope my post is clear enough to make you able to help me.

Regards

Gianluca

Hi Gianluca,

After taking a look into the init container I can definitely see that there’s a problem with the AI Bridge registration.

The init container should be able to exit/stop after some time (minutes). I suspect is related to your registration file…

I’ve attached the logs that shows a successful run of the init container.

In regards of the registration process you have 2 options.

Set the registration data in the ‘register.graphql’ file (attached an example) or as you’ve mentioned calling a mutation. For example:

mutation registration {
  register(input: {
    url: "management-server-uri"
    username: "admin-user"
    password: "admin-pwd"
  }) { id }
}

Both ways must work. I’ve been personally working with the ‘register.graphql’ file to achieve the registration (but is just personal taste :slight_smile:

In regards of the unregistration process we’ve been currently working on this process to made it more robust and easy to use. Thus, in the next version of AI Bridge we will allow to unregister both (included in the attachment):

  • AI Bridge (right-click in the node on MC → unregister)
  • IVA apps (a dedicated button on MC)

The crash you’ve mentioned is also something we’re going to tackle in the next version of AI Bridge, since it can happen if the unregistration doesn’t go well.

All in all, the unregistration is failing because the registration itself hasn’t work fine (the init container hasn’t exited). However, as mentioned in this reply, some instability issues will be handled in the next version of AI Bridge.

Hi Lisber,

thank you for replying.

I didn’t unsterdand how could I manage the not-self restration deployment. You said “Both ways must work.” and you tried using register.graphql file. It works fine also for me, but I need to deploy the AI bridge without any registration at the start, so that it will be our service to do that once it is properly configured.

How can I do that? Without any register.graphql file? leaving it blank? leaving the VMS_ param as empty strings?

In each case init service doesn’t stop.

Regards

Gianluca

Hi Gianluca,

I see your problem now :slight_smile:

If you need to avoid the configuration file you have 2 options.

  1. Do not include it in the init container command line parameter.
    1. Remove this line: -vms-bridge-registrations /root/bin/config/register.graphql
  2. Set the content of the file ‘register.graphql’ to an empty json object {}

Once you’ve applied one of these 2 strategies you will see that the init container finishes.

And after that you can register the AI Bridge through graphQl

Here are 2 examples.

example #1 - registering just the AI Bridge

mutation registration {
  register(input: {
  url: "http(s)://<your-ms-address>",
  username: "<admin-user>",
  password: "<admin-password>"
}) { id }
}

example #2 - registering the AI bridge with apps and some topics (we discourage this, since we advocate for IVA apps to register themselves upon initialization)

mutation registration_with_app {
  register(input: {
  url: "http(s)://<your-ms-address>",
  username: "<admin-user>",
  password: "<admin-password>",
  apps: [
    {
      id: "3bc3c404-4e48-4e59-951d-a247aa0acf24",
      url: "https://www.milestonesys.com/",
      name: "My fake app Name",
      version: "1.0.0",
      description: "My fake app description",
      eventTopics: [
        {
          url: "https://www.google.com/",
          name: "getsnapshot",
          description: "Get a Snapshot from the video",
          eventFormat: ANALYTICS_EVENT
        }
      ]
    }
  ]
}) { id }
}

Regards,

Lisber

Hi Lisber,

thank you for replying.

I did as you suggested me and actually the init container stopped after a while, but I 'm still not able to unregister both applications and VMS.

I have a couple of doubts that came to my mind after reading your reply

My scenario is :

-) deploy AI Bridge

-) my application register both AI Bridge ( if it is not registered yet) and itself when it starts.

-) my application starts forwarding analytics events and metadata.

In my scenario what else could perform the AI Bridge registration? If it is done by my application there is any difference between doing that with a single mutation query and using two difference queries? In order to register the app when the AI Bridge is already registered the mutation query is however like the one you write in the example#2, is it right?

  1. mutation registration_with_app {
  2. register(input: {
  3. url: “http(s)://”,
  4. username: “”,
  5. password: “”,
  6. apps: [
  7. {
  8. id: “3bc3c404-4e48-4e59-951d-a247aa0acf24”,
  9. url: “https://www.milestonesys.com/”,
  10. name: “My fake app Name”,
  11. version: “1.0.0”,
  12. description: “My fake app description”,
  13. eventTopics: [
  14. {
  15. url: “https://www.google.com/”,
  16. name: “getsnapshot”,
  17. description: “Get a Snapshot from the video”,
  18. eventFormat: ANALYTICS_EVENT
  19. }
  20. ]
  21. }
  22. ]
  23. }) { id }
  24. }

I did some tests but in any case I’m able to unregister applications and VMS.

Any other suggestion?

Regards

Gianluca

Hi Lisber,

Kind reminder about this ticket.

Could you help me?

Best regards

Gianluca

Hi @gianluca gera (technoaware)​ ,

Sorry for not coming back earlier.

We’ve tackled the exception you’ve mentioned in this thread. It will be available in the next AI Bridge 2.0.0.

The error/exception you’re facing I believe happens because the AI Bridge actually gets ‘unregister’ so if you run the graphQL query:

query {
  about { 
    videoManagementSystems { 
      id 
      url 
      version 
      productName 
      productCode 
      apps { 
        id 
        name 
        description 
        version 
        manufacturer { 
          id 
          name 
        } 
      } 
    } 
  } 
}

The VMS and the apps should not be retrieved.

Why the exception on MC ?

A: if the AI Bridge has been unregistered (is no longer part of the ‘Registered Services’) then the Plugin is crashing because when deleting the Processing Server node, is also trying to remove the AI Bridge from the Registered service (but this has already happened) and thus the plugin crashes.

All in all, I believe the unregistration has happened, however, the plugin is crashing and that’s the reason why you can’t remove the processing server node.

In the next release of AI Bridge we’ve tackled this awful behaviour on the plugin so this crash doesn’t happen and the processing server node gets removed from the UI in MC.

Hi Lisber,

thank you for replying.

I have understood the problem about removing the processing server from the tree when it is already unregistered by graphql queries. This menas that until the next version of AI Bridge is not possible to delete it by Graphql queries? It would leave it in the processing server list in Xprotect, right?

As for the other problem? I’m not even able to delete the apps. They still reamain listed in the panel of the AI Bridge in the Xprotect interface.

Am I the only one with these isssues?

Best regards

Gianluca

Hi @gianluca gera (technoaware)​ ,

Yes, sadly the problem on the treeview (processing server node not being removed) will be fix in the next release.

However, what can be done (workaround) is:

When the AI Bridge is registered.

1 - Delete the processing server node in MC;

2 - Call the unregistration mutation

“I’m not even able to delete the apps.”, this is definitely something I can’t reproduce.

However, in the next version of AI Bridge we will be allowing the unregistration also through the MC UI. Thus, if you don’t mind, let’s re-iterate on this thread once the next version of AI Bridge is out, we plan to have it by the end of this week or the week after.

Hi Lisber,

I downloaded AI Bridge v2.0 but I’m still having issue. Actually I’m no longer able to register the app too, neither while registering the VMS nor subsequently. I try to explain in details:

-) After downloading the v2.0 package I run docker-compose pull and docker-compose up -d using a register.graphql with an empty json string {}

the aibridge container doesn’t stop.

-) I’m able to register the VMS using the graphql tool and a query as below:

mutation{

register(input: {

url: “http://192.168.10.26

username: “mirko”

password: “******”

})

{

id

}

}

-) I’m not able to register an app using a query as below (I tried also to register the VMS and the app togheter with the same query getting the same error) :

mutation{

register(input: {

url: “http://192.168.10.26

username: “mirko”

password: “******”

apps: [ {

id: “33a6bc9a-0833-46c6-958e-19da4ee6d9e5”

name: “TAW System”

description: “Technoaware analytics suite”

version: “3.0.0”

manufacturer : {

id: “4491c2a7-0c92-4733-a555-2867952cbaa7”

name: “Technoaware”

}

eventTopics: [ {

name: "intrusion 1 "

description: “Intrusion detection”

eventFormat: ANALYTICS_EVENT

} ,{

name: "intrusion 2 "

description: “Intrusion detection”

eventFormat: ANALYTICS_EVENT

}, {

name: "smoke & fire "

description: “Smoke & Fire detection”

eventFormat: ANALYTICS_EVENT

} ],

metadataTopics: [ {

name: “people”

description: “Detected and tracked intruder”

metadataFormat: ONVIF_ANALYTICS

}, {

name: “smoke”

description: “Detected smoke”

metadataFormat: ONVIF_ANALYTICS

} ]

} ]

})

{

id

}

}

-) I get an error saying "Field \“id\” is not defined by type \“ManufacturerInput\”. I tried without id in ManifacturerInput param but the system replies with a generic error.

-) I’m also still facing unregistration issues as before, but I think that them could be becuase the aibridge init container doesn’t stop. Anyway, unless I run docker-compose down I’m not able to delete the aibridge from the Processing Server tree list.

What am I doing wrong?

Best regards

Gianluca