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

Add new dependency "libjpeg-dev" for HA #3781

Merged
merged 2 commits into from
Sep 19, 2020
Merged

Add new dependency "libjpeg-dev" for HA #3781

merged 2 commits into from
Sep 19, 2020

Conversation

Joulinar
Copy link
Collaborator

@Joulinar Joulinar commented Sep 19, 2020

There is a new dependency libjpeg-dev needed for HA. Otherwise HA will not start correctly and you will get a HTTP 404 error.

Status: Ready

  • Add libjpeg-dev to HA apt dependency list

Reference: https://dietpi.com/forum/t/home-assistant-404-error/4471

Commit list/description:

  • DietPi-Software | Adding libjpeg-dev as APT dependency for Home Assistant

There is a new dependency needed for HA
@MichaIng MichaIng added this to the v6.33 milestone Sep 19, 2020
@MichaIng
Copy link
Owner

MichaIng commented Sep 19, 2020

Ah wait, reading through the original report, probably the service restart alone would have solved the issue already. It is a known strange bug of HA, at least in our pyenv environment, that the first service start breaks on installing the web UI modules but a restart allows it to proceed and solves the issue. Let me test.


First service start still fails:

Sep 19 16:16:19 VM-Buster homeassistant[27927]: 2020-09-19 16:16:19 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Unable to import component: No module named 'sqlalchemy'
Sep 19 16:16:22 VM-Buster homeassistant[27927]: 2020-09-19 16:16:22 ERROR (MainThread) [homeassistant.setup] Error during setup of component http

I still have no idea how this can be as sqlalchemy is available pretty fine. There must be something messed up with the Python environment during initial startup which includes a bunch of setup and module installs. Now systemctl restart home-assistant...
... no error message in logs anymore, web UI is accessible just fine.

@Joulinar
Copy link
Collaborator Author

Joulinar commented Sep 19, 2020

I did followed the restart as described on our docs. This bring me to the 404 page.

Let me try to reproduce.

@MichaIng
Copy link
Owner

MichaIng commented Sep 19, 2020

It is important to wait until the the service "finished" (0% CPU usage) before doing the restart and before attempting to access the web UI.

I just recognised that due to some other tests there was libjpeg62-turbo installed, however not the dev package. However, even after purging it, HA still starts fine including web UI.


But this was on x86_64, to be sure we could test on RPi/ARM.

@Joulinar
Copy link
Collaborator Author

give me some minutes, just doing another test on RPi3B+. And yes, I was waiting for all processes to come down to zero as described on the docs 😉

@Joulinar
Copy link
Collaborator Author

Joulinar commented Sep 19, 2020

@MichaIng
ok thats what I did on my RPi3B+

  • dietpi-software install HA
  • wait until installation finished
  • reboot
  • wait until all HA processes finished
  • HA not reachable at all ❌
  • systemctl restart home-assistant.service
  • wait until all HA processes finished
  • HA failing: 404: Not Found
  • 3 times I tried this procedure: restart, wait, check
  • apt install libjpeg62-turbo
  • systemctl restart home-assistant.service
  • wait until all HA processes finished
  • HA failing: 404: Not Found
  • apt install libjpeg-dev
  • systemctl restart home-assistant.service
  • quite long run time for HA processes to finish
  • HA fixed ✔️

@MichaIng
Copy link
Owner

Sep 19 21:05:01 Building-ARMv6-Buster homeassistant[15644]:     File "/tmp/pip-install-qxlpfesl/pillow/setup.py", line 864, in <module>
Sep 19 21:05:01 Building-ARMv6-Buster homeassistant[15644]:   __main__.RequiredDependencyException: jpeg

For compiling Pillow, required on ARM.

+ DietPi-Software | Home Assistant: Add libjpeg-dev as dependency on ARM, required for compiling Pillow Python module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants