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

Live Log Issues Through Reverse Proxies #5509

Open
DanGarion opened this issue Dec 23, 2024 · 1 comment
Open

Live Log Issues Through Reverse Proxies #5509

DanGarion opened this issue Dec 23, 2024 · 1 comment
Labels

Comments

@DanGarion
Copy link

Describe the issue you are experiencing

I'm using a reverse proxy to access HA (SWAG). I use the basic config for nginx that they provide and have made no edits over the past year. After an update approximately 2 months ago (I think having to do with Live logs) I can only see live logs when I'm using my server IP or internal network URL. When I try to access the "live" logs for anything HA related (including Addons) I only see "Loading full log..."
image

One note: I can download the logs if I use the download icon, and I also have access to them if I install the Portainer add-on and review them from Portainer.

An additional note this happens in multiple browsers and on my multiple devices and the issue occurs when accessing logs through the HA Android App as well.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Access HA through a reverse proxy
  2. Go to System > Logs > Change to Supervisor
  3. Logs will NOT load and will eventually time out, displaying the following.
    image

If I access HA though a direct IP or internal network URL the live logs are accessible.
...

Anything in the Supervisor logs that might be useful for us?

2024-12-23 15:36:21.201 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-12-23 15:39:39.504 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/host.py", line 261, in advanced_logs_handler
    await response.prepare(request)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_response.py", line 453, in prepare
    return await self._start(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_response.py", line 461, in _start
    await self._write_headers()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_response.py", line 538, in _write_headers
    await writer.write_headers(status_line, self._headers)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 148, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 81, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 403, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 268, in advanced_logs_handler
    raise APIError(
supervisor.exceptions.APIError: Connection reset when trying to fetch data from systemd-journald.

System Health information

System Information

version core-2024.12.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.0
os_name Linux
os_version 6.6.66-haos
arch x86_64
timezone America/Los_Angeles
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.1
Stage running
Available Repositories 1559
Downloaded Repositories 27
Home Assistant Cloud
logged_in true
subscription_expiration August 23, 2025 at 5:00 PM
relayer_connected true
relayer_region us-east-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled true
cloud_ice_servers_enabled true
remote_server us-east-1-10.ui.nabu.casa
certificate_status ready
instance_id 8f8637b1554c48ba826c50b7c9d5f835
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.1
update_channel stable
supervisor_version supervisor-2024.12.0
agent_version 1.6.0
docker_version 27.2.0
disk_total 916.9 GB
disk_used 71.7 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons Matter Server (6.6.1), Mosquitto broker (6.4.1), ESPHome Device Builder (2024.12.2), Advanced SSH & Web Terminal (19.0.0), Studio Code Server (5.17.3), Plex Media Server (3.6.2), Portainer (2.25.1), Log Viewer (0.17.1), Govee to MQTT Bridge (2024.07.13-82ddc6e9), SQLite Web (4.3.0), Home Assistant Google Drive Backup (0.112.1), Music Assistant Server (beta) (2.4.0b8), Samba share (12.3.2), Z-Wave JS UI (3.18.0), Homebridge (0.1.8), Frigate Beta (0.15.0-beta4)
Dashboards
dashboards 7
resources 42
views 14
mode storage
Recorder
oldest_recorder_run December 11, 2024 at 6:23 PM
current_recorder_run December 23, 2024 at 1:41 PM
estimated_db_size 936.47 MiB
database_engine sqlite
database_version 3.45.3
Sonoff
version 3.8.1 (ffa7e22)
cloud_online 8 / 9
local_online 8 / 8
Spotify
api_endpoint_reachable ok
SpotifyPlus
integration_version v1.0.75
clients_configured 1: Daniel Schoonover (premium)
api_endpoint_reachable ok

Supervisor diagnostics

config_entry-hassio-01JDDQTE6MBNXC3KSBH487VZ35.json

Additional information

No response

@DanGarion DanGarion added the bug label Dec 23, 2024
@amordicus
Copy link

amordicus commented Dec 25, 2024

I have the same problem since 2024.12.0, and most likely related to live log. And very often I don't see the hidden menu (the 3 vertical dots) when in system->logs. When using companion, the logs are displayed, but the 3 dots (the menu to Show HAOS startups) are not.

Strangely, when in a browser while getting the dreadful "Loading full log..." the menu "Show HAOS startups" (the 3 dots) is accessible.

More info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@DanGarion @amordicus and others