I am trying to install a docker container with the event management agent on my local Windows desktop (windows 10). This is the credential section of the agent YAML file:
**authentication:
- properties:
- value: basicAuthentication
name: type
protocol: semp
credentials: - properties:
- name: username
value: broker_a_vpn_a-admin - name: password
value: ${2b2hqt0e9702u1rj5dcpcge9rt}
source: ENVIRONMENT_VARIABLE
operations: - name: ALL**
I replaced the password value to ${AEM_PASSWORD} and supplied the value while creating the docker container.
docker run -d -p 8180:8180 -v “C:\Users\DeepankarBhowmick\Downloads\Edge\event_management_agent.yml:/config/ema.yml” --env AEM_PASSWORD=2b2hqt0e9702u1rj5dcpcge9rt –name event-management-agent solace/event-management-agent:latest
The docker image is being created successfully, and the agent starts successfully. Here is the ENV section inside the docker container (see in italics the value set correctly):
“Env”: [
“AEM_PASSWORD=2b2hqt0e9702u1rj5dcpcge9rt” ,
“PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ema/terraform”,
“JAVA_HOME=/opt/java/openjdk”,
“LANG=en_US.UTF-8”,
“LANGUAGE=en_US:en”,
“LC_ALL=en_US.UTF-8”,
“JAVA_VERSION=jdk-17.0.10+7”,
“HOME=/home/emauser”,
“GITHASH=ecb2b23be0590930d0ea8ba0b95cc43b15dc0f48”,
“GITBRANCH=main”,
“BUILD_TIMESTAMP=Thu Aug 15 23:02:33 UTC 2024”
]
The agent also connects successfully with the broker:
But when I perform the discovery run scan - it fails with a 401 with the following message in the docker logs:
Error during SEMP Data Collection. Could not authenticate with the server. Check that the SEMP username and password are correct.
401 Unauthorized from GET https://mr-connection-.messaging.solace.cloud:943/SEMP/v2/config/msgVpns/broker_a_vpn_a/queues
What could be the reason? I already tried providing the password from another Windows variable (AEM_PASSWORD=%WINDOWS_VARIABLE%) during the docker container creation phase - same issue.
It appears that while running the discovery scans - the agent is unable to get the username and password.