[Jenkins]128 error

leocodms·2021년 12월 6일
0

CI/CD

목록 보기
2/2

배포 잘하던 jenkins가 갑자기 이런 에러를 뿌렸다..

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- git@github.com:cheun0327/AISM_PRO_BE.git +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: ssh: Could not resolve hostname github.com: Temporary failure in name resolution

github repo에 접근할 수 없단다..

구글링해보니 ssh키 에러, master slave설정 에러등 여러 원인이 나왔으나,
ssh키 에러로 판단해서 키 발급 다시하기 전 시도해보고싶은 것들이 있어 더 구글링 해보았다...

네트워크 에러가 유력했다.

ping github.com

으로 ping 테스트 해보니,

ping: github.com: Temporary failure in name resolution

이런 에러가 났다.

깃헙과 연결이 끊어졌던 것!!

sudo vim /etc/resolv.conf 에

nameserver 168.126.63.1	//kt DNS
nameserver 8.8.8.8		// 구글 퍼블릭 DNS서비스(IPv4)
nameserver 8.8.4.4		// 구글 퍼블릭 DNS서비스(IPv4)

을 추가해 주었더니 ping 테스트 통과!
[참고] https://gwpaeng.tistory.com/250

다시 deploy 해보니 에러 문구가 변경 되었다..ㅎㅎㅎ 약간의 발전..

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- git@github.com:cheun0327/AISM_PRO_BE.git +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.

해당 에러는 ubuntu 서버에서 ssh key 재발급 이후, github ssh key에 새로 등록해준후,
jenkins credential에 id_rsa 내용(id_rsa.pub 아님!@!)으로 새롭게 업데이트 해주어서 해결했다.

세시간 삽질 완!료!


추가

DNS 설정 추가 후, 서버 재시작 할때마다 파일이 초기화 되는 불편함이 있었다.
https://it-serial.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-%EC%84%A4%EC%A0%95-%EC%99%B8%EB%B6%80-%ED%86%B5%EC%8B%A0-%ED%95%B4%EA%B2%B0

https://blog.hkwon.me/ubuntu-18-04-netplan/

profile
Backend Developer

0개의 댓글