OpenALPR LPR Downloader stopped working?

33696933

Pulling my weight
Joined
Mar 29, 2020
Messages
67
Reaction score
195
Location
NY
Seems my Downloader stopped importing around 1:17PM Eastern July 6. Imported, Skipped, Update are mostly 0 with a few showing 1/2 imported even after restarting program and computer. Nothing new shows up in the Viewer after that time but I do see new entries under Car Details. Anyone else having the same problem?
 

Attachments

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,884
Reaction score
48,526
Location
USA
Yep. Issue with OpenALPR.
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
I ran into this yesterday. It turns out that when I created my mySQL database back in 2019 I used INT for the pk value. The maximum value that an INT can be in mySQL is 2147483647. pk values went above that number yesterday. I changed my database to BIGINT for the pk value and everything is working normal again.

I am not familiar with the OpenALPR LPR Downloader implementation of the pk value, but this might the issue.

edit: Add more context

The data was being downloaded properly it just couldn't be imported into the database because of the pk value being higher than 2147483647. Due to the automated nature of my setup I was not seeing any error messages until I started trying to import by hand. With some googling of error messages I figured out the issue.

With pk as a BIGINT I should be good until pk gets above 9223372036854775808.


Code:
[LPR]>select  pk, epoch_time_start from Plates where pk >= '2147478437' order by pk limit 2;
+------------+---------------------+
| pk         | epoch_time_start    |
+------------+---------------------+
| 2147478437 | 2022-07-06 11:15:50 |
| 2147492777 | 2022-07-06 11:20:23 |
+------------+---------------------+
In the almost 5 minutes between these entries the pk value went above the max value for an INT. Times shown are mountain time.
 
Last edited:

33696933

Pulling my weight
Joined
Mar 29, 2020
Messages
67
Reaction score
195
Location
NY
I ran into this yesterday. It turns out that when I created my mySQL database back in 2019 I used INT for the pk value. The maximum value that an INT can be in mySQL is 2147483647. pk values went above that number yesterday. I changed my database to BIGINT for the pk value and everything is working normal again.

I am not familiar with the OpenALPR LPR Downloader implementation of the pk value, but this might the issue.

edit: Add more context

The data was being downloaded properly it just couldn't be imported into the database because of the pk value being higher than 2147483647. Due to the automated nature of my setup I was not seeing any error messages until I started trying to import by hand. With some googling of error messages I figured out the issue.

With pk as a BIGINT I should be good until pk gets above 9223372036854775808.


Code:
[LPR]>select  pk, epoch_time_start from Plates where pk >= '2147478437' order by pk limit 2;
+------------+---------------------+
| pk         | epoch_time_start    |
+------------+---------------------+
| 2147478437 | 2022-07-06 11:15:50 |
| 2147492777 | 2022-07-06 11:20:23 |
+------------+---------------------+
In the almost 5 minutes between these entries the pk value went above the max value for an INT. Times shown are mountain time.
Oh so it was overflowed. How does one change the database to BIGINT?
 
Joined
Nov 8, 2019
Messages
18
Reaction score
8
Location
Arizona
My downloads stopped 7-6-2022 at 06:30 MST. My LPR Downloader Data Imports section went to gray and I no longer see any historic download activity. My LPR Viewer has also stopped showing any new captures since 06:30 MST yesterday, even with manual csv updates into Downloader.

From the web OpenALPR Cloud, I can see my current capture activity, but when I hover over the license plate link in the Dashboard I get a thumbnail with no plate picture but a message "image not available." If I click that license plate link, the pop up appears showing the plate capture.

Interesting that from the Advanced Search page on the web Cloud I can hover over the plate link and the thumbnail appears with the plate capture as it normally would.

If I stop and start the Auto Downloads in LPR Downloader, I do update the current capture activity in the lower section of the Downloader screen. Clicking those license plate links opens the plate capture image.



I put in a ticket to Rekor yesterday - they got back to me this morning suggesting that the 'remote agent was not connected', which it is not true because I'm capturing plates and can see them in the Rekor Cloud.

I responded that the agent was not the problem and sent them some logs to review.

Waiting for them to get back to me.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
Mine was having the same issue I just updated mine to nvchar50 .. Seems like that did the fix for now..BIGINT should be fine as well however I do not have much SQL know how so Will let either dlong or gymrat to look into it..

What was the fastest way you guys used to update the value ? I just ended up running the initial setup/update query with updated value. That did the trick for me.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
This maybe introducing another issue....

Are you guys seeing this in event viewer ?


Violation of PRIMARY KEY constraint 'PK_PlateHits_ToHide'. Cannot insert duplicate key in object 'dbo.LPR_PlateHits_ToHide'. The duplicate key value is (0).
The statement has been terminated.
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
Violation of PRIMARY KEY constraint 'PK_PlateHits_ToHide'. Cannot insert duplicate key in object 'dbo.LPR_PlateHits_ToHide'. The duplicate key value is (0).
The statement has been terminated.
I saw something similar to this with my database yesterday when I was troubleshooting the issue. mySQL was setting every pk value that was above the max INT value to the max INT value of 2147483647, this caused the duplicate error messages for me and these rows were not imported.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
I saw something similar to this with my database yesterday. mySQL was setting every pk value that was above the max INT value to the max INT value of 2147483647, this caused the duplicate error messages for me and these rows were not imported.
Correct but seems like even with updated value to say NVCHAR50 or bigint.. There is still and underline issue going on.. Can you please check your event viewer under application and see if you see something similar in term of errors.
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
I don't use the LPR system outlined in this thread. I rolled my own using Linux, Apache, mySQL and PHP. I was just sharing my findings from yesterday in hopes that it would help with this LPR system.
 
Joined
Nov 8, 2019
Messages
18
Reaction score
8
Location
Arizona
And I'm still seeing that message today after I applied your download fix. I placed a ticket at Rikor about this and sent screen shots of the message.

Waiting for their response.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
And I'm still seeing that message today after I applied your download fix. I placed a ticket at Rikor about this and sent screen shots of the message.

Waiting for their response.
So Keep in mind Rekor has nothing to do with the downloader we build here.. Infact they charge more to retain data so this is a solution which IPCT members have build here.

Infact rekor will probably wanna block the solution we build here instead of helping as they charge more to retain data and have unlimited alerts...
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
And I'm still seeing that message today after I applied your download fix.
My solution had nothing to do with that issue. That's on Rekor's side of things.

If you have Max Image Storage (GB) setup with a value the pictures are stored on your local machine that is running the Rekor Scout software.
http : /ip.of.rekorscout.machine:8355/img/BEST_UUID.jpg

Max Image Storage (GB) is setup in the agent settings in the Scout application on the computer. It can also be setup from the website.
 
Joined
Nov 8, 2019
Messages
18
Reaction score
8
Location
Arizona
My ticket to Rekor is about the problem with their web Cloud and the error message generated on their platform. I'm aware that the LPR Downloader and Viewer was developed here (thanks to Dlong and gymratz and others) and has nothing to do with Rekor.

Do you know how to fix this error? When I hover over the plate number link I get this message. Clicking on the plate number link opens the plate capture image so I know the path and file are correct.

7-7-2022 12-45-58 PM.png
 
Joined
Nov 8, 2019
Messages
18
Reaction score
8
Location
Arizona
My solution had nothing to do with that issue. That's on Rekor's side of things.

If you have Max Image Storage (GB) setup with a value the pictures are stored on your local machine that is running the Rekor Scout software.
http : /ip.of.rekorscout.machine:8355/img/BEST_UUID.jpg

Max Image Storage (GB) is setup in the agent settings in the Scout application on the computer. It can also be setup from the website.
I checked the max image storage and I'm using about half of the allocation. Restarted all the computers, checked drive space, made sure the 3 agent services were running and I still get this message from the dashboard on their platform.

As you said this is on Rekor's side so I'm waiting for them to get back to me.

I expect this will be one of those mystery fixes that just suddenly gets resolved but if they tell me there is a solution on my end I'll post it.

Thanks again for the BIGINT resolution.
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
I don't know how to fix it from our side. This seems to be an internal Rekor server issue. It also appears to be affected by the INT issue I mentioned above. If you look at entries online from yesterday the preview images stop at the same time that the downloader started having the issue.

Before the max INT value for pk was exceeded:
no_image2.png

After the max INT value for pk was exceeded:
no_image1.png

Those entries match up with my mySQL database entries from before and after the max INT value for pk was exceeded:
Code:
[LPR]>select  pk, best_plate, epoch_time_start from Plates where pk >= '2147478437' order by pk limit 2;
+------------+------------+---------------------+
| pk         | best_plate | epoch_time_start    |
+------------+------------+---------------------+
| 2147478437 | APYD00     | 2022-07-06 11:15:50 |
| 2147492777 | 178OLQ     | 2022-07-06 11:20:23 |
+------------+------------+---------------------+
 
Top