ML-TANGO / TANGO

public repo for TANGO (Target Aware No-code neural network Generation and Operation framework)
Other
68 stars 20 forks source link

NGINX(혹은 django)가 언더스코어를 포함한 호스트네임(`autonn_resnet`)을 가진 컨테이너와의 통신을 거부합니다. #79

Closed soma0sd closed 11 months ago

soma0sd commented 12 months ago

상태요청시 아래의 로그가 발생합니다.

Invalid HTTP_HOST header: 'autonn_resnet:8092'. The domain name provided is not valid according to RFC 1034/1035.

이후 응답코드 400를 돌려받습니다.

autonn/ResNet/backend/settings.pyALLOWED_HOSTSautonn_resnet을 추가해보았으나 계속 동일한 현상이 발생하고 있습니다.

해당 규약을 충족하기 위해 autonn_resnet컨테이너의 호스트네임을 autonn-resnet으로 변경할 경우 main 브랜치 기준으로 다음 영향이 있습니다.

project_manager/tango/projectHandler.py:

https://github.com/ML-TANGO/TANGO/blob/4de9c132e9e0e40742d51cce9c0cc91e932e2441/project_manager/tango/projectHandler.py#L128-L137

def get_container_info(host_name):
    ports_by_container = {
        'bms' : "8081",
        'yoloe' : "8090",
        'codeGen' : "8888",
        'autonn_resnet': "8092",
        'visualization': "8091"
    }
    return host_name.replace('_', '-'), ports_by_container[host_name]
gwonmin-tesla commented 11 months ago

autonn_resnet을 autonn-resnet으로 변경하여 해결함