我一直想使用Apache Storm从Kafka流式传输。我对Python更熟悉,所以我决定使用streamparse(https://github.com/Parsely/streamparse)。单词计数示例是介绍性示例。我一直试图让它在我的本地机器上工作。我安装了以下版本的JDK,lein和storm:
Leiningen 2.6.1 on Java 1.8.0_73 Java HotSpot(TM) 64-Bit Server VM
按照streamparse后执行以下步骤:
sparse quick start wordcount cd wordcount sparse run
我收到以下错误:
Retrieving org/apache/storm/storm-core/0.10.1/storm-core-0.10.1.pom from central Retrieving org/apache/storm/storm/0.10.1/storm-0.10.1.pom from central Retrieving org/apache/storm/storm-core/0.10.1/storm-core-0.10.1.jar from central Could not transfer artifact com.parsely:streamparse:pom:0.0.4-SNAPSHOT from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.4 from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target This could be due to a typo in :dependencies or network issues. If you are behind a proxy, try setting the 'http_proxy' environment variable.
我的project.clj文件如下所示:
(defproject wordcount "0.0.1-SNAPSHOT" :source-paths ["topologies"] :resource-paths ["_resources"] :target-path "_build" :min-lein-version "2.6.1" :jvm-opts ["-client"] :dependencies [[org.apache.storm/storm-core "0.10.1"] [com.parsely/streamparse "0.0.4-SNAPSHOT"] ] :jar-exclusions [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"] :uberjar-exclusions [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"] )
所以,我的lein和storm核心版本设置正确。我不确定我哪里出错了。有人可以帮帮我吗?
-Thanks
答案 0 :(得分:19)
这是因为java无法识别https://clojars.org/repo的根证书颁发机构(CA)SSL证书。
解决方案是将该证书添加到java cacerts文件中,以便永久接受它。
第1步:获取https://clojars.org
的根证书多数民众赞成!你有你的根证书!
步骤2:将该证书添加到java cacerts文件中。
keytool -import -noprompt -trustcacerts -alias ALIASNAME -file /PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore / PATH / TO / YOUR / JDK / jre / lib / security / cacerts -storepass changeit
就是这样!你解决了问题。
请注意
确认您正在执行步骤2的那个PKI错误(KAFKA使用的JRE)的jre。如果您尝试使用另一个jre问题将会是原样。
只使用JDK内部的一个jre会减少出现问题的机会。
答案 1 :(得分:2)
如果您使用的是debian或ubuntu,则可以执行:
$ sudo update-ca-certificates -f