esitarski/RaceDB

racedb_app restarts every 2 minutes in Docker Desktop - RaceDB v3.0.86-20230724153441

Closed this issue · 16 comments

Created new installation from start (all old RaceDB folders, docker volumes, docker images & containers deleted:

System information:
Microsoft Windows 10 Pro
Version 10.0.19045 Build 19045
Processor i5-5300U CPU 2.30 GHz
12GB RAM
Docker Version: v4.21.1

RaceDB Version: v3.0.86-20230724153441

With racedb_app restarting every 2 minutes not able to open RaceDB application

Thank you for the above Edward. I believe CrossMgr and RaceDB should always be utilized together. I will keep on testing if you want (I have another laptop that I can use), but I also want to keep up to date with all the advancements you are making with CrossMgr. Currently I am stuck on the following combo (CrossMgr 3.1.18-20230418175933 and RaceDB 3.0.82-20220801110523) as they are still stable for uploads from CrossMgr to RaceDB and vice versa. Would it be prudent to convert back to the original Windows install method that I used before the Docker-Container install method? I do not mind to occasionally update python, but at least I will be able to keep up with the advancements you are making.

Juan

Quite Franky, Ed, every time the "docker install" hasn't worked, it's because you changed something, broke it, assumed it would work, and never tested it. You can run a local build and assume it will work. Additionally, you have to test the development package on Windows using a clean install and a upgrade install. It took me 2 mins to fix the issue ever time I looked.

Go back in change logs and undo your docker changes.

Yes, Postgress 15 will work....it was working, and then you down graded it back to postgress 11.

Testing, testing, testing., You can just change something without testing it.

Mark
The docker install guy

AS usually, setup the container, and it took a minute to find the issue:

"django.db.utils.NotSupportedError: PostgreSQL 12 or later is required (found 11.20)"

....appeared in the logs.

Looks like @esitarski updated Django, and never tried it with Postgres.

The solution is to upgrade the postgress container to Postgress 15 (or whatever is current), make it work including whatever changes are required to make your python code work with the latest progres, and the explain to users how to migrate their data to the new version.

I would suggest stop using Sqlite for local testing and switch to postgress....and these problems won't happen.

Mark

RaceDB has been upgraded to Postgres 15. This required a change to the startup script to set the correct permissions for Django to work. I've tested the container locally on my Mac. It started and served up the web pages. I don't have a Windows machine handy to test the Windows build.

@ChainGangEvents Please download the dev build when complete. I suggest running it on a different machine if you can just to make sure it starts for you. IF that works, please let us know, and we can push an "official" build. I don't suggest running a dev build for running events.

There is no upgrade process for moving to PG11 to PG15. Users must backup their data using the backup procedure defined in the docs, wipe the data volume (on linux/Mac, use racedb.sh clean - don't remember if that works on windows - its been a while). You can use the docker desktop GUI on Windows to wipe the data volume. Once the data volume is gone, you restart the container set, and restore your data.

If @esitarski to come up with a data migration script, great. The backup and restore should work just fine.

Mark

@mbuckaway @esitarski

I successfully installed the latest Development Build RaceDB v3.0.86-beta-973cbc9 with the postgress 15 working and Docker Containers running smoothly. Container now up for more than an hour without any problems.

The restore process via the RaceDB Controller also worked and my database is complete and running in the Dev Build.

I've since downloaded the latest release of CrossMgr ( v3.1.29-20230614115457) to see if I can manage to link RaceDB with CrossMgr, but I think I've run out of skillset (I am really not good with setting IP addresses etc)

Let me know how I can be of more assistance, but please keep in mind my limited knowledge.

@esitarski I see your comments about RaceDB being run in the Cloud, with all race changes done in the Cloud base DB and just before the event do the sync with CrossMgr. All good and well if you live in a 1st World country with good internet access, as well as continuous electricity supply. Here we have rolling loadshedding where the power (and subsequent internet and cellphone lines) go off for up to 4 hours - they actually forecast that it will soon go up to 7 hours. The main attraction for me about RaceDB was the fact that the database runs on a local server. Some of my events are in areas where even if there is power there are no internet or cellphone reception and with the database on the local server it works brilliantly. Our information protection act (Poppy Act) also require very stringent rules in regards to information about participants that makes cloud configurations risky, even with password protections etc.

@esitarski the latest CrossMgr release (CrossMgr_3_1_30-20230728155824) fixed the sync issue with RaceDB - thank you. I will do some more testing with RaceDB v3.0.86-beta-973cbc9 and revert back to you with any issues.

@esitarski I tried to "Import a Competition from File", but got the below error message.

RemovedInDjango50Warning at /RaceDB/Competitions/CompetitionImport/

Passing unsaved model instances to related filters is deprecated.
Request Method: POST
http://localhost:8000/RaceDB/Competitions/CompetitionImport/
4.2.3
RemovedInDjango50Warning
Passing unsaved model instances to related filters is deprecated.
/usr/local/lib/python3.10/site-packages/django/db/models/fields/related_lookups.py, line 52, in get_normalized_value
core.WriteLog.new_f
/usr/local/bin/python
3.10.12
['/RaceDB', '/RaceDB', '/usr/local/lib/python310.zip', '/usr/local/lib/python3.10', '/usr/local/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/site-packages', '/RaceDB/src/pyllrp']
Sat, 29 Jul 2023 06:36:19 -0400

@esitarski @mbuckaway I've updated to RaceDB v3.0.87-20230729105401. Every thing working, Database complete, HUB, integration with latest CrossMgr_3_1_31-20230729113344 release. I will be running some tests with CrossMgr Impinji and the other applications as well and will give feedback ASAP.

@esitarski is this something that can be fixed easily, or should I revert back to the previous RaceDB version? I am preparing for a race and at this stage can not add "Mass Start Events" without getting the below error.

Issue #49 is still relevant, as I still get the below error message when adding a Mass Start Event:

ValueError at /RaceDB/Competitions/CompetitionDashboard/192/EventMassStartNew/192/

'EventMassStart' instance needs to have a primary key value before this relationship can be used.
Request Method: GET
http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/192/EventMassStartNew/192/
4.2.3
ValueError
'EventMassStart' instance needs to have a primary key value before this relationship can be used.
/usr/local/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py, line 718, in get_queryset
core.WriteLog.new_f
/usr/local/bin/python
3.10.12
['/RaceDB', '/RaceDB', '/usr/local/lib/python310.zip', '/usr/local/lib/python3.10', '/usr/local/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/site-packages', '/RaceDB/src/pyllrp']
Sun, 30 Jul 2023 12:11:29 -0400