stage 서버에서 빌드할 때, 아래와 같은 에러가 발생하였고
dev 서버에서는 잘 되는데 stage 환경에서는 문제가 있었다고 함
[ERROR] Failed to execute goal on project 312: Could not resolve dependencies for project com.33:11manager:war:1.0.0-BUILD-SNAPSHOT: Failed to collect dependencies at io.springfox:springfox-swagger2:jar:2.6.1 -> org.mapstruct:mapstruct:jar:1.0.0.Final: Failed to read artifact descriptor for org.mapstruct:mapstruct:jar:1.0.0.Final: Could not transfer artifact org.jboss.shrinkwrap:shrinkwrap-bom:pom:1.0.1 [ERROR]
|
개발에 개자도 모르는 엔지니어는 당황하였으나
일단 로그 상 보이는 repo.maven.apache.org 와 통신을 확인 하였음
[root@123 /etc/pki/nssdb]# telnet repo.maven.apache.org 443 Trying 151.101.196.215... Connected to repo.maven.apache.org. Escape character is '^]'. ^CConnection closed by foreign host. |
오우 잘 됨. 그래서 위 로그 기반으로 구글링을 시작하였음
찾은 내용 중 대표적인게 아래 두가지 였다.
pom.xml 에 https -> http 로 바꿔라. keytool 를 이용해 신뢰할 수 있는 인증서를 추가해라?
|
헛, 다 적용해 봤는데 안 됨.
curl 로 긁어 보았음.. 똑같이 안 됨. (--insecure 옵션을 주면 잘 되고...)
[root@11-3/etc/pki/nssdb]# (reverse-i-search)`repo': curl https://repo.maven.apache.org -v * About to connect() to repo.maven.apache.org port 443 (#0) * Trying 151.101.196.215... connected * Connected to repo.maven.apache.org (151.101.196.215) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * Peer's certificate issuer is not recognized: 'E=support@fortinet.com,CN=FG3H0E3917902880,OU=Certificate Authority,O=Fortinet,L=Sunnyvale,ST=California,C=US' * NSS error -8179 * Closing connection #0 * Peer certificate cannot be authenticated with known CA certificates curl: (60) Peer certificate cannot be authenticated with known CA certificates More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. |
하다하다 안되서 네트워크 쪽에 문의해 보니, 방화벽에서 통신이 막혀 있다고 함. (읭? telnet 은 왜 됐지)
열고나니 잘 됨 ㅠㅠ
[root@11-ap01 /33/project/33/11]# (reverse-i-search)`curl': curl https://repo.maven.apache.org
maven2/ 2016-01-19 14:00 -
근데, 근본적인 원인 해결은 통신을 여는 것이 아니라
넥서스를 사용하는 환경에서는 아래와 같이 추가하는 것이 맞는 것 같음
/etc/maven/settings.xml