Skip to content
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

MariaDB/Recorder issue after updating to 2023.4 #91019

Closed
domoritz opened this issue Apr 7, 2023 · 9 comments
Closed

MariaDB/Recorder issue after updating to 2023.4 #91019

domoritz opened this issue Apr 7, 2023 · 9 comments

Comments

@domoritz
Copy link

domoritz commented Apr 7, 2023

The problem

I updated to 2023.4.0 and then noticed that this morning HA wasn't responding anymore ("Unable to connect to Home Assistant."). I use MariaDB. I updated to 2023.4.1 via the command line ha core update but the web app still doesn't come up. In the logs, I see this error (using ha core logs).

2023-04-07 07:17:39.549 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid adapt_lgt:b'IhGy':interval:b'0R' to bytes: ULID must be a 26 character string: adapt_lgt:b'IhGy':interval:b'0R'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
    return ulid_to_bytes(ulid)
  File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: adapt_lgt:b'IhGy':interval:b'0R'
2023-04-07 07:17:39.557 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid adapt_lgt:b'IhGy':interval:b'0R' to bytes: ULID must be a 26 character string: adapt_lgt:b'IhGy':interval:b'0R'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
    return ulid_to_bytes(ulid)
  File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: adapt_lgt:b'IhGy':interval:b'0R'

What version of Home Assistant Core has the issue?

2023.4.1

What was the last working version of Home Assistant Core?

2023.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Recorder

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@dolenec
Copy link

dolenec commented Apr 7, 2023

Firstly check MariaDB version and probably update tovthe latest version..

@domoritz
Copy link
Author

domoritz commented Apr 7, 2023

I already have the latest version

- advanced: false
  available: true
  build: false
  description: A SQL database server
  detached: false
  homeassistant: null
  icon: true
  logo: true
  name: MariaDB
  repository: core
  slug: core_mariadb
  stage: stable
  state: started
  update_available: false
  url: https://github.com/home-assistant/hassio-addons/tree/master/mariadb
  version: 2.5.2
  version_latest: 2.5.2

@dolenec
Copy link

dolenec commented Apr 7, 2023

Sorry, at thought that you have LXC .. nevermind.

@mdeweerd
Copy link

mdeweerd commented Apr 7, 2023

I just upgrade to 2023.4.1 and my system uses the default sqlite3 database and I have a similar issue:

2023-04-07 22:00:28.055 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid adapt_lgt:b'Z&SB':interval:b'76' to bytes: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'76'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
    return ulid_to_bytes(ulid)
  File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'76'
2023-04-07 22:01:57.874 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid adapt_lgt:b'Z&SB':interval:b'7X' to bytes: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'7X'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
    return ulid_to_bytes(ulid)
  File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'7X'
2023-04-07 22:01:58.029 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid adapt_lgt:b'Z&SB':interval:b'7X' to bytes: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'7X'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
    return ulid_to_bytes(ulid)
  File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: adapt_lgt:b'Z&SB':interval:b'7X'

@mdeweerd
Copy link

mdeweerd commented Apr 7, 2023

Usually I update HACS components before upgrading. I didn't, but I should have. I restarted HA, then updated the components, problem gone. Probably related to Adaptive Lighting.

@domoritz
Copy link
Author

domoritz commented Apr 7, 2023

@mdeweerd Great you could solve your issue. I restarted ha and everything is up to date (I think) but the UI still doesn't come up. Are there specific commands you ran or a safe mode you used?

@mdeweerd
Copy link

mdeweerd commented Apr 7, 2023

I had difficulty accessing HACS in the UI after startup, so I restarted HA and started updating the components quite shortly aftert HA started - priority given to adaptive lighting.

Check the custom_component manifest - I have this now:

{
  "domain": "adaptive_lighting",
  "name": "Adaptive Lighting",
  "codeowners": ["@basnijholt", "@RubenKelevra", "@th3w1zard1"],
  "config_flow": true,
  "dependencies": [],
  "documentation": "https://github.com/basnijholt/adaptive-lighting#readme",
  "iot_class": "calculated",
  "issue_tracker": "https://github.com/basnijholt/adaptive-lighting/issues",
  "requirements": ["ulid-transform"],
  "version": "1.10.1"
}

If you do not have that adaptive-lighting version, get the release using another method (wget in the ssh console, unzip to the correct location (or unzip to temp location, then copy the files to adaptive-lighting), and restart.

EDIT: check the home-assistant.log of course, and you can restart using the CLI (ha restart).

@home-assistant
Copy link

home-assistant bot commented Apr 7, 2023

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (recorder) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of recorder can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign recorder Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


recorder documentation
recorder source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented Apr 7, 2023

duplicate of #90887

You need to update adaptive lighting

@bdraco bdraco closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants