MacOS 및 Linux 문제 해결 단계¶
다음 단계에 따라 프록시가 있는지 확인하고 추가 문제 해결에 필요한 프록시 호스트 및 포트 번호를 수집하십시오.
새
Terminal
창을 엽니다.네트워크에 대한 프록시 구성 세부 정보를 검색하려면 다음 명령을 실행합니다.
example.com
을 테스트할 실제 호스트 이름으로 바꿉니다.networksetup -getsecurewebproxy "$(networksetup -listnetworkserviceorder | grep $(route get example.com | grep interface | awk -F: '{print $2}') | awk -FPort: '{print $2}' | awk -F, '{print $1}' | sed 's/^ //g')"
프록시 구성이 포함된 샘플 출력
Enabled: Yes Server: 192.168.21.12 Port: 3128 Authenticated Proxy Enabled: 1
프록시 구성이 제외된 샘플 출력
Enabled: No Server: Port: 0 Authenticated Proxy Enabled: 0
또한, 다음 명령을 사용하여 프록시 설정에 사용되는 일반적인 환경 변수를 테스트할 수 있습니다.
env | grep -i proxy
이 명령은 다음과 유사한 출력을 반환합니다.
http_proxy=http://my.pro.xy:123 HTTP_PROXY=http://my.pro.xy:123 HTTPS_PROXY=http://my.pro.xy:123 https_proxy=http://my.pro.xy:123 NO_PROXY=localhost,.company.com,.amazonaws.com
프록시가 있는 경우¶
연결 문제가 발생한 특정 URL을 식별할 수 있습니다. Snowflake 허용 목록에 나열된 모든 URL을 테스트하는 것이 좋지만, 설정에서 직접적으로 문제를 유발하는 URLs에 집중하는 것이 좋을 수 있습니다.
export http_proxy=http://<PROXY_HOST:PROXY_PORT> && export HTTP_PROXY=$http_proxy && export HTTPS_PROXY=$http_proxy && export https_proxy=$http_proxy
curl -v https://URL 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
또는 그림과 같이 프록시 설정을 curl
에 직접 전달(환경 변수를 먼저 설정하지 않고)할 수도 있습니다.
인증되지 않은 프록시
curl --proxy “<PROTOCOL>://<HOST>:<PORT>” ..rest of the arguments..
인증된 프록시
curl --proxy “<PROTOCOL>://<HOST>:<PORT>” --proxy-user user:pass ..rest of the arguments..
Terminal
에서 다음 명령을 실행합니다. 문제를 유발하는 URL로 명령을 업데이트합니다. <URL>
을 문제가 있는 URL로 바꿉니다. 또한, <PROXY_URL>
을 사용자의 프록시 정보로 바꿉니다.
export http_proxy=http://<PROXY_URL> && export HTTP_PROXY=$http_proxy && export HTTPS_PROXY=$http_proxy && export https_proxy=$http_proxy
curl -v https://<URL> 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
이 명령은 HTTP 및 HTTPS 요청에 프록시를 사용하도록 환경을 구성하고 지정된 Snowflake URL에 연결을 시도합니다. 또한 이 명령은 성공적인 연결이나 발생한 오류를 포함하여 연결 시도에 대한 자세한 정보도 출력합니다.
성공적인 연결 예시 출력:
➜ curl -v https://<account>.snowflakecomputing.com 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying <IP ADDRESS>...
* Connected to <IP ADDRESS> (<IP ADDRESS>) port <PORT> (#0)
* Establish HTTP proxy tunnel to <account>.snowflakecomputing.com:443
> CONNECT <account>.snowflakecomputing.com:443 HTTP/1.1
> User-Agent: curl/7.79.1
< HTTP/1.1 200 Connection established
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* subject: CN=*.us-east-1.snowflakecomputing.com
* subjectAltName: host "<account>.snowflakecomputing.com" matched cert's "*.us-east-1.snowflakecomputing.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
> GET / HTTP/1.1
> User-Agent: curl/7.79.1
< HTTP/1.1 302 Found
출력 분석:
“Connected to…”는 프록시(<IP ADDRESS>)에 성공적으로 연결되고 Snowflake에 HTTP 터널이 설정되었음을 나타냅니다.
HTTP/1.1 200 Connection established
와 같이 HTTP 상태 코드 뒤에HTTP/1.1 302 Found
가 오면 로그인 페이지에 성공했음을 의미합니다.
이러한 단계를 완료한 후 후속 조치 를 진행합니다.
프록시가 없는 경우¶
Terminal
에서 다음 명령을 실행하고, 명령의 URL이 테스트 중인 Snowflake URL과 일치하도록 업데이트해야 합니다.
curl -v https://<URL> 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
성공적인 연결 예시 출력:
➜ curl -v https://<account>.snowflakecomputing.com 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 52.22.29.117:443...
* Connected to <account>.snowflakecomputing.com (52.22.29.117) port 443 (#0)
* subject: CN=*.us-east-1.snowflakecomputing.com
* subjectAltName: host "<account>.snowflakecomputing.com" matched cert's "*.us-east-1.snowflakecomputing.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0> GET / HTTP/1.1
< HTTP/1.1 302 Found
이 출력은 연결에 성공했음을 나타내며, 시스템이 Snowflake 서버에 연결하여 통신할 수 있음을 나타냅니다.
연결 실패의 예:
➜ curl -v https://<account>.snowflakecomputing.com 2>&1 | tee | grep "Trying\|Connected\|Establish\|CONNECT\|subject\|issuer\|HTTP\|curl"
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 52.22.29.117:443...
* Trying 3.222.247.13:443...
* Trying 54.81.51.170:443...
curl: (7) Failed to connect to <account>.us-east-1.snowflakecomputing.com port 443 after 3139 ms: Connection refused
이러한 단계를 완료한 후 후속 조치 를 진행합니다.