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

NGINX log errors: Connection refused but only after HA reboot #3434

Closed
lollo78 opened this issue Jan 24, 2024 · 1 comment
Closed

NGINX log errors: Connection refused but only after HA reboot #3434

lollo78 opened this issue Jan 24, 2024 · 1 comment
Labels

Comments

@lollo78
Copy link

lollo78 commented Jan 24, 2024

Describe the issue you are experiencing

Hi guys,
the NGINX official addon report still show me a lot of errors about GET request /api/websocket HTTP/1.1:

2024/01/24 22:31:02 [error] 152#152: *43 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.1, server: my.duckdns.org, request: "GET /api/websocket HTTP/1.1", upstream: "https://192.168.1.25:8123/api/websocket", host: "my.duckdns.org"

My configuration.yaml:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24
    - 172.30.232.0/23
    - 192.168.1.0/24

My nginx config:

location /api {
    proxy_pass https://192.168.1.25:8123;
    proxy_set_header Host $host;
    proxy_redirect https:// https://;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

location /api/websocket {
    proxy_pass https://192.168.1.25:8123/api/websocket;
    proxy_set_header Host $host;
    proxy_redirect https:// https://;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

location /api/webhook {
    proxy_pass https://192.168.1.25:8123/api/webhook;
    proxy_method POST;
    proxy_set_header Host $host;
    proxy_redirect https:// https://;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

The strange beaviour is this: if I reboot only the addon no errors are shown; if I restart HA the errors appers.
Also, in the TasmoAdmin addon report, which tell me about nginix startup status, it never show these errors (even if I restart HA).

Thanks a lot

Home Assistant
Core 2024.1.5
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0
NGINX Home Assistant SSL proxy 3.7.0

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

NGINX Home Assistant SSL proxy

What is the version of the add-on?

3.7.0

Steps to reproduce the issue

  1. Install Nginx
  2. reboot HA
  3. Install TasmoAdmin and compare report
    ...

System Health information

Versione | core-2024.1.5 -- | -- Tipo di installazione | Home Assistant OS Sviluppo | false Supervisor | true Docker | true Utente | root Ambiente virtuale | false Versione Python | 3.11.6 Famiglia del Sistema Operativo | Linux Versione del Sistema Operativo | 6.1.63-haos-raspi Architettura della CPU | armv7l Fuso orario | Europe/Rome Cartella di configurazione | /config

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

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

No response

@lollo78 lollo78 changed the title NGINX (111: Connection refused) while connecting to upstream NGINX log errors: Connection refused but only after HA reboot Jan 28, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 27, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
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

1 participant