Can't send HTTP POST when running over Docker


#1

Greetings everyone,

Im testing the commercial OpenALPR over Docker on a CentOS 7 Linux machine. I change the alpr.config file inside the container running the Agent to make POST requests to my Http Server hosted on another machine inside the same network. However I’m not getting any requests containing the JSON expected, not even the ‘heartbeat’ ones. Instead, my http server keep receiving two kinds of requests:

-a GET /api/licenseinfo?company_id=24752bc8-2401-4848-be7d-e6bb5c7f4fa9 HTTP/1.1" 200

  • and a POST /api/accountinfo HTTP/1.1" 200
    with this body -> b’company_id=24752bc8-2401-4848-be7d-e6bb5c7f4fa9&request_url=http%3A%2F%2F10.143.25.37%3A8080%2F’

my alpr.config is on the directory /var/lib/docker/volumes/openalpr-vol1-config/_data and look like this:

[daemon]
analysis_threads = 1
company_id = 24752bc8-2401-4848-be7d-e6bb5c7f4fa9
country = br
site_id = unspecified-docker
store_plates = 1
store_plates_location = /var/lib/openalpr/plateimages/
store_plates_maxsize_mb = 7168
store_video = 1
store_video_maxsize_gb = 20
upload_address = http://10.143.25.37:8080
upload_data = 1
websockets_enabled = 1
upload_threads = 2
camera_buffer_size = 100

Where http://10.143.25.37:8080 is the IP/Port of the machine hosting the Http Server and the port of the application

Can anyone help me ?


#2

One quick way to troubleshoot is to run the alprd binary from inside the container. For example:

docker exec -it [container id] /bin/bash
supervisorctl alprd stop
alprd -f

I suspect the issue you’re probably running into is a missing license key. When connecting to the cloud, it provides a key to the agent. When you connect to your own services, the agent requires you to add a key. You can pass this in as an environment variable into Docker, or you can add it to /etc/openalpr/license.conf

You can get a free 2-week eval key here:
https://license.openalpr.com/evalrequest/


#3

IT´S ALIVE !

It was indeed the missing license key.

thank you very much.