Closed wujian0327 closed 4 months ago
Thanks for bringing up this issue. Few questions to get a better understanding of the scenario:
Thanks for bringing up this issue. Few questions to get a better understanding of the scenario:
- Issue is observed only when Hub is behind a reverse proxy (Nginx in this case)?
- Attempting to connect an agent to this hub causes huge memory consumption on hub? what behavior of agent is observed? i.e. do you observe similar high RAM consumption behavior on agent as well?
- Are you able to get the agent connected to hub successfully?
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location ~ /agent/ {
proxy_pass http://127.0.0.1:7777;
}
location ~ /relay/ {
proxy_pass http://127.0.0.1:8001;
}
location ~ /proxy/ {
proxy_pass http://127.0.0.1:8887;
}
location ~/hub/ {
proxy_pass http://127.0.0.1:8888;
}
}
}
I think it's the agent that's taking up too much resources, not the hub. Here are some logs from agent:
The agent failed to connect to the hub.
I found that it was normal to go through http://34.84.172.121:8888, but it was not successful to go through http://34.84.172.121/hub/
you can try this permit file
Thanks for the clarification. Please note that:
bootstrap
address should be a pure L4 address (i.e. IP[:PORT})Thank you for your instructions, I will use the hub as suggested.
ztm version: v0.0.4
os:
step:
sudo ./ztm start ca
sudo ./ztm start hub
./ztm invite root --bootstrap http://34.84.172.121/hub/ > permit.json (http://34.84.172.121/hub/ is nginx reverse proxy to hub)
sudo ./ztm start agent
open the agent website and join the hub
Wait five minutes, the server's memory will be used up and cause a crash