Connect broker with event management agent container (docker)

Hello Team,
we are planning to implement event management agent docker container to connect backend brokers for manage, we have proxy a to connect brokers in ema.yaml we are adding below (removed sensitive info)

ema.yaml

springdoc:
  packages-to-scan: com.solace.maas.ep.event.management.agent.scanManager.rest
  api-docs:
    path: /docs/event-management-agent
  swagger-ui:
    path: /event-management-agent/swagger-ui.html
server:
  port: 8180
spring:
  main:
    allow-bean-definition-overriding: true
  servlet:
    multipart:
      max-file-size: ${MAX_FILE_SIZE:5MB}
      max-request-size: ${MAX_REQUEST_SIZE:5MB}
  jpa:
    hibernate:
      ddl-auto: create-drop
    defer-datasource-initialization: true
    database-platform: org.hibernate.dialect.H2Dialect
  datasource:
    url: jdbc:h2:file:./data/cache;DB_CLOSE_ON_EXIT=FALSE
    username: sa
    driver-class-name: org.h2.Driver
    password: XXXXXX
  h2:
    console:
      settings:
        web-allow-others: true
      enabled: true
      path: /h2
camel:
  main:
    use-mdc-logging: true
kafka:
  client:
    config:
      reconnections:
        max-backoff:
          value: 1000
          unit: milliseconds
        backoff:
          value: 50
          unit: milliseconds
      connections:
        max-idle:
          value: 10000
          unit: milliseconds
        request-timeout:
          value: 5000
          unit: milliseconds
        timeout:
          value: 60000
          unit: milliseconds
eventPortal:
  runtimeAgentId: ${EP_RUNTIME_AGENT_ID:XXXXXX}
  organizationId: ${EP_ORGANIZATION_ID:XXXXX}
  gateway:
    id: XXXXXXX
    name: US East EVMR
    messaging:
      standalone: false
      rtoSession: false
      enableHeartbeats: true
      testHeartbeats: true
      connections:
      - name: eventPortalGateway
        authenticationType: ${EP_GATEWAY_AUTH:basicAuthentication}
        msgVpn: ${EP_GATEWAY_MSGVPN:xxxxxus-east-evmr}
        url: ${EP_GATEWAY_URL:tcps://XXXXX.messaging.solace.cloud:55443}
        users:
        - clientName: client_xxxxxx
          username: ${EP_GATEWAY_USERNAME:org-XXXXXXX}
          password: XXXXXX
          name: messaging1
        proxyEnabled: ${SOLACE_PROXY_ENABLED:false}
        proxyType: ${SOLACE_PROXY_TYPE:http}
        proxyHost: ${SOLACE_PROXY_HOST:proxy.comany.com}
        proxyPort: ${SOLACE_PROXY_PORT:8080}
        proxyUsername: ${SOLACE_PROXY_USERNAME:}
        proxyPassword: ${SOLACE_PROXY_PASSWORD:}
  topicPrefix: ${EP_TOPIC_PREFIX:sc/xx/runtime}


we are not using any username password for proxy , 

when we are try to run container , it is keeps on saying like connection timeout (but broker end point is accessing with open SSL with proxy in terminal with different protocols like (WSS,TCPS,HTTPS)

Client-1: Connection attempt failed to host xxxxx.messaging.solace.cloud' ConnectException communicating with the router. cause: io.netty.channel.ConnectTimeoutException: connection timed out after 30000 ms: -evmr.messaging.solace.cloud/xx.xx.xx.xx:55443 ((Client name:    ) - )

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Looking at the documentation, I can help explain how to resolve connection timeout issues when connecting through a proxy using Event Management Agent (EMA).

For proxy connections with EMA, you need to configure the following environment variables before starting the Docker container:

EMA_SOLACE_PROXY_ENABLED=true
EMA_SOLACE_PROXY_TYPE=http
EMA_SOLACE_PROXY_HOST=your_proxy_host
EMA_SOLACE_PROXY_PORT=your_proxy_port
EMA_SOLACE_PROXY_USERNAME=your_username  # Optional if no auth required
EMA_SOLACE_PROXY_PASSWORD=your_password  # Optional if no auth required

The Docker run command should include these environment variables:

docker run -d -p 8180:8180 \
--env SOLACE_PROXY_ENABLED=${EMA_SOLACE_PROXY_ENABLED} \
--env SOLACE_PROXY_TYPE=${EMA_SOLACE_PROXY_TYPE} \
--env SOLACE_PROXY_HOST=${EMA_SOLACE_PROXY_HOST} \
--env SOLACE_PROXY_PORT=${EMA_SOLACE_PROXY_PORT} \
--env SOLACE_PROXY_USERNAME=${EMA_SOLACE_PROXY_USERNAME} \
--env SOLACE_PROXY_PASSWORD=${EMA_SOLACE_PROXY_PASSWORD} \
--name event-management-agent solace/event-management-agent:latest

You can verify the EMA connection status by checking the logs:

docker logs -f event-management-agent

Relevant documentation: