
nomad를 통해 docker 컨테이너에서 실행 중인 내 웹 사이트에 액세스할 수 없는 이유나 내가 뭘 잘못하고 있는지 설명할 수 있나요? 저는 시스템과 네트워킹의 초보자입니다.
nginx가 프록시할 수 있도록 컨테이너 http가 127.0.0.1:8088을 수신하도록 만들고 싶습니다.
Nomad 서버와 클라이언트가 동일한 시스템에서 실행 중입니다.
시스템은 fedora이고 SELinux는 비활성화되어 있으며 방화벽은 비활성화되어 있습니다.
내가 기대하는 것: <server_ip>:8088에 대한 요청은 웹사이트에 응답합니다.
내가 얻는 것 : 응답은 연결이 거부되었습니다.
유목민 conf :
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "DEBUG"
server {
# license_path is required for Nomad Enterprise as of Nomad v1.1.1+
#license_path = "/etc/nomad.d/license.hclic"
enabled = true
bootstrap_expect = 1
}
acl {
enabled = true
}
client {
enabled = true
servers = ["127.0.0.1"]
}
유목민 직업 :
job "ctprods-app" {
datacenters = ["*"]
group "ctprods-group" {
count = 1
network {
port "http" {
static = 8088
to = 8088
}
}
task "ctprods-task" {
driver = "docker"
env {
ENVIRONMENT = "production"
}
config {
image = "ctaque/ctprods:latest"
ports = [
"http"
]
}
}
}
}
nginx 블록 :
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8088/;
}
ss -nplut :
tcp LISTEN 0 4096 <server_public_ip>:8088 0.0.0.0:*