Проблемы с сертификатом SSL возникают по крайней мере в двух не связанных между собой типах процессов: создание приложений для python/pip
и приложения scala/java
(spark
) с использованием maven
.
Это происходит на совершенно новом MacBook Pro с Sierra.
Вот первый из них: pip
:
$pip install numpy
Collecting numpy
Could not fetch URL https://pypi.python.org/simple/numpy/:
There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) - skipping
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
Я не сталкивался с этой проблемой на других системах / машинах. Я последовал предложению здесь: https://stackoverflow.com/a/32302448/1056563 . Но добавление --cert path_to_cert
не дало эффекта
Второй пример: я сделал git clone
Spark
и пытался собрать его, как показано на рисунке:
$./build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package
Сбой сразу же с ошибками сертификата:
Using `mvn` from path: /usr/local/bin/mvn
[INFO] Scanning for projects...
Downloading: https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 22, column 11
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT (/shared/spark/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 22, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Я рассматривал похожие вопросы, но ни один из них не соответствовал моим конкретным обстоятельствам: например, в JRE/JDK есть действительный сертификат:
$ll /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/security/cacerts
-rw-rw-r-- 1 root wheel 113484 Mar 15 01:51 /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/security/cacerts