Cannot get rid of HTTPS connection

AI Bridge cannot connect to XProtect, apparently as it requires HTTPS, even if TLS is disabled in .env file

Is there a way to get the AI Bridge to use HTTP instead?

Environment:

Running AIBridge 1.7.2 + XPCO 2024R1

Host is Ubuntu 22.04, running Docker

KVM Guest is Win11, running XPCO

XPCO does not have certificates installed as I’d love not to use them (it is a rapid prototyping system)

Errors:

aibridge-init-1 | 2024-11-02T09:51:56Z Applying registration using input from ‘/root/bin/config/register.graphql’ failed (will retry in 5 seconds) : Error adding endpoint: Post “https://Dev-Win11/ManagementServer/ServerCommandService.svc”: dial tcp 192.168.122.109:443: connect: connection refused

aibridge-connector-1 | 2024-11-02T09:51:46Z Error adding endpoint: Post “https://Dev-Win11/ManagementServer/ServerCommandService.svc”: dial tcp 192.168.122.109:443: connect: connection refused

Configuration files:

.env

# The version of the AI Bridge to run

VERSION=“v1.7.2”

# How the Bridge will be visible in XProtect as a Processing Server

BRIDGE_ID=“07072007-5625-4a1d-b6d2-e6e02a9b00b4”

BRIDGE_NAME=“AI Bridge on X64”

BRIDGE_DESCRIPTION=“AI Bridge running on Ubuntu Linux for X86_64”

# XProtect endpoint and credentials (use https to connect with TLS)

VMS_URL=“http://Dev-Win11

VMS_USER=“aibridge”

VMS_PASS=“”

# Encrypt communication with XProtect using TLS (uncomment both lines to enable)

[tls_enabled](javascript:void(0); “tls_enabled”)=“true”

[#TLS_SCHEME](javascript:void(0); “#TLS_SCHEME”)=“https”

# External IP address and hostname through which the AI Bridge services can be reached

EXTERNAL_IP=“127.0.0.1”

EXTERNAL_HOSTNAME=“localhost”

register.graphql

{

url: “${VMS_URL}”

username: “${VMS_USER}”

password: “${VMS_PASS}”

}

cert files have not been updated (as they should not be used?)

If I use a simple ubuntu docker and CURL https://Dev-Win11/ManagementServer/ServerCommandService.svc does not work (as expected), while if I point to http://Dev-Win11/ManagementServer/ServerCommandService.svc, it works (as expected)

Thanks

Hi @Massimo Lommi​ ,

Thank you for reaching out.

This endpoint is always connected through https. The real issue behind the ‘connection refused’ error is because the connector service (or container) cannot resolve the hostname ‘Dev-Win11’

To solve the issue you will need to modify AI Bridge compose configuration with the following code:

Add the following variables to your .env file:

VMS_IP=“” # Ip address of your machine hosting the management server

VMS_HOSTNAME=“Dev-Win11” # hostname of your machine hosting the management server

In the ‘docker-compose.yml’ add to the connector, streaming and proxy services the following code:

extra\_hosts:

  - "${VMS\_HOSTNAME}:${VMS\_IP}"

for example,:

```

services:

aibridge-connector:

extra\_hosts:

  - "${VMS\_HOSTNAME}:${VMS\_IP}"

aibridge-streaming:

extra\_hosts:

  - "${VMS\_HOSTNAME}:${VMS\_IP}"

aibridge-proxy:

extra\_hosts:

  - "${VMS\_HOSTNAME}:${VMS\_IP}"

```

Where … is the rest of configuration irrelevant to this issue.

We already included this configuration commented for cases such as yours in compose configurations for the next release (operating on a non-domain network).

Hope this information helps you solve the issue you are having. I will be waiting for your response.

Daniel