生成keystore和truststore檔案
依次執行以下的命令,執行中需要設定乙個不少於6位的密碼,這裡設定的密碼為hadoop。執行完成後,會在當前目錄生成keystore和truststore檔案。
[root@itp-flink—master ~]
# openssl req -new -x509 -keyout test_ca_key -out test_ca_cert -days 9999 -subj '/c=cn/st=beijing/l=beijing/o=itp_cy/ou=itp_cy/cn=itp_cy.com'
generating a 2048 bit rsa private key
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
....
.....+++
....
....
....
....
....
..+++
writing new private key to 'test_ca_key'
enter pem pass phrase:
verifying - enter pem pass phrase:
-----
[root@itp-flink—master ~]# keytool -keystore keystore -alias localhost -validity 9999 -genkey -keyalg rsa -keysize 2048 -dname "cn=itp_cy.com, ou=itp_cy, o=itp_cy, l=beijing, st=beijing, c=cn"
enter keystore password:
re-enter new password:
enter key password for (return if same as keystore password):
[root@itp-flink—master ~]# keytool -keystore truststore -alias caroot -import -file test_ca_cert
enter keystore password:
re-enter new password:
owner: cn=itp_cy.com, ou=itp_cy, o=itp_cy, l=beijing, st=beijing, c=cn
issuer: cn=itp_cy.com, ou=itp_cy, o=itp_cy, l=beijing, st=beijing, c=cn
serial number: 92afbb79bf87d705
valid from: fri jul 19 20:31:39 cst 2019 until: mon dec 03 20:31:39 cst 2046
certificate fingerprints:
md5: 65:8f:f2:74:53:32:59:06:b5:33:dd:91:4b:68:96:11
sha1: ae:ed:7b:ce:fa:2a:8c:13:4e:65:ba:c2:a6:50:0f:6a:b1:41:f2:2c
sha256: 74:9f:23:1e:5a:69:fc:7f:83:71:e6:40:b1:60:4c:6c:a4:d8:27:ae:96:f4:29:96:95:12:c5:2d:1d:85:93:5d
signature algorithm name: sha256withrsa
version: 3
extensions:
#1: objectid: 2.5.29.35 criticality=false
authoritykeyidentifier [
keyidentifier [
0000: fe a2 fd 02 df cb af 25 4e 1f d3 98 b9 2d 2a 08 .......%n....-*.
0010: 5f f9 0b df _...]]
#2: objectid: 2.5.29.19 criticality=false
basicconstraints:[
ca:true
pathlen:2147483647
]#3: objectid: 2.5.29.14 criticality=false
subjectkeyidentifier [
keyidentifier [
0000: fe a2 fd 02 df cb af 25 4e 1f d3 98 b9 2d 2a 08 .......%n....-*.
0010: 5f f9 0b df _...]]
trust this certificate? [no]: yes
certificate was added to keystore
[root@itp-flink—master ~]# keytool -certreq -alias localhost -keystore keystore -file cert
enter keystore password:
[root@itp-flink—master ~]# openssl x509 -req -ca test_ca_cert -cakey test_ca_key -in cert -out cert_signe 9999 -cacreateserial -passin pass:hadoop
signature ok
subject=/c=cn/st=beijing/l=beijing/o=itp_cy/ou=itp_cy/cn=itp_cy.com
getting ca private key
[root@itp-flink—master ~]# keytool -keystore keystore -alias caroot -import -file test_ca_cert
enter keystore password:
owner: cn=itp_cy.com, ou=itp_cy, o=itp_cy, l=beijing, st=beijing, c=cn
issuer: cn=itp_cy.com, ou=itp_cy, o=itp_cy, l=beijing, st=beijing, c=cn
serial number: 92afbb79bf87d705
valid from: fri jul 19 20:31:39 cst 2019 until: mon dec 03 20:31:39 cst 2046
certificate fingerprints:
md5: 65:8f:f2:74:53:32:59:06:b5:33:dd:91:4b:68:96:11
sha1: ae:ed:7b:ce:fa:2a:8c:13:4e:65:ba:c2:a6:50:0f:6a:b1:41:f2:2c
sha256: 74:9f:23:1e:5a:69:fc:7f:83:71:e6:40:b1:60:4c:6c:a4:d8:27:ae:96:f4:29:96:95:12:c5:2d:1d:8
signature algorithm name: sha256withrsa
version: 3
extensions:
#1: objectid: 2.5.29.35 criticality=false
authoritykeyidentifier [
keyidentifier [
0000: fe a2 fd 02 df cb af 25 4e 1f d3 98 b9 2d 2a 08 .......%n....-*.
0010: 5f f9 0b df _...]]
#2: objectid: 2.5.29.19 criticality=false
basicconstraints:[
ca:true
pathlen:2147483647
]#3: objectid: 2.5.29.14 criticality=false
subjectkeyidentifier [
keyidentifier [
0000: fe a2 fd 02 df cb af 25 4e 1f d3 98 b9 2d 2a 08 .......%n....-*.
0010: 5f f9 0b df _...]]
trust this certificate? [no]: yes
certificate was added to keystore
[root@itp-flink—master ~]# keytool -keystore keystore -alias localhost -import -file cert_signed
enter keystore password:
certificate reply was installed in keystore
奇怪的問題 Flink集群搭建問題
在搭建flink集群的時候,出現taskmanager註冊不上jobmanager 檢視taskmanager 一直報trying to register at jobmanager akka.tcp.attempt 1,timeout 500 milliseconds 檢視webui頁面,task...
Flink集群之Flink集群配置優化項
jobmanager rpc通訊位址,一般需要配置指定的jobmanager的ip位址,預設的localhost不適合多節點集群模式 jobmanager的jvm堆記憶體,預設為1024m,可以根據集群規模適當增加 taskmanager的jvm堆記憶體,預設為1024m,可以根據資料計算規模以及狀...
Flink 環境搭建
在 2.1 節中已經將 flink 的準備環境已經講完了,本篇文章將帶大家正式開始接觸 flink,那麼我們得先安裝一下 flink。flink 是可以在多個平台 windows linux mac 上安裝的。在開始寫本書的時候最新版本是 1.8 版本,但是寫到一半後更新到 1.9 了 合併了大量 ...