# Home Assistant service failing to start after update to 2024.8

**URL:** https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902
**Category:** Troubleshooting
**Tags:** services
**Created:** [8 August 2024 22:09 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902 "2024-08-08T22:09:50Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![michalowy](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/e79b87/32.png) [@michalowy](https://dietpi.com/forum/u/michalowy)
#### Post date: [8 August 2024 22:09 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/1 "2024-08-08T22:09:50Z")

</div>

### Creating a bug report/issue

I have searched the existing open and closed issues

#### Required Information

- DietPi version |
- G\_DIETPI\_VERSION\_CORE=9

G\_DIETPI\_VERSION\_SUB=6

G\_DIETPI\_VERSION\_RC=1

G\_GITBRANCH=‘master’

G\_GITOWNER=‘MichaIng’

- Distro version | bookworm 1
- Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
- Architecture | armhf
- SBC model | RPi 4 Model B (aarch64)
- Power supply used | 5V 1A
- SD card used | SanDisk ultra + SSD

#### Additional Information (if applicable)

Home Assistant

- Was the software title installed freshly or updated/migrated?  
Update to 2024.8
- Can this issue be replicated on a fresh installation of DietPi?  
Cannot test this at the moment.  
 ← If you sent a “dietpi-bugreport”, please paste the ID here → 
- Bug report ID | `echo $G_HW_UUID`

#### Steps to reproduce

1. Updated to (and tried to reinstall the entire setup with (dietpi-software reinstall 157):  
Requirement already satisfied: homeassistant in ./.pyenv/versions/3.12.3/lib/python3.12/site-packages (2024.8.0)
2. Homeassistant failing to start it’s service with the following errors:

```auto
File │ 
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/jwt/utils.py", line 7, in <module> │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.hazmat.primitives.asymmetric.ec import │ 
│ EllipticCurve │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: File │ 
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/e │ 
│ c.py", line 11, in <module> │
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.exceptions import UnsupportedAlgorithm, _Reasons │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: File │ 
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography/exceptions.py", line 9, in │ 
│ <module> │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.hazmat.bindings._rust import exceptions as │ 
│ rust_exceptions │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: ImportError: libssl.so.1.1: cannot open shared object file: No such │ 
│ file or directory │ 
│ Aug 08 23:42:20 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, status=1/FAILURE 

```

#### Expected behaviour

- Home Assistant service should be starting as usual

#### Actual behaviour

Homeassistant failing to start it’s service with the following errors:

```auto
File │
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/jwt/utils.py", line 7, in <module> │
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.hazmat.primitives.asymmetric.ec import │ 
│ EllipticCurve │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: File │ 
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/e │ 
│ c.py", line 11, in <module> │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.exceptions import UnsupportedAlgorithm, _Reasons │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: File │ 
│ "/home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography/exceptions.py", line 9, in │ 
│ <module> │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: from cryptography.hazmat.bindings._rust import exceptions as │ 
│ rust_exceptions │ 
│ Aug 08 23:42:20 DietPi Home Assistant[15374]: ImportError: libssl.so.1.1: cannot open shared object file: No such │ 
│ file or directory │ 
│ Aug 08 23:42:20 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, status=1/FAILURE 

```

#### Extra details

I’ve just recently migrated to bookworm so recent update of HA is rather unfortunate (just before todays update all was working fine). Would appreciate some pointers were to look / what to do. Reached a wall here.

Edit: I’ve migrated to bookworm through

```auto
bash <(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.meta/dietpi-bookworm-upgrade')

```

happy to take as a temporary solution downgrading to HA 2024.7 🙂

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [8 August 2024 22:47 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/2 "2024-08-08T22:47:54Z")

</div>

> [@michalowy](#):
>
> ```auto
> ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
> 
> ```

`libssl1.1` package is available on Debian Buster and Bullseye only. On Debian Bookworm package would be `libssl3`. Therefore, a software that requires `libssl1.1` is not able to run on Bookworm.

Did you already tried to reinstall HA? Maybe there is an old Python module from Bullseye that has not correctly updated.

```auto
dietpi-software reinstall 157

```

---

<div class="post-metadata">

### Author: ![michalowy](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/e79b87/32.png) [@michalowy](https://dietpi.com/forum/u/michalowy)
#### Post date: [9 August 2024 08:29 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/3 "2024-08-09T08:29:57Z")

</div>

Thanks for looking into it!

> [@Joulinar](#):
>
> Did you already tried to reinstall HA? Maybe there is an old Python module from Bullseye that has not correctly updated.

I did that twice already - with same effect. Is it possible to update that specific package standalone only? Was thinking about

```auto
sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh
pip3 install <module> # Or whichever install/update you need to do

```

Or is this package OS wide and not HA specific?

Edit: an idea - maybe we could create a link to call libssl3 whenever `libssl1.1` is required? How could I do that?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [11 August 2024 07:47 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/4 "2024-08-11T07:47:39Z")

</div>

> [@Joulinar](#):
>
> `dietpi-software reinstall 157`

can you share the entire log pls.

And did you restart your system before running the reinstall?

---

<div class="post-metadata">

### Author: ![michalowy](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/e79b87/32.png) [@michalowy](https://dietpi.com/forum/u/michalowy)
#### Post date: [11 August 2024 17:13 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/5 "2024-08-11T17:13:41Z")

</div>

I believe that I have fixed the issue, I’ve restored to my Bullseye backup and updated system again (with same result).

I’ve fixed the entire cryptography in pip by running the following:

```sh
root@DietPi:~# sudo -u homeassistant -H -s
homeassistant@DietPi:/root$ . /home/homeassistant/pyenv-activate.sh
homeassistant@DietPi:~$ pip uninstall cryptography
Found existing installation: cryptography 43.0.0
Uninstalling cryptography-43.0.0:
  Would remove:
    /home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography-43.0.0.dist-info/*
    /home/homeassistant/.pyenv/versions/3.12.3/lib/python3.12/site-packages/cryptography/*
Proceed (Y/n)? y
  Successfully uninstalled cryptography-43.0.0
homeassistant@DietPi:~$ pip install --no-binary :all: cryptography

```

Took some time rebuild everything but now have HA running without any errors.

> Cytat  
> can you share the entire log pls.

What exactly would you like to see, HA log?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [12 August 2024 09:47 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/6 "2024-08-12T09:47:14Z")

</div>

I don’t need any logs if you have solved the issue.

---

<div class="post-metadata">

### Author: ![innovodev](https://dietpi.com/forum/user_avatar/dietpi.com/innovodev/32/8910_2.png) [@innovodev](https://dietpi.com/forum/u/innovodev)
#### Post date: [12 August 2024 18:37 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/7 "2024-08-12T18:37:37Z")

</div>

I had this same thing happen to my Friendly Arm running the Neo Processor ArmV7. Interestingly enough it didn’t happen to my ArmV8 processor device. Seems that there is a module in Home Assistant that was introduced (or reverted) that needs libssl.so.1.1. Debian 12 comes libssl.so.3. The way I fixed this is by putting two files “libcrypto.so.1.1” & “libssl.so.1.1” into “/usr/lib/arm-linux-gnueabihf”. Of course make sure that these files are built for your architecture and use the right path for it. Then restart HA. issue solved.

Just sharing in case anyone has an issue with a different disdribution.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [12 August 2024 19:14 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/8 "2024-08-12T19:14:51Z")

</div>

That’s not really a solution to put old depreciated files back in place. Better to reinstall `cryptography` like @michalowy did.

---

<div class="post-metadata">

### Author: ![innovodev](https://dietpi.com/forum/user_avatar/dietpi.com/innovodev/32/8910_2.png) [@innovodev](https://dietpi.com/forum/u/innovodev)
#### Post date: [12 August 2024 20:50 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/9 "2024-08-12T20:50:07Z")

</div>

I agree, but for some reason, my build didn’t fix the issue. Only adding those files. The files were from a back up of the same system.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [12 August 2024 22:32 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/10 "2024-08-12T22:32:36Z")

</div>

maybe in your case it was another module and not `cryptography`

---

<div class="post-metadata">

### Author: ![innovodev](https://dietpi.com/forum/user_avatar/dietpi.com/innovodev/32/8910_2.png) [@innovodev](https://dietpi.com/forum/u/innovodev)
#### Post date: [13 August 2024 02:50 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/11 "2024-08-13T02:50:09Z")

</div>

I stand corrected. I thought it had fixed the problem. It did fix Home Assistant not starting, but now my Apple TV integration is not starting. I following the build instructions and it built successfully this time. But now I am getting this error. I understand you’ll probably need alot more context, but just wondering if there different flags that I would need to build cryptography. I will also ask on Home Assistant forums.

```auto
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.12/site-packages/pyatv/support/chacha20.py", line 4, in <module>
Aug 12 21:45:12 MagicCube Home Assistant[19919]: from chacha20poly1305_reuseable import ChaCha20Poly1305Reusable as ChaCha20Poly1305
Aug 12 21:45:12 MagicCube Home Assistant[19919]: File "src/chacha20poly1305_reuseable/ __init__.py", line 21, in init chacha20poly1305_reuseable
Aug 12 21:45:12 MagicCube Home Assistant[19919]: AttributeError: module 'lib' has no attribute 'EVP_CIPHER_CTX_ctrl'

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [13 August 2024 07:56 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/12 "2024-08-13T07:56:56Z")

</div>

> [@innovodev](#):
>
> but just wondering if there different flags that I would need to build cryptography.

The Apple TV issue has nothing to do with `cryptography`. It seems to be a challenge of this particular module.

And yes, way more information from the build log is required. Always good to share the entire output and not just small parts.

---

<div class="post-metadata">

### Author: ![innovodev](https://dietpi.com/forum/user_avatar/dietpi.com/innovodev/32/8910_2.png) [@innovodev](https://dietpi.com/forum/u/innovodev)
#### Post date: [13 August 2024 18:51 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/13 "2024-08-13T18:51:21Z")

</div>

There is an issue that is documented here and apparently there is a fix, but it seems that it hasn’t made it into HA yet. But the solution works if you update pyatv manually.

> <https://github.com/postlund/pyatv/issues/2451#issuecomment-2247961031>
>
> \### Describe the bug
> 
> 你好，感谢开发付出！
> 我使用macbook pro m1芯片笔记本，用pyenv安装的3.11.9版本的pytho…n，运行atvremote wizard出现以下错误，我查了很多资料，不知道为什么。难道是因为芯片不兼容吗？还是其他什么问题，我重新安装了openssl，还有cryptography，没有什么用，一直报错。求助，感谢！
> 
> \### Error log
> 
> 
> 
> \-\> % atvremote wizard
> Traceback (most recent call last):
> File "/Users/Usermax/.pyenv/versions/3.12.4/bin/atvremote", line 5, in \<module\>
> from pyatv.scripts.atvremote import main
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/\_\_init\_\_.py", line 26, in \<module\>
> from pyatv.protocols import PROTOCOLS
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/protocols/\_\_init\_\_.py", line 10, in \<module\>
> from pyatv.protocols import airplay as airplay\_proto
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/protocols/airplay/\_\_init\_\_.py", line 28, in \<module\>
> from pyatv.protocols import mrp
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/protocols/mrp/\_\_init\_\_.py", line 14, in \<module\>
> from pyatv.auth.hap\_srp import SRPAuthHandler
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/auth/hap\_srp.py", line 27, in \<module\>
> from pyatv.support import chacha20, log\_binary, opack
> File "/Users/Usermax/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pyatv/support/chacha20.py", line 4, in \<module\>
> from chacha20poly1305\_reuseable import ChaCha20Poly1305Reusable as ChaCha20Poly1305
> File "src/chacha20poly1305\_reuseable/\_\_init\_\_.py", line 21, in init chacha20poly1305\_reuseable
> AttributeError: module 'lib' has no attribute 'EVP\_CIPHER\_CTX\_ctrl'
> 
> \### How to reproduce the bug?
> 
> 这是占位文字。
> 
> \### What is expected behavior?
> 
> 这是占位文字。
> 
> \### Operating System
> 
> macos
> 
> \### Python
> 
> 3.11
> 
> \### pyatv
> 
> 0.14.5
> 
> \### Device
> 
> home pod mini
> 
> \### Additional context
> 
> 这是占位文字。

---

<div class="post-metadata">

### Author: ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)
#### Post date: [11 November 2024 18:51 UTC](https://dietpi.com/forum/t/home-assistant-service-failing-to-start-after-update-to-2024-8/20902/14 "2024-11-11T18:51:39Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
