Error saying "Cannot connect to the toolkit" when we're running

Hi,

We, AllGoVision Technologies, use the MediaLiveServiceJPEG component and ToolkitFactoryProvider.lib to get the JPEG images from Milestone in our app written in C++. This has generally worked everywhere but in one client location where they’re using Milestone Professional 2019 R1, we’re getting an error “Cannot connect to the toolkit” when we’re running the app. I cross-verified using the sample application as well.

However, we didn’t see this error when we tested it in our office. We were able to get the images from Milestone without any problem here.

Please help us solve the issue.

As a first check please verify that the same user on the same PC can see the same camera in the Smart Client. This check can be used to rule out general setup issues that would not be attributed to the MIP SDK usage.

Yes, the same user was able to connect and see the camera in the smart client. We use the Milestone Mobile Server for our web UI and even there the user was able to view the camera. Only in our C++ app, we weren’t able to get the camera feed (using MediaLiveServiceJPEG component)

Do you see the issue on all the cameras on this server, some of the cameras or one of the cameras?

Can you please double-check that you have the right dll files from the [C:\Program](file:C:/Program) Files\Milestone\MIPSDK\Bin folder copied to your solution? (None missing or older version.)

Is this the first server using Professional (e-code) or is that version also one where you generally see it working?

Do you use MIP SDK 2019R1?

Hi Bo,

I double-checked with the correct dll files (copied from MIPSDK\Bin folder). In fact, I build and used the MediaLiveServiceJPEG.exe from the Component Samples. We’re facing this issue in multiple locations. Yes, I used MIP SDK 2019R1. Still getting the same “Cannot connect to the toolkit!” error in the sample as well. Is there any pre-requisite that we have to install in order for it to work?

-Treyambak (Allgovision Technologies)

Additional Note: We’re using the 64-bit lib and DLLs. We noticed that it is failing with Milestone XProtect Professional 2018 R2 as well in one other place. However in the same location, when we used the 32-bit libs and the DLLs, we were able to connect to the toolkit and get JPEG images.

It is good news that you were able to solve the issue.

I am curious why the 64 bit dlls does not work here. If possible I would like you to use the Milestone Depends tool we supply with the MIP SDK and see if it is able to pinpoint missing dependencies.

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/milestonedependsutility.htm&tree=tree_home.html

Hi,

Sorry, my reply wasn’t clear. I intended to tell that we couldn’t resolve the issue as we use 64-bit version of the libraries. We tried to verify if the 32-bit versions of the MIP SDK also have the problem and found that they don’t have that problem.

I tried using MDepends tool as you pointed out and couldn’t find any valuable information. I had tried using Depends tool prior to this and even that didn’t give me any valuable information. We tried installing all vcredist versions but to no avail. What is it that we might be missing here? Please help us out in finding the dependencies.

Lets focus on 64 bit.

Please zip the installfolder where your exe and all the dependent files from the MIP SDK is included and make is available to me.

Please document the PC, where the issue is seen.. Windows OS version, .NET framework version etc.

(Any information or suspicion you have will be a valuable clue. For example if you have an idea it fails on Win 10 Pro Hindi, but works on Win 2016 Server English.. So if you have information beyond the current installation please let me know it all.)

It is the same MediaLiveService project that was built from the sample code that Milestone MIP SDK has. Attaching the same here.

It was found to NOT be working on this setup:

  • Milestone 2018 R2 installed on machine with this config:

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

System Information

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

Time of this report: 6/11/2019, 18:18:51

Machine name: VMS\_WM3

Operating System: Windows Server 2012 Standard 64-bit (6.2, Build 9200) (9200.win8_ldr_escrow.190502-1700)

  Language: English (Regional Setting: English)

System Manufacturer: IBM

System Model: IBM System x3650 M4: -\[7915N5A\]-

    BIOS: -\[VVE142DUS-1.73\]-

 Processor: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz (12 CPUs), ~2.1GHz

   Memory: 8192MB RAM

Available OS Memory: 8004MB RAM

 Page File: 6306MB used, 5408MB available

Windows Dir: [C:\\Windows](file:C:/Windows)

DirectX Version: DirectX 11

DX Setup Parameters: Not found

User DPI Setting: Using System DPI

System DPI Setting: 96 DPI (100 percent)

DWM DPI Scaling: Disabled

DxDiag Version: 6.02.9200.16384 64bit Unicode

  • It was found to be working on this setup

Milestone 2018 R3 installed on this machine:

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

System Information

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

Time of this report: 6/11/2019, 18:28:54

   Machine name: DESKTOP-04FGM26

    Machine Id: {A8A79955-4C7E-41D7-B3ED-440DFAA417B3}

 Operating System: Windows 10 Pro 64-bit (10.0, Build 17763) (17763.rs5\_release.180914-1434)

     Language: English (Regional Setting: English)

System Manufacturer: Dell Inc.

   System Model: PowerEdge R630

       BIOS: Default System BIOS (type: BIOS)

    Processor: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz (12 CPUs), ~1.7GHz

      Memory: 32768MB RAM

Available OS Memory: 32674MB RAM

    Page File: 26908MB used, 10630MB available

   Windows Dir: [C:\\WINDOWS](file:C:/WINDOWS)

 DirectX Version: DirectX 12

DX Setup Parameters: Not found

 User DPI Setting: 96 DPI (100 percent)

System DPI Setting: 96 DPI (100 percent)

 DWM DPI Scaling: Disabled

     Miracast: Not Available

Microsoft Graphics Hybrid: Not Supported

  DxDiag Version: 10.00.17763.0001 64bit Unicode

I have tried real hard to see if I could reproduce the issue using more than one setup.

I had to install C++ redistributable (from Microsoft) (https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) because an error at startup of the app indicated this was missing, but after installing the most recent one I never saw an error using the sample, using the exact version you have supplied here.

I have been thinking if there might be a networking or authentication issue, but if you can use the same user in the same PC in a Smart Client it does not seem feasible.

C++ redistributable was our first doubt too. To eliminate that, why we tried installing all vc++ redistributable versions (2015,2017,etc of both 64-bit and 32-bit variants). But the error was not at the startup of the app as you pointed out.

Yes, the same user in the same PC is able to get the video feed from camera in smart client and also using the 32-bit versions of the MediaLiveService project.

Is there anything else we can check and report for you to help us out?

I hope we can solve it together, but right now I will ask more questions..

MediaLiveService is a client.

This client does not have to run in the same server machine.

If you have two setups mentioned above. Can you let the MediaLiveService on the first connect to the VMS in the other and vice versa? This test would tell us whether the fault follows the client (which is my expectation) or the VMS..

If the two setups are at customers you might not be able to test in the manner I suggest, but please try in other ways to find out if the client PC is the source for the the issue or the server is.

The client does not have to run in the same server machine, but it is important then to have the firewall and general networking correct. If the Smart Client works this should be OK.

The VMS in the above mentioned scenario is the same one to which the two setups (32-bit and 64-bit) are connecting to. The login goes through in both the setups but the sourceToolkit->connect() fails in the 64-bit with an exception but goes through without any hassle in the 32-bit one.

FYI, we’re using MIP SDK 2016 R2 in the 32-bit version whereas we’re using MIP SDK 2019 R1 in the 64-bit version.

As you mentioned, we’re facing these at the customer sites. Smart Client also works from the same machine.

https://developer.milestonesys.com/s/question/0D50O00005UTl8nSAD/breaking-change-in-upcoming-2019-r1-release-for-component-and-protocol-integrations

Will this affect the integration? If so, can you please let us know the workaround for it

The components solutions including the media toolkit c++ will work if you use the MIP SDK 2019R1 or newer.

If you use an older MIP SDK the integration will be affected if the recording server communication encryption is enabled.

Oh okay. Thanks for clarifying. Then this isn’t the problem here.

Had it been the issue it would have broken all the instances communicating with the server, you have one that does not work and one that works and these two are using the same server.

Yes, so we can safely rule out that encryption would be the issue here.

I am sorry, can you please recap. I am sorry but I got confused.

You mention two different versions (Milestone 2018 R3 VMS_WM3 - Milestone 2018 R2 DESKTOP-04FGM26**).** But you are actually saying they are the same one?

I had the idea you were comparing a 32 bit with a 64 bit. But actually you have a 2016R2 32-bit compared to a 2019R1 64-bit.

Can you show me a diagram?

(What is the server (product and version)?)

If you have multiple setups, please try to clarify for me the scenarios that have been tried..