hassio-zigbee2mqtt icon indicating copy to clipboard operation
hassio-zigbee2mqtt copied to clipboard

Zigbee2MQTT proxy has problems to connect to zigbee2mqtt serice running on ither IP

Open jbrepogmailcom opened this issue 11 months ago • 1 comments

Description of the issue

I run Home Assistant as virtual machine. It has its own OS and runs components in dockers. Then I run zigbee2mqtt service on host computer, it means it has different IP, 10.0.0.52 and different subnet. When I start zigbee2mqtt proxy in Home assistant, it shows the template and displays only 4 devices. If I start web ui of zigbee2mqtt in separate browser tab by going to 10.0.0.52 without home assistant, it displays all devices correctly. The issues seems to be happening after recent updates of HA or HA OS, probably after 2024.12.3 and OS 14. Log is attached

Addon version

core-2024.12.3, addon 0.2.0

Platform

HassOS 14

Logs of the issue (if applicable)

2024/12/16 23:44:02 [error] 12#12: *86 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: _, request: "GET /api HTTP/1.1", upstream: "http://10.0.0.52:8080/api?&token=", host: "95.85.255.198:8123" nginx: the configuration file /tmp/nginx.conf syntax is ok nginx: configuration file /tmp/nginx.conf test is successful

configuration file /tmp/nginx.conf:

Run nginx in foreground.

daemon off;

This is run inside Docker.

user nginx;

Pid storage location.

pid /var/run/nginx.pid;

Set number of worker processes.

worker_processes 1;

Enables the use of JIT for regular expressions to speed-up their processing.

pcre_jit on;

Write error log to the add-on log.

error_log /proc/1/fd/1 error;

Max num of simultaneous connections by a worker process.

events { worker_connections 512; } http { access_log off; client_max_body_size 4G; default_type application/octet-stream; keepalive_timeout 65; sendfile off; server_tokens off; tcp_nodelay on; tcp_nopush on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } resolver 127.0.0.11 ipv6=off; server { listen 8099 default_server; root /dev/null; server_name _; location / { allow 172.30.32.2; deny all; set $target "http://10.0.0.52:8080"; set $token ""; set $args $args&token=$token; proxy_pass $target; proxy_http_version 1.1; proxy_ignore_client_abort off; proxy_read_timeout 86400s; proxy_redirect off; proxy_send_timeout 86400s; proxy_max_temp_file_size 0; proxy_set_header Accept-Encoding ""; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Real-IP $remote_addr; } } } nginx: the configuration file /tmp/nginx.conf syntax is ok nginx: configuration file /tmp/nginx.conf test is successful

configuration file /tmp/nginx.conf:

Run nginx in foreground.

daemon off;

This is run inside Docker.

user nginx;

Pid storage location.

pid /var/run/nginx.pid;

Set number of worker processes.

worker_processes 1;

Enables the use of JIT for regular expressions to speed-up their processing.

events { worker_connections 512; } http { access_log off; client_max_body_size 4G; default_type application/octet-stream; keepalive_timeout 65; sendfile off; server_tokens off; tcp_nodelay on; tcp_nopush on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } resolver 127.0.0.11 ipv6=off; server { listen 8099 default_server; root /dev/null; server_name _; location / { allow 172.30.32.2; deny all; set $target "http://10.0.0.52:8080"; set $token ""; set $args $args&token=$token; proxy_pass $target; proxy_http_version 1.1; proxy_ignore_client_abort off; proxy_read_timeout 86400s; proxy_redirect off; proxy_send_timeout 86400s; proxy_max_temp_file_size 0; proxy_set_header Accept-Encoding ""; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Real-IP $remote_addr; } } } nginx: the configuration file /tmp/nginx.conf syntax is ok nginx: configuration file /tmp/nginx.conf test is successful

configuration file /tmp/nginx.conf:

Run nginx in foreground.

daemon off;

This is run inside Docker.

user nginx;

Pid storage location.

pid /var/run/nginx.pid;

Set number of worker processes.

worker_processes 1;

Enables the use of JIT for regular expressions to speed-up their processing.

pcre_jit on;

Write error log to the add-on log.

error_log /proc/1/fd/1 error;

Max num of simultaneous connections by a worker process.

events { worker_connections 512; } http { access_log off; client_max_body_size 4G; default_type application/octet-stream; keepalive_timeout 65; sendfile off; server_tokens off; tcp_nodelay on; tcp_nopush on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } resolver 127.0.0.11 ipv6=off; server { listen 8099 default_server; root /dev/null; server_name _; location / { allow 172.30.32.2; deny all; set $target "http://10.0.0.52:8080"; set $token ""; set $args $args&token=$token; proxy_pass $target; proxy_http_version 1.1; proxy_ignore_client_abort off; proxy_read_timeout 86400s; proxy_redirect off; proxy_send_timeout 86400s; proxy_max_temp_file_size 0; proxy_set_header Accept-Encoding ""; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Real-IP $remote_addr; } } } nginx: the configuration file /tmp/nginx.conf syntax is ok nginx: configuration file /tmp/nginx.conf test is successful

configuration file /tmp/nginx.conf:

Run nginx in foreground.

daemon off;

This is run inside Docker.

user nginx;

Pid storage location.

pid /var/run/nginx.pid;

Set number of worker processes.

worker_processes 1;

Enables the use of JIT for regular expressions to speed-up their processing.

pcre_jit on;

Write error log to the add-on log.

error_log /proc/1/fd/1 error;

Max num of simultaneous connections by a worker process.

events { worker_connections 512; } http { access_log off; client_max_body_size 4G; default_type application/octet-stream; keepalive_timeout 65; sendfile off; server_tokens off; tcp_nodelay on; tcp_nopush on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } resolver 127.0.0.11 ipv6=off; server { listen 8099 default_server; root /dev/null; server_name _; location / { allow 172.30.32.2; deny all; set $target "http://10.0.0.52:8080"; set $token ""; set $args $args&token=$token; proxy_pass $target; proxy_http_version 1.1; proxy_ignore_client_abort off; proxy_read_timeout 86400s; proxy_redirect off; proxy_send_timeout 86400s; proxy_max_temp_file_size 0; proxy_set_header Accept-Encoding ""; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Real-IP $remote_addr; } } } nginx: the configuration file /tmp/nginx.conf syntax is ok

configuration file /tmp/nginx.conf:

nginx: configuration file /tmp/nginx.conf test is successful

Run nginx in foreground.

daemon off;

This is run inside Docker.

user nginx;

Pid storage location.

pid /var/run/nginx.pid;

Set number of worker processes.

worker_processes 1;

Enables the use of JIT for regular expressions to speed-up their processing.

pcre_jit on;

Write error log to the add-on log.

error_log /proc/1/fd/1 error;

Max num of simultaneous connections by a worker process.

events { worker_connections 512; } http { access_log off; client_max_body_size 4G; default_type application/octet-stream; keepalive_timeout 65; sendfile off; server_tokens off; tcp_nodelay on; tcp_nopush on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } resolver 127.0.0.11 ipv6=off; server { listen 8099 default_server; root /dev/null; server_name _; location / { allow 172.30.32.2; deny all; set $target "http://10.0.0.52:8080"; set $token ""; set $args $args&token=$token; proxy_pass $target; proxy_http_version 1.1; proxy_ignore_client_abort off; proxy_read_timeout 86400s; proxy_redirect off; proxy_send_timeout 86400s; proxy_max_temp_file_size 0; proxy_set_header Accept-Encoding ""; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Real-IP $remote_addr; } } }

jbrepogmailcom avatar Dec 16 '24 23:12 jbrepogmailcom

Don‘t know nothing about zigbee2mqtt „proxy“ but why don‘t you connect HA and Z2M via MQTT?

m0wlheld avatar Jan 05 '25 14:01 m0wlheld

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Feb 05 '25 00:02 github-actions[bot]