OpenALPR Webhook Processor for IP Cameras

The processor currently needs to be able to talk to the rekor agent running on your network to pull the images.
 
It can’t connect to your local agent to pull the images.


So that is setup as the "Endpoint URL" in the setup page. such as "". And you have to port forward that to the machine .... Is there anything else that comes into play here. Where is the image coming from, the agent or the database?

The reason I ask is because I can sometimes install a previous version and use all the same values and things work.

LPR-DESKTOPCustom8355→8355
Single port
TCP & UDP×
 
So that is setup as the "Endpoint URL" in the setup page. such as "". And you have to port forward that to the machine .... Is there anything else that comes into play here. Where is the image coming from, the agent or the database?

The reason I ask is because I can sometimes install a previous version and use all the same values and things work.

LPR-DESKTOPCustom8355→8355
Single port
TCP & UDP×

The image comes from the Rekor Agent you are running locally. So you have to make sure that the Docker webhook service (wherever you are running it from) can connect to the computer you are running the agent on. If you are running the Rekor agent and the webhook service from the same subnet (or even the same machine) then you shouldn't have to do anything special to get the webhook service to talk to the agent. All devices on the same subnet (network) can always talk to everybody. Occasionally, you may have a Windows firewall rule issue where you have to open up an incoming port on the actual Windows computer you are running the Rekor agent on so the webhook service can connect to it. This is because Windows locks all incoming ports down by default.

Also, you don't need to port forward to the Rekor Agent. You only need to port forward to the @mlapaglia webhook service wherever you are running it from. The way it works is that the Rekor Cloud has to send the webhook to you when it sees a plate. That webhook gets sent to the webhook service but you have to port forward to the computer where you are actually running the webhook.

Here is screen shot of my router as an example. You can see I forward 4 services to various computers. However, the red arrow is the important one for you. I'm forwarding all UDP traffic with a port destination of 3859 that hits my public WAN IP address to an internal address of 10.200.200.16. That is the VM where I run his webhook service. So all the webhooks coming from the Rekor cloud are sent directly to the webhook service.

Screenshot from 2021-10-30 12-28-58.png

Does your Rekor agent computer really have an IP address of 136.xxx.xxx.xxx? Are you not running the Rekor agent locally because that IP address suggests you are trying to connect to an agent that is not in your local home subnet.
 
  • Like
Reactions: CamCrazy
The image comes from the Rekor Agent you are running locally. So you have to make sure that the Docker webhook service (wherever you are running it from) can connect to the computer you are running the agent on. If you are running the Rekor agent and the webhook service from the same subnet (or even the same machine) then you shouldn't have to do anything special to get the webhook service to talk to the agent. All devices on the same subnet (network) can always talk to everybody. Occasionally, you may have a Windows firewall rule issue where you have to open up an incoming port on the actual Windows computer you are running the Rekor agent on so the webhook service can connect to it. This is because Windows locks all incoming ports down by default.

Also, you don't need to port forward to the Rekor Agent. You only need to port forward to the @mlapaglia webhook service wherever you are running it from. The way it works is that the Rekor Cloud has to send the webhook to you when it sees a plate. That webhook gets sent to the webhook service but you have to port forward to the computer where you are actually running the webhook.

Here is screen shot of my router as an example. You can see I forward 4 services to various computers. However, the red arrow is the important one for you. I'm forwarding all UDP traffic with a port destination of 3859 that hits my public WAN IP address to an internal address of 10.200.200.16. That is the VM where I run his webhook service. So all the webhooks coming from the Rekor cloud are sent directly to the webhook service.

View attachment 106589

Does your Rekor agent computer really have an IP address of 136.xxx.xxx.xxx? Are you not running the Rekor agent locally because that IP address suggests you are trying to connect to an agent that is not in your local home subnet.

I don't know what the heck is going on. It was working just fine but now I can't get the images to be retrieved.

Both the processor and the agent are running on the same machine in Docker containers on Windwos 10.

The processor is running on port 3862
The agent in on port 11300 and/or 8355
The machine IP address is 192.168.1.172

I have set the "Endpoint URL" as the following but none of them seem to work. I have also port forwarded 8355 to the machine.
1. 2. 3.
I don't get the image/plate previews and get this error message in docker

[21:48:49 ERR] An unhandled exception has occurred while executing the request.
System.Net.Http.HttpRequestException: Connection refused (192.168.1.172:8355)
---> System.Net.Sockets.SocketException (111): Connection refused
 
Someone else had this issue, they had a docker networking issue that was preventing the processor from talking to the agent.
 
I just wanted to say thank you to @mlapaglia for making this available. I battled for a while to get it working in Windows 10 using Docker but the system has been a great help in tracking vehicles, in many ways it can make the actual cctv footage redundant. The historical aspect is incredible :D
 
I have to second this... This is a great application. I've had it running for a year and then decided to upgrade and have all kind of issues getting Windows and Docker and the network to work out. It's been a steep learning curve and I am slowly getting up to speed. But still can't get the Processor to reach back to the agent thru the container/network to get the preview images..

I've tried all kind of IP addresses (127.0.0,1, Internal IP and external IP all to PORT 8355, which I have opened in my firewall). Anybody have any expertise with Windows and Docker that have any ideas?
 
I have to second this... This is a great application. I've had it running for a year and then decided to upgrade and have all kind of issues getting Windows and Docker and the network to work out. It's been a steep learning curve and I am slowly getting up to speed. But still can't get the Processor to reach back to the agent thru the container/network to get the preview images..

I've tried all kind of IP addresses (127.0.0,1, Internal IP and external IP all to PORT 8355, which I have opened in my firewall). Anybody have any expertise with Windows and Docker that have any ideas?
Is the webhook testing OK from Rekor website? sorry, I am coming in a bit blind and don't admit to being an expert on this. How did you setup Docker, ie pull the image and are you running WSL2 in docker?

Did you open any ports on your router previously, if so then these would not be changed assuming you just upgraded the computer?
 
Ah, OK, just realised you are running the Rekor agent in Docker, mine runs in Windows 10 so my setup probably won't help us much with this issue. I wouldn't actually mind to move Rekor to Docker though so it would be nice to iron this out.
 
You might just have a docker issue with letting the container talk to the outside network. I'm using this on unraid so it's all configured for me. you can always try getting inside the container with shell and pinging stuff on your local network to see if it can see anything.
 
v4.0.0-alpha2 has
1. support for filtering for plates only seen 10 times or less.
2. upgrading to dotnet 6.0

It's just a preview for now, back up your database before trying it out if you want to test the new feature.

If you are running the windows executable (not docker) you will need to install the dotnet 6 runtime
 
  • Like
Reactions: biggen
Yes, I run both the Agent and the Processor in Docker. I had it running on another machine and everything communicated just fine. But I had some funky DB connection issues with the latest versions so I moved everything over to a new machine. I thought I would try it again using WIndows and Docker to see how it worked. Now the DB issues have gone away and the processor records all plates... but I can't get the processor to preview the plates. Obviously the Webhook is working fine, the agent works fine to the cloud and the processor work fine when it gets the Webhook push (I think). But when it trys to communicate with the agent (running on the same machine, in Docker) it gets a connectio9n refused 500 error.
 
Do you have your agent exposing the web ui port? can you get to the webpage from the machine that is running the processor? 1635709180602.png

Also make sure your url is configured correctly in the processor settings
1635709388935.png
 
Do you have your agent exposing the web ui port? can you get to the webpage from the machine that is running the processor? View attachment 106705

Also make sure your url is configured correctly in the processor settings
View attachment 106707

I appreciate this. I was looking for a way to test my network setup with out having to go thru the Processor. When I try to go to my URL I get the connection refused.

I think this is my main problem. I know it's not with the processor, It's trying to get to the Agent. No matter what IP I use I just can't find the right setting on the firewall or Docker to let the connection thru.
 
The agent is running in Docker in Windows? If so, have you tried disabling the Windows firewall on that computer?
 
I appreciate this. I was looking for a way to test my network setup with out having to go thru the Processor. When I try to go to my URL I get the connection refused.

I think this is my main problem. I know it's not with the processor, It's trying to get to the Agent. No matter what IP I use I just can't find the right setting on the firewall or Docker to let the connection thru.
Make sure you have -p '4382:80/tcp' in your docker command so it allows that port out of the container <HOST>:<CONTAINER>
 
Yes, I run both the Agent and the Processor in Docker. I had it running on another machine and everything communicated just fine. But I had some funky DB connection issues with the latest versions so I moved everything over to a new machine. I thought I would try it again using WIndows and Docker to see how it worked. Now the DB issues have gone away and the processor records all plates... but I can't get the processor to preview the plates. Obviously the Webhook is working fine, the agent works fine to the cloud and the processor work fine when it gets the Webhook push (I think). But when it trys to communicate with the agent (running on the same machine, in Docker) it gets a connectio9n refused 500 error.
Well just for a laugh I pulled this into Docker and sure enough I get the same, plates update but all images show question marks. Answers on a postcard :lol: now wondering why I tempted fate! will play with it and see what I can find.

My head started hurting so I am back on Rekor for Windows until somebody smarter than me figures this one out :thumb:
 
Last edited:
Well just for a laugh I pulled this into Docker and sure enough I get the same, plates update but all images show question marks. Answers on a postcard :lol: now wondering why I tempted fate! will play with it and see what I can find.

I cried "UNCLE" and called it quits after 3 days of messing with it :) I went with your method of having the Processor in Docker and the agent running as a Windows App. It took me awhile to figure out what port it was using but finally figured it out.

Code:
Sep 30, 2021

#963
harleyl7 said:
hmm where do I check that out? All im running is rekor agent.
found it..

had to go to my rekor scout configure and go to Configure > Data Destination > Local Queue > set webservice port and check webservice debug (however, this deregisters your agent with the cloud) so you have to go back in and set it to the cloud by logging in with user and password or register with cloud.

Just for future reference:

Configure your agent/cameras in Rekor Scout application. Make sure you go to Configure > Data Destination > Local Queue > set webservice port and check webservice debug to set your PORT. (see note above)
Make sure Rekor see plates and stores the info... then move on to setting up you Processor.

Setting up your Processor.

The Question marks in the OpenALPR Watchman Agent screen will guide you where to get the information from but below are a couple of notes. Once your Processor/Agent is setup then setup your cameras.

1. Endpoint Url: is just my computer internal IP address with the port of the processor.
2. The only port I forwarded was 3862 (Processor in Docker) so the Webhook could call back into my machine to reach the Processor.

3. Processor/Docker is configured with the following command:
docker run -d --name=[Display Name] --restart unless-stopped --net=bridge -v [Windows Folder to store DB]:/app/config/ -p 3862:80 mlapaglia/openalprwebhookprocessor:[version]
docker run -d --name=v3.17.0-ALPRwebhook --restart unless-stopped --net=bridge -v C:\Docker\v3.17.0.openALPRwebhook:/app/config/ -p 3862:80 mlapaglia/openalprwebhookprocessor:v3.17.0-alpha10

4. The Webhook is set up to point to your machine (external IP/PORT) identified/configured in Docker. ie:
5. Test the Webhook connection in the Rekor Configuration/WebHook page by pressing the "Test WebHook" button. If you get a 200 success then The Rekor Cloud can see your processor.
6. Test your agent's ability to be seen from your computer by entering http://<Internal IP>:8355/ (IP/Port of the agent) you should see:


OpenALPR Local Webservice Diagnostics
...

This is the basics in setting things up on a Windows 10 machine.

Thanks to @mlapaglia for writing this great application. It does a great job in keeping historical data for the license plates that drive thru my neighborhood.
 
  • Like
Reactions: CamCrazy