sphqxe/NATS-WebUI

nats-webui Add Server always show Unreachable?

Opened this issue · 22 comments

lddlww commented

screenshot display:
image

telnet is ok

telnet 10.59.126.249 4222
Trying 10.59.126.249...
Connected to 10.59.126.249.
Escape character is '^]'.
INFO {"server_id":"NCFRVBR7PWL7CSW2JCOOVPX3A5AXX5HEK7WCABQTR4PPD45PE6VH45WR","server_name":"NCFRVBR7PWL7CSW2JCOOVPX3A5AXX5HEK7WCABQTR4PPD45PE6VH45WR","version":"2.8.4","proto":1,"git_commit":"66524ed","go":"go1.17.10","host":"0.0.0.0","port":4222,"headers":true,"tls_required":true,"max_payload":1048576,"client_id":57,"client_ip":"172.18.6.161"}

am i missing something?

I am also facing problem

same

asoorm commented

same here

same

Anyone knows the alternative, it's not working for me as well

same

Has anyone managed to crack this nut?

same (localhost, docker desktop)

same

same. But as the last commit is already 4 years old, I guess there won't be anything happening.

I've fixed some issues and produced a smallish alpine-based image.

To persist settings, mount a volume to /data. For example:

# https://github.com/thielj/NATS-WebUI/pkgs/container/nats-webui
mkdir ./nats-webui && chown 1000:1000
docker run --rm -p 8080:80 -v "${PWD}/nats-webui:/data" ghcr.io/thielj/nats-webui:latest

I've fixed some issues and produced a smallish alpine-based image.

404

I've fixed some issues and produced a smallish alpine-based image.

To persist settings, mount a volume to /data. For example:

# https://github.com/thielj/NATS-WebUI/pkgs/container/nats-webui
mkdir ./nats-webui && chown 1000:1000
docker run --rm -p 8080:80 -v "${PWD}/nats-webui:/data" ghcr.io/thielj/nats-webui:latest

it can not run with bind error, as follows:

thread 'main' panicked at 'error binding to 0.0.0.0:80: error creating server listener: Permission denied (os error 13)', /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7/src/libstd/macros.rs:16:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

screenshot display: image

telnet is ok

telnet 10.59.126.249 4222
Trying 10.59.126.249...
Connected to 10.59.126.249.
Escape character is '^]'.
INFO {"server_id":"NCFRVBR7PWL7CSW2JCOOVPX3A5AXX5HEK7WCABQTR4PPD45PE6VH45WR","server_name":"NCFRVBR7PWL7CSW2JCOOVPX3A5AXX5HEK7WCABQTR4PPD45PE6VH45WR","version":"2.8.4","proto":1,"git_commit":"66524ed","go":"go1.17.10","host":"0.0.0.0","port":4222,"headers":true,"tls_required":true,"max_payload":1048576,"client_id":57,"client_ip":"172.18.6.161"}

am i missing something?

same

I've fixed some issues and produced a smallish alpine-based image.

To persist settings, mount a volume to /data. For example:

# https://github.com/thielj/NATS-WebUI/pkgs/container/nats-webui
mkdir ./nats-webui && chown 1000:1000
docker run --rm -p 8080:80 -v "${PWD}/nats-webui:/data" ghcr.io/thielj/nats-webui:latest

it can not run with bind error, as follows:

thread 'main' panicked at 'error binding to 0.0.0.0:80: error creating server listener: Permission denied (os error 13)', /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7/src/libstd/macros.rs:16:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Have you actually used my version here?

https://github.com/thielj/NATS-WebUI/pkgs/container/nats-webui

The failed bind is probably an indication that something else is already listening on the port.

I use the version nats-webui:v0.1.2 with docker pull.
The port should not be occupied by something else because container networking is not host.
error as picture
1111

@zn-luo Do you have SELinux or something else in place that prevents container applications without root privileges to bind to ports lower than 1024?

@zn-luo Do you have SELinux or something else in place that prevents container applications without root privileges to bind to ports lower than 1024?

Maybe run cat /proc/sys/net/ipv4/ip_unprivileged_port_start inside the container.

unprivile

@zn-luo Do you have SELinux or something else in place that prevents container applications without root privileges to bind to ports lower than 1024?

Maybe run cat /proc/sys/net/ipv4/ip_unprivileged_port_start inside the container.

It can not run with --sysctl "net.ipv4.ip_unprivileged_port_start=1024",
show as picture.
nats-webui111

@zn-luo I'm afraid there are only two options here: (1) fix your setup so the container can bind to ports lower than 1024; or (2) change the app to bind to e.g. port 8080 instead - or use an environment variable to override the default.

See https://github.com/thielj/NATS-WebUI/blob/0d6e4b0c1b499aa6013c4b07eee0c7d94784660d/src/main.rs#L162

@zn-luo I'm afraid there are only two options here: (1) fix your setup so the container can bind to ports lower than 1024; or (2) change the app to bind to e.g. port 8080 instead - or use an environment variable to override the default.

See https://github.com/thielj/NATS-WebUI/blob/0d6e4b0c1b499aa6013c4b07eee0c7d94784660d/src/main.rs#L162

I can run up a container with ghcr.io/thielj/nats-webui:v0.1.2 in docker Version 27.3.1, but after adding a nat server ,the status is Unreachable