Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Contrail] Format of Zookeeper Session ID

0

0

Article ID: KB35218 KB Last Updated: 16 Nov 2019Version: 1.0
Summary:

Multiple Contrail components running as Zookeeper clients are assigned a session ID.

This article provides a simple explanation of how the session ID is formatted. Understanding the formatting will help you during troubleshooting to identify which is the original zookeeper server that a client connects to, and whether the client is reconnected to zookeeper ensemble. 

Solution:

The session ID consists of a 1-byte long server ID which represents the zookeeper server ID (myid) in the ensemble, a 5-byte long truncated timestamp that represents the creation time of this session, and a 2-byte long reserved field which is used for re-connection. 

Field      server id    timestamp    reserved for re-connection
Length     8            40           16

Use '/usr/share/zookeeper/bin/zkCli.sh' command to enter zookeeper CLI. For the following znode, it is created by session ID ‚Äč0x26d9d24aec60008. This session ID can be broken into 3 parts:

  1. server id 0x2
  2. truncated timestamp 0x6d9d24aec6
  3. reserved field 0x0008

From this information, we know this client was initially connected to zookeeper server with ID value 2. 

# /usr/share/zookeeper/bin/zkCli.sh
Connecting to localhost:2181
<snipped>
[zk: localhost:2181(CONNECTED) 4] get /svc-monitor/ead8d60a310c448ab530809bc15bc354__lock__0000000559
22166
cZxid = 0x6c000001c9
ctime = Sat Oct 05 11:27:33 PDT 2019
mZxid = 0x6c000001c9
mtime = Sat Oct 05 11:27:33 PDT 2019
pZxid = 0x6c000001c9
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x26d9d24aec60008
dataLength = 5
numChildren = 0

When checking session ID, if the zookeeper server that is currently connected has a different server ID parsed from the session ID, or the reserved field has increased value, this indicates the client has had some connection issue before. 

For more on troubleshooting Zookeeper, refer to KB31144 - Contrail Getting Started - Administration, Configuration & Troubleshooting (JumpStation)

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search