El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring the Port Range Bound to the Client

Updated on 2022-12-14 GMT+08:00

Scenarios

When the ZooKeeper client is started, it is bound to a random port. In most cases, you want to bind the ZooKeeper client to a specific port. For example, for the client connection whitelist based on the IP address and port number, users can configure the port range bound to the client so that the same port range can be configured in the connection whitelist.

Configuration Description

Set zookeeper.client.bind.port.range to <startPort:endPort> to ensure that the client is always bound to a port in the specified port range. For example, if zookeeper.client.bind.port.range is set to 65510:65512, the client can be bound only to port 65510, 65511, or 65512.

To set zookeeper.client.bind.port.range to <startPort:endPort>, set Dzookeeper.client.bind.port.range to <startPort:endPort> when starting the ZooKeeper client.

Table 1 Parameter description

Parameter

System Parameter

Description

Default Value

zookeeper.client.bind.port.range

zookeeper.client.bind.port.range

This parameter is optional. Range of ports that can be used by the client during binding. The format is startPort:endPort (including startPort and endPort). The values of startPort and endPort range from 1024 to 65535, and the value of endPort must be greater than that of startPort. For example, 50000:50050 and 50100:50200.

The client can be successfully connected only when at least two ports are available. If no port is available in the configured port range, the client fails to connect to the server. If the configured value is invalid, the value is ignored, the error is recorded, and the client will be bound to a random port.

-

Procedure

  1. Log in to the node where the client is installed as the client installation user.
  2. Run the following command to switch to the client installation directory:

    cd /opt/client

  3. Run the following command to edit the component_env file:

    vi ZooKeeper/component_env

    Add the zookeeper.client.bind.port.range parameter and its value.

    Normal mode:

    export ZOOKEEPER_HOME="/opt/client/ZooKeeper/zookeeper"
    PATH_NEW=`echo $PATH | sed "s|:$ZOOKEEPER_HOME/bin||g" | sed "s|$ZOOKEEPER_HOME/bin:||g"`
    export PATH="$ZOOKEEPER_HOME/bin:$PATH_NEW"
    # default heap for zookeeper client
    export ZK_CLIENT_HEAP="256"
    export CLIENT_JVMFLAGS="-Xmx${ZK_CLIENT_HEAP}m"
    export CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Dzookeeper.root.logger=WARN,CONSOLE -Dzookeeper.request.timeout=120000 -Dzookeeper.client.bind.port.range=<startPort:endPort>" # Add a parameter.

    Security mode:

    if [ "$HADOOP_SECURITY_AUTHENTICATION" = "kerberos" ]; then
        default_realm=`cat $KRB5_CONFIG |grep default_realm|awk -F"=" '{gsub(" ","");print $2}'|tr 'A-Z' 'a-z'`
        export ZOO_SERVER_PRINCIPAL="zookeeper/hadoop.${default_realm}"
        export CLIENT_JVMFLAGS=" ${CLIENT_JVMFLAGS} -Djava.security.krb5.conf=$KRB5_CONFIG -Dzookeeper.client.bind.port.range=<startPort:endPort>"  # Add a parameter.

  1. Run the :wq command to save execution.
  2. Restart the client for the settings to take effect.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback