Trouble running multiple Docker Agents on single physical host


I am have trouble getting multiple docker agents to run on a single physical host. I have separate folders set up for each agent (Agent01 and Agent02) and I am successfully able to start both docker agent containers, but the Openalpr Web server will only recognize one of them. From the docker logs files it looks like both agents are running properly.

Is there a way to have more than one Docker Agent running on the same physical host?



I wonder if they’re configured with the same agent ID? Do they have unique volume mounts for the configuration and images? Is the value in /etc/openalpr/install_id different on each Docker container?


I have the following 2 volume mounts

-v /etc/openalpr/openalpr-agent01-config:/etc/openalpr/
-v /etc/openalpr/openalpr-agent01-images:/var/lib/openalpr/

install_id = 95B8SP2ZX1O7KS419JII6U5008WZL7BUSMI0BKF8

-v /etc/openalpr/openalpr-agent02-config:/etc/openalpr/
-v /etc/openalpr/openalpr-agent02-images:/var/lib/openalpr/

install_id = 95B8SP2ZX1O7KS419JII6U5008WZL7BUSMI0BKF8

So it looks like they both have the same install_id. How is that generated?

This is my alrpd.conf

analysis_threads = 1
auto_start_on_boot = 1
classify_vehicles = 1
company_id = 75a74c31-d668-431f-b695-a10a3c2285e2
country = us
motion_detection = 1
site_id = Agent02
store_plates = 1
store_plates_maxsize_mb = 6000
store_video = 0
store_video_maxsize_gb = 0
upload_address = https://x.x.x.x.x/push/
upload_data = 1
upload_second_tube_post_enabled = 1
upload_second_tube_post_url = http://x.x.x.x:9000/api/alpr
upload_write_second_tube = 1
web_server_enabled = 1
websockets_enabled = 1




Another thing that I noticed is that on the web server where it list each agent. The host name is the same as the container Id in docker.

I have 2 containers running

a09de1ff4e54 openalpr/commercial-agent openalpr_agent02
3e2627910c23 openalpr/commercial-agent openalpr_agent01

In the web server I see


Now the interesting part is the host name on the web server will occasionally switch to the other docker container Id.

Ignore the OpenAlprWeb agent that is running on some other machine.

Hope this helps to narrow the issue.



Can you try manually editing one of the install IDs to see if the webserver will recognize it as a different agent then?