-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
502 Bad Gateway #5
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐛 bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull. |
|
All it says is: 2019-01-01 22:04:50 INFO: HikariPool-1 - Starting... |
same proble here with the same logs |
Also can confirm this error.
I am fairly sure now that this error is related to the addon getting restarted before the install has completed leading to the database being stuck in a locked state. To resolve this error, simply uninstall and re-install giving it plenty of time even when it is giving a 502 error to finish completing the install. This may be a significant amount of time on slow devices. |
re-installing worked for me. thx |
Same issue so I reinstalled/restarted HA. I thought I was still getting the error but it looks like it just took a while for it to start the service. It's running now. |
There is no control from my end possible in this department. |
That issue i experienced while i was on RPI3B+ MariaDB would lock a table and would not unlock it even if request was issued. After i moved to Laptop i havent experienced that issue any more. |
I have had this happen too often and the quickest way to resolve it is just deleting the DB. This does lose the data so it might be a better solution that the docker start script has a section written in to force an unlock of the tables prior to Traccar start up. This shouldn't cause issues as the file locking can't possibly actually be occurring since the docker just restarted but I do not know the commands to achieve this. |
I am experiencing this issue as well. I originally uninstalled and deleted the database....reinstalled....and it worked fine. However, when I just performed a reboot of my RPi3-B+, I now have the same issue. This needs to be resolved. I would rather not have to uninstall....delete database....and then reinstall every time I need to reboot my RPi. |
Agreed - @frenck any chance you could add a force unlock to the database as part of the docker start scripting? |
+1 for this problem. How do I delete the database as mentioned by Aterfax? |
SSH into the host and either get a terminal inside the the docker or go to the config folders inside of hassio / the docker and delete the db file.Should be under /config inside the docker or somewhere in /usr/share/hassio/ on the host.File paths should be relatively easy to find for either but I am on mobile and can't recall the exact file paths from memory. Google will help if you can't find the right place straight away.
|
I'm having the same problem. I'm more than happy to get my "hands dirty" - if I only knew where/how to start. |
Then the folder structure depends on how you've installed Hassio I suspect. Using the "where" command on the hassio executables might help? |
Okay - so to update my previous - it seems I was using a protected mode (from within Hassio - IDE) so wasn't able to see the docker processes. Here's how to do it. Run command
This should list 2 databases which can be removed as follows: Now you can restart your Hassio traccar addon, and traccar will re-create the databases. |
I have had the DB corrupt (left itself locked somehow) itself again out of nowhere - something is needed to resolve this issue and remove the DB lock on start up or this plugin is basically un-usable. |
I have had the same happen AGAIN. It is so annoying to have to re-enter the Traccar data evry time this happens. I agree with Aterfax that unless the problem can be fixed, the plugin is un-usable. I really appreciate the work put in to provide this plugin to HomeAssistant but I use Traccar as a security device and the one thing a security device needs to be is reliable. |
I have found a little more information on this error. Apparently the database used in the Traccar Plugin is Liquibase. the Locks can be released by issuing the command 'Liquibase releaseLocks' command will clear the locks - problem is that Liquibase is not a known command in the docker container. As would dropping the DATABASECHANGELOGLOCK table (which would be automatically recreated. |
Pretty sure this will need the H2 console to achieve! http://www.h2database.com/html/tutorial.html That is, either by fixing the file by downloading it and running the commands above after connecting to the DB or by running H2 console commands during docker startup. Edit: I should add - ideally this implementation should stop using H2 anyway* |
Not a fix, but a (relatively) easy way to overcome the problem - install the MariaDB addon in HassOS and follow the instructions here https://www.traccar.org/mysql/ to tell Traccar to use MariaDB. You can then use a MySQL admin tool (such as the Chrome MYSQL admin tool) to manage the database, including dropping the lock table if Traccar gets in a mess. |
I have a working bypass for this - using MariaDB and Appdaemon plugins to HomeAssistant I am happy to share it if anyone needs it. |
I agree, I should provide a way to hookup the add-on to MySQL. |
Another option would be sqlite of course, which might be more portable in case of an add-on. |
Actually, I'm not going to do this, instead, let's adjust the manual on how to configure Traccar for MySQL (Since you can do that, because the configuration XML is available for the user). That way, the add-on still works out of the box, but a user can decide himself to which database he wants it to connect (e.g., sqlite, postgress or mysql). |
How to use MariaDB/MySQL with this add-on has now been documented in the add-on documentation. |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Problem/Motivation
I’m getting bad gateway when tryin to access web ui, no error log and I tried different ports but no luck
The text was updated successfully, but these errors were encountered: