Zipkin Basics and Deploying Its Server on Linux
This guide explains Zipkin’s core components—Collector, Storage, RESTful API, and Web UI—then walks through downloading the executable jar, placing it on a Linux server, creating start and stop shell scripts with proper permissions, and finally launching the Zipkin server and accessing its web interface.
Zipkin components
Zipkin's basic architecture consists of four core components: Collector, Storage, RESTful API, and Web UI.
Collector: the collector component processes tracing information sent from external systems, converting it into Zipkin's internal Span format for storage, analysis, and display.
Storage: the storage component handles the data received by the collector; by default it stores information in memory, but the storage strategy can be changed to use a database.
RESTful API: the API component provides external access interfaces, such as exposing trace data to clients or allowing other systems to query monitoring information.
Web UI: built on top of the API component, the UI lets users conveniently query and analyze trace information through a graphical interface.
Zipkin consists of two parts: the Zipkin server and the Zipkin client, where the client is the microservice application that will later be integrated.
Zipkin installation
The executable jar zipkin-server-2.23.18-exec.jar was downloaded directly.
Deployment
The jar file is placed into the server directory /usr/zipkin, completing the deployment.
Create start script (start.sh)
#!/bin/sh
export LANG="en_US.UTF-8"
cd /var/linktracking/zipkin
runMessage=`ps aux | grep \`cat pidfile.txt\``
projectStartCommand="/tools/jdk1.8.0_271/bin/java -jar zipkin-server-2.23.18-exec.jar"
if [[ $runMessage == *$projectStartCommand* ]]
then
echo "Application has starting ,restarting..."
kill -9 `cat pidfile.txt`
nohup /tools/jdk1.8.0_271/bin/java -jar zipkin-server-2.23.18-exec.jar -java.tmp.dir=/var/linktracking/zipkin/temp >/dev/null >zipkin.log 2>&1 & echo $! > pidfile.txt
else
echo "Application has stopped ,starting..."
nohup /tools/jdk1.8.0_271/bin/java -jar zipkin-server-2.23.18-exec.jar -java.tmp.dir=/var/linktracking/zipkin/temp >/dev/null >zipkin.log 2>&1 & echo $! > pidfile.txt
fiCreate stop script (stop.sh)
#!/bin/sh
cd /var/linktracking/zipkin
PID=$(cat pidfile.txt)
if [ ${PID} ];
then
echo 'Application is stpping...'
echo kill $PID DONE
kill $PID
else
echo 'Application is already stopped...'
fiAdjust script permissions
chmod 777 start.sh
chmod 777 stop.shConfiguration is complete; executing ./start.sh starts the Zipkin server.
After the server starts, the UI can be accessed at http://192.168.1.168:9411/, as shown in the screenshot below.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Coder Trainee
Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
