Migrate to Containers CLI 관련 문제
이 문서에서는 Migrate to Containers 작업 중 발생할 수 있는 몇 가지 문제에 대한 해결 방���을 설명���니���.
권한 오류로 인한 복사 작업 실패
전체 파일 시스템에 대한 읽기 액세스 권한을 얻으려면 copy
명령어는 소스 머신에서 수퍼유저를 사용하여 실행됩니다. 하지만 권한 오류로 인해 여전히 복사 작업이 실패하는 경우가 있습니다. 이 문제는 경우에 따라 슈퍼유저조차 소스 머신의 일부 디렉터리에 대한 읽기 액세스 권한이 없기 때문에 발생합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
E rsync rsync: send_files failed to open "/var/lib/lxcfs/cgroup/blkio/blkio.reset_stats": Permission denied (13)
...
E rsync rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [generator=3.2.7]
Error: failed to copy fs from GCP VM "petclinic-springboot": failed copying vm to "/tmp/copy-1411243774": exit status 23
이 문제를 해결하려면 커스텀 필터를 만들어 복사 작업에서 이러한 디렉터리를 제외합니다.
예를 들어 복사 작업에서 /var/lib/lxcfs
디렉터리를 제외하려면 다음 커스텀 필터를 필터 파일에 추가합니다.
- /var/lib/lxcfs
자세한 내용은 복사된 파일 시스템 크기 감소를 참조하세요.
gcloud
를 사용한 복사 작업이 머신 인증에 실패함
gcloud
를 사용하여 sudo
로 copy
명령어를 실행하는 경우 복사 작업이 소스 머신에 인증되지 않을 수 있습니다. 이 문제는 Migrate to Containers CLI를 실행하는 동일한 수퍼유저로 gcloud
가 실행되고, 수퍼유저가 표준 사용자와 동일한 사용자 인증 정보를 가지고 있지 않을 때 발생합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
E ssh init ERROR: (gcloud.compute.ssh) There was a problem refreshing your current auth tokens: ('Failed to retrieve TOKEN from the Google Compute Engine metadata service. Status: 404 Response:\nb\'"No service account scopes specified."\'', <google.auth.transport.requests._Response object at 0x7fecf5c75550>)
E ssh init Please run:
E ssh init
E ssh init $ gcloud auth login
E ssh init
E ssh init to obtain new credentials.
E ssh init
E ssh init If you have already logged in with a different account:
E ssh init
E ssh init $ gcloud config set account ACCOUNT
E ssh init
E ssh init to select an already authenticated account to use.
Error: failed to initiate a connection with GCP VM "tomcat-server": exit status 1
이 문제를 해결하려면 sudo
없이 gcloud
를 사용하여 copy
명령어를 실행해 봅니다.
Docker의 Snap 버전을 사용하면 analyze
명령어 실패
Docker의 Snap 버전을 사용하면 analyze
명령어가 실패합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
I Unpacking file system...
I Running analysis...
Error: running analysis failed: failed to run container: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: PATH
이 문제를 해결하려면 Snap을 사용하지 않고 Docker를 다시 설치합니다. 자세한 내용은 Docker Engine 설치를 참조하세요.