In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Scenario description:
When the client and the server are in different areas (across firewalls, addresses are mapped), the client will not get the broker when accessing the kafka, but the networks are interoperable. However, when client requests zookeeper across firewalls, the broker IP returned by zookeeper to client is the actual address of kafka, not the mapped address, so client access fails.
Solution 1.
1. Configuration file: listeners=PLAINTEXT:// hostname: 9092
2. Server hosts: host name of private network address
3. Client hosts: host name of public network address
Note: insecure, complex and inconsistent configuration
Solution 2: (case)
1. Notes:
Listeners=PLAINTEXT://192.168.111.134:9092
Add:
Inter.broker.protocol.version=1.0 log.message.format.version=1.0 advertised.listeners=INSIDE://192.168.111.134:9092,OUTSIDE://node7:9093 listeners=INSIDE://192.168.111.134:9092,OUTSIDE://node7:9093 listener.security.protocol.map=INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT inter.broker.listener.name=INSIDE
Explanation: it is equivalent to opening 2 ports. If the server has multiple network cards, you can fill in the public network address in the host name part.
If unified management is adopted, hostname resolution can be used and nginx proxy can be used.
For the above changes, you need to restart 3 clusters to take effect, and the zk listening address is different, as shown in the figure (therefore, standardized configuration is recommended to take into account the business)
2. Server hosts
Host name of private network address (domain name resolution is used here)
Note: the official website also provides secure encryption and non-text encryption. If both kafka and zk require security, it is recommended to refer to the official website for unified configuration.
Explain the relevant parameters on the official website:
Host.name:
Advertised.host.name:
Advertised.listeners:
Listeners:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.