400 error on fresh install when trying to onboard first user

I follow this guide to install homeassistant on my centos server with http and a reverse proxy. Here is my http config

<VirtualHost *:80>
  ServerName hass.twil.cx
  RewriteEngine on
  RewriteCond %{SERVER_NAME} =hass.twil.cx
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
  ServerName hass.twil.cx
  ProxyPass / http://localhost:8123/ connectiontimeout=5 timeout=30
  ProxyPreserveHost on
SSLCertificateFile /etc/letsencrypt/live/hass.twil.cx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/hass.twil.cx/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

And my configuration.yaml. This does by the way pass the “check configuration” script

 # Configure a default setup of Home Assistant (frontend, api, etc)
 default_config:

 # Text to speech
 tts:
   - platform: google_translate

 group: !include groups.yaml
 automation: !include automations.yaml
 script: !include scripts.yaml
 scene: !include scenes.yaml

 http:
   use_x_forwarded_for: true
   trusted_proxies:
     - ::1

Here is my log output as soon as hass is started:

2021-06-23 11:05:19 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connection

I can pull up the site and go through the onboard process. Once I hit submit Chrome says “Oopsie we did a boo boo” or whatever and this is what shows in the web console

onboarding.59a126ca.js:9352 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'.
55704 @ onboarding.59a126ca.js:9352
onboarding.59a126ca.js:29780 WebSocket connection to 'wss://hass.twil.cx/api/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400
a @ onboarding.59a126ca.js:29780
(anonymous) @ onboarding.59a126ca.js:29780
o @ onboarding.59a126ca.js:29780
t.auth @ onboarding.59a126ca.js:36395
value @ onboarding.59a126ca.js:36395
value @ onboarding.59a126ca.js:36395

What else can I check other than this?

1 Like