:Unit firewalld.service could not be found.
ファイアウォールを直接引き出す-cmd:
yum install firewalld systemd -y
サーバーにファイアウォールがインストールされているか確認する
systemctl status firewalld
ファイアウォールを有効にする
systemctl start firewalld.service
ファイアウォールを無効にする
systemctl stop firewalld.service
起動を設定する
systemctl enable firewalld.service
起動を無効にする
systemctl disable firewalld.service
状態を変更せずにファイアウォールをリロードする
firewall-cmd --reload
開発済みポートを表示する
netstat -anp
指定されたポート8080が開発されているかどうかを照会る
firewall-cmd --query-port=8080/tcp
仮想マシンを再起動する
service network restart
docker イメージとコンテナは/var/lib/docker
zookeeper コンテナに入る
docker exec -it 66805aa71339 /bin/bash
クライアント接続
./bin/zkCli.sh
接続後の操作ログ
[zk: localhost:2181(CONNECTED) 0] ls /
[services, zookeeper]
[zk: localhost:2181(CONNECTED) 1] ls /services
[cloud-payment-service]
[zk: localhost:2181(CONNECTED) 3] ls /services/cloud-payment-service
[b6-c92-af96-fc8af]
[zk: localhost:2181(CONNECTED) 5] get /services/cloud-payment-service/b6-c92-af96-fc8af
{"name":"cloud-payment-service","id":"b6-c92-af96-fc8af","address":"DESKTOP-L51JTQC.mshome.net","port":8004,"sslPort":null,"payload":{"@class":"org.springframework.cloud.zookeeper.discovery.ZookeeperInstance","id":"application-1","name":"cloud-payment-service","metadata":{}},"registrationTimeUTC":117,"serviceType":"DYNAMIC","uriSpec":{"parts":[{"value":"scheme","variable":true},{"value":"://","variable":false},{"value":"address","variable":true},{"value":":","variable":false},{"value":"port","variable":true}]}}
[zk: localhost:2181(CONNECTED) 6] get /zookeeper