Błąd 502: Bad Gateway

Witam
Dzisiaj postawiłem poraz pierwszy HA na dell wyse na debian. Mam problem z Node Red. Czysta instalacja nic nie wrzucone jeszcze, dodałem node reda i jest błąd błąd 502: Bad Gateway. Czy ktoś miał może coś takiego. Jeszcze zadany integracji nic nie robiłem.

credential_secret: ‘’
dark_mode: false
http_node:
username: ‘’
password: ‘’
http_static:
username: ‘’
password: ‘’
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: false
system_packages: []
npm_packages: []
init_commands: []

s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

Add-on: Node-RED
Flow-based programming for the Internet of Things

Add-on version: 7.2.11
You are running the latest version of this add-on.
System: Debian GNU/Linux 10 (buster) (amd64 / qemux86-64)
Home Assistant Core: 2020.12.2
Home Assistant Supervisor: 2020.12.7

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing…
[15:16:54] FATAL:
[15:16:54] FATAL: Configuration of this add-on is incomplete.
[15:16:54] FATAL:
[15:16:54] FATAL: Please be sure to set the “credential_secret” option.
[15:16:54] FATAL:
[15:16:54] FATAL: The credential secret is an encryption token, much like
[15:16:54] FATAL: a password, that is used by Node-RED for encrypting
[15:16:54] FATAL: credentials you put into Node-RED.
[15:16:54] FATAL:
[15:16:54] FATAL: Just like a password, a credential secret can be
[15:16:54] FATAL: anything you like. Just be sure to store it somewhere
[15:16:54] FATAL: safe for later, e.g., in case of a recovery.
[15:16:54] FATAL:
[cont-init.d] node-red.sh: exited 1.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
Be sure to check the log above, line by line, for hints.

[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Przecież wszystko jest w logach, wystarczy przeczytać, w razie problemów skorzystaj z Google Translatora, zacznij od rozwiązania tego:

Configuration of this add-on is incomplete
Please be sure to set the “credential_secret” option

Taki wpis jak poniżej:

[cont-init.d] node-red.sh: exited 1.

oznacza, że skrypt node-red.sh wykonał się ale z błędem (uruchomił i zakończył się ale z błędem), kod wynikowy to 1 czyli:

Exit code 1        General errors, Miscellaneous errors, such as "divide by zero" and other impermissible operations

Jak widać pozostałe skrypty 00-banner.sh, nginx.sh, itd zakończyły się poprawnie, kod wyjścia 0 czyli:

Exit code 0        Success

Pomagam w rozwiązywaniu problemów ucząc jak je później rozwiązywać samemu :slight_smile:

Ustawiłem hasło błąd jest dalej

Pokaż logi, wtedy bedę pewny, że ustawiłeś hasło.

Oki dzięki wielkie udało się :slight_smile: dziękuję za pomoc dopiero zaczynam zabawę dzisiaj sprzęt przyszedł pierwsze instalacja i wogule

Proszę bardzo :slight_smile:, na przyszłość pamiętaj: zanim napiszesz sprawdź logi, jak sobie nie poradzisz opisz dokładnie problem i dołącz logi, szybciej będzie Ci można pomóć.

P.S. Odpowiedziałem tylko dlatego, że dodałeś logi bo wtedy wiadomo gdzie jest problem :wink:

Tak rozumiem na początku duzo tego sprzęt,Linux HA obsługa logi

Uczymy się całe życie.

Dokładnie jeszcze raz wielkie dzięki

Dokładnie uczymy się cały czas.
U mnie ruszyło dopiero jak ustawiłem dowolne hasło w pierwszym wierszu, i zmianie ssl: (true ,na false).

Cytat

credential_secret: xxxxxx
dark_mode: true
http_node:
username: ‘’
password: ‘’
http_static:
username: ‘’
password: ‘’
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: true
system_packages: []
npm_packages: []
init_commands: []

Cytat

Przesiadam się z Nettempa i dla mnie trochę nie logiczne są ustawienia w HASS

Podepnę się pod temat. Jak w temacie co bym nie zrobił mam odpowiedź: 502: Bad Gateway.

W logu raczej błędów nie widzę choć ostatnie dwie linijki mnie zastanawiają:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
Add-on: Node-RED
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 10.0.0
You are running the latest version of this add-on.
System: Debian GNU/Linux 10 (buster)  (amd64 / qemux86-64)
Home Assistant Core: 2021.8.6
Home Assistant Supervisor: 2021.06.8
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] customizations.sh: executing... 
[cont-init.d] customizations.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
patching file nodes/ui_base.html
Hunk #1 succeeded at 1162 (offset 631 lines).
up to date, audited 1 package in 2s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:44:17] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
14 Aug 22:44:23 - [info] 
Welcome to Node-RED
===================
14 Aug 22:44:23 - [info] Node-RED version: v2.0.5
14 Aug 22:44:23 - [info] Node.js  version: v14.17.4
14 Aug 22:44:23 - [info] Linux 4.19.0-17-amd64 x64 LE
14 Aug 22:44:25 - [info] Loading palette nodes
14 Aug 22:44:33 - [info] Dashboard version 2.30.0 started at /endpoint/ui
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
14 Aug 22:44:34 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
14 Aug 22:44:34 - [info] Settings file  : /etc/node-red/config.js
14 Aug 22:44:34 - [info] Context store  : 'default' [module=memory]
14 Aug 22:44:34 - [info] User directory : /config/node-red/
14 Aug 22:44:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Aug 22:44:34 - [info] Flows file     : /config/node-red/flows.json
14 Aug 22:44:35 - [info] Server now running at http://127.0.0.1:46836/
14 Aug 22:44:35 - [info] Starting flows
14 Aug 22:44:35 - [info] Started flows
[22:44:35] INFO: Starting NGinx...
14 Aug 22:44:40 - [info] [server:Home Assistant] Connecting to undefined
14 Aug 22:44:40 - [info] [server:Home Assistant] Connected to undefined

Natomiast konfiguracja:

credential_secret: ************
theme: default
http_node:
  username: xyz
  password: xyz
http_static:
  username: xyz1
  password: xyz1
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
system_packages: []
npm_packages: []
init_commands: []
require_ssl: true

Nie znam się na tym ale zastanawiam się nad poprawną konfiguracją

ssl: false
.
.
require_ssl: true

Ja mam taką konfigurację

credential_secret: xxxxxxxxxxx
theme: default
http_node:
  username: ''
  password: ''
http_static:
  username: ''
  password: ''
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
system_packages: []
npm_packages: []
init_commands: []
require_ssl: true

Ten parametr nie jest już obsługiwany.

DJS
theme: default
http_node:
username: ‘’
password: ‘’
http_static:
username: ‘’
password: ‘’
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
system_packages: []
npm_packages: []
init_commands: []
log_level: info

Node-RED version: v2.0.5 po aktualizacji do tej wersji w mojej konfiguracji NR totalnie padł, wszystko uruchamiało się bez błędów ale dashboard totalnie martwy, brak jakichkolwiek zmian wyswietlanych w nodach. Nr uruchamiany z paska HA, natomiast uruchomienie NR z adresu 192...68:1880 ożywiało dashboard ale wciąż wysokie użycie procka na poziomie 27%. Wróciłem do poprzedniej wersji NR i wszystko działa normalnie. Wygląda mi to na problemy z komunikacją między HA a NR

Tak wygląda mój start NR

Add-on version: 10.0.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 10 (buster)  (amd64 / qemux86-64)
 Home Assistant Core: 2021.8.7
 Home Assistant Supervisor: 2021.06.8
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] customizations.sh: executing... 
[cont-init.d] customizations.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
patching file nodes/ui_base.html
Hunk #1 succeeded at 1162 (offset 631 lines).
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[13:46:20] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
16 Aug 13:46:24 - [info] 
Welcome to Node-RED
===================
16 Aug 13:46:24 - [info] Node-RED version: v2.0.5
16 Aug 13:46:24 - [info] Node.js  version: v14.17.4
16 Aug 13:46:24 - [info] Linux 4.19.0-17-amd64 x64 LE
16 Aug 13:46:25 - [info] Loading palette nodes
BAIL ON node-red-contrib-fcm-receive-node/fcm-receive
16 Aug 13:46:40 - [info] mDashboard version 2.19.4-beta started at /endpoint/mui
16 Aug 13:46:47 - [info] Dashboard version 2.30.0 started at /endpoint/ui
BAIL ON node-red-node-ui-table/ui_table
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
16 Aug 13:46:49 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
BAIL ON node-red-node-twitter/twitter
16 Aug 13:46:50 - [warn] ------------------------------------------------------
16 Aug 13:46:50 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
16 Aug 13:46:50 - [warn] [node-red-contrib-flogger-now/flogger] 'flogger' already registered by module node-red-contrib-flogger
16 Aug 13:46:50 - [warn] ------------------------------------------------------
16 Aug 13:46:50 - [info] Settings file  : /etc/node-red/config.js
16 Aug 13:46:50 - [info] Context store  : 'default' [module=memory]
16 Aug 13:46:50 - [info] User directory : /config/node-red/
16 Aug 13:46:50 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Aug 13:46:50 - [info] Flows file     : /config/node-red/flows.json
16 Aug 13:46:50 - [info] Server now running at http://127.0.0.1:46836/
[13:46:50] INFO: Starting NGinx...
16 Aug 13:51:56 - [info] Starting flows
fileServer listening on ip 192.168.1.69 and port 8089

Jeżeli NR masz na słabszym sprzęcie to poczekaj dłuższa chwile na załadowanie NR

Panowie pomożecie ? Nie daje sobie z tym rady. Jestem początkujacy. HA postawiony na Rpi4

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] customizations.sh: executing... 
[cont-init.d] customizations.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[20:11:49] FATAL: 
[20:11:49] FATAL: SSL has been enabled using the 'ssl' option,
[20:11:49] FATAL: this requires a SSL certificate file which is
[20:11:49] FATAL: configured using the 'certfile' option in the
[20:11:49] FATAL: add-on configuration.
[20:11:49] FATAL: 
[20:11:49] FATAL: Unfortunately, the file specified in the
[20:11:49] FATAL: 'certfile' option does not exists.
[20:11:49] FATAL: 
[20:11:49] FATAL: Please ensure the certificate file exists and
[20:11:49] FATAL: is placed in the '/ssl/' directory.
[20:11:49] FATAL: 
[20:11:49] FATAL: In case you don't have SSL yet, consider getting
[20:11:49] FATAL: a SSL certificate or setting the 'ssl' option
[20:11:49] FATAL: to 'false' in case you are not planning on using
[20:11:49] FATAL: SSL with this add-on.
[20:11:49] FATAL: 
[20:11:49] FATAL: Check the add-on manual for more information.
[20:11:49] FATAL: 
[cont-init.d] nginx.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Wyłącz SSL

ssl: false
require_ssl: false