10000 Recorder with external SQL server - "Database not ready" error · Issue #6179 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Recorder with external SQL server - "Database not ready" error #6179

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

Closed
wroadd opened this issue Feb 23, 2017 · 2 comments · Fixed by #6192
Closed

Recorder with external SQL server - "Database not ready" error #6179

wroadd opened this issue Feb 23, 2017 · 2 comments · Fixed by #6192

Comments

@wroadd
Copy link
wroadd commented Feb 23, 2017

Home Assistant release (hass --version): 0.38.4
Python release (python3 --version): Python 3.5.2
Component/platform: Recorder
Description of problem:
After configuring the Recorder with the "db_url", the following error message appears in the log:
[homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
No data written or read from the database
Expected:
Uploading dat to the database and read them.

Problem-relevant configuration.yaml entries and steps to reproduce:

recorder:
db_url: username:passwd@127.0.0.1/database

Additional info:
recorder is a MySQL server, the user name,password db read/write is working outside HA
More cases in the forum:
https://community.home-assistant.io/t/0-38-1-database-not-ready/11724

Possible solution
The HA not checking (and not installing) the required sql python package (in my case mysqlclient).
Temporary fix could be the

pip3 install mysqlclient

It could be great, if the HA could install the proper component "on-the-fly" after the start.

@lwis
Copy link
Member
lwis commented Feb 23, 2017

This will likely be fixed by #6167.

@kellerza
Copy link
Member

Installing the mysqlclient is not in scope of the recorder and must currently be handled by an installer or the user since it requires compiling on certain platforms. Preferably this should NOT be installed in deps, but in the virtual environment, since deps gets nuked on each upgrade.

I suspect SQLAlchemy throws an uncaught exception on the recorder thread and this message is generated by other processes blocking on the recorder.

Since #4614 these will increase the timers and throw proper exceptions, but the root cause will still be hidden. Will propose a possible fix.

kellerza added a commit to kellerza/home-assistant that referenced this issue Feb 28, 2017
balloob pushed a commit that referenced this issue Mar 3, 2017
* [recorder] Catch more startup errors #6179

* Rebase on new recorder
@balloob balloob mentioned this issue Mar 11, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jun 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0