Warning
This article was automatically translated by OpenAI (gpt-4o-mini).It may be edited eventually, but please be aware that it may contain incorrect information at this time.
In this article, I will explain how to install Zipkin with OTLP support on Rocky Linux 8 and run it as a systemd service.
While it is easy to set up an OTLP-compatible Tracing Backend using Docker, it can be cumbersome to install Docker or start containers in environments like air-gapped setups. This method allows you to easily try out OTLP.
Table of Contents
Prerequisites
- Rocky Linux 8+
- Java 17+
Installing Java
If you haven't installed Java on Rocky Linux 8, you can do so with the following command.
sudo dnf install -y java-17-openjdk
Check the installed version of Java.
java -version
You should see output similar to the following.
openjdk version "17.0.14" 2025-01-21 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS, mixed mode, sharing)
Installing Zipkin
Tip
This article uses in-memory storage. The JVM heap size can be adjusted as needed.
Set the heap size to an appropriate size based on the amount of traces you want to store.
Downloading Zipkin
Download the latest version of Zipkin.
curl -sSL https://zipkin.io/quickstart.sh | bash -s
This command downloads zipkin.jar to the current directory.
Next, download the Zipkin OTel Module.
curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.contrib.otel:zipkin-module-otel:LATEST:module otel.jar
This command downloads otel.jar to the current directory.
Creating a Service User
Create a dedicated user to run Zipkin.
sudo useradd -r -s /sbin/nologin zipkin
Placing Zipkin Files
Place the Zipkin executable files in the appropriate location.
sudo mkdir -p /opt/zipkin
sudo mv zipkin.jar /opt/zipkin/
sudo mv otel.jar /opt/zipkin/
sudo chown -R zipkin:zipkin /opt/zipkin
Configuring the systemd Service
Register Zipkin as a systemd service. Adjust memory settings and port numbers as needed for your environment.
sudo tee /etc/systemd/system/zipkin.service << 'EOF'
[Unit]
Description=Zipkin Server
After=network.target
[Service]
Type=simple
User=zipkin
Group=zipkin
Environment="JAVA_OPTS=-Xms512m -Xmx1g -XX:+ExitOnOutOfMemoryError -Dloader.path='otel.jar,otel.jar!/lib' -Dspring.profiles.active=otel"
Environment="MEM_MAX_SPANS=10000"
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
WorkingDirectory=/opt/zipkin
ExecStart=/usr/bin/java $JAVA_OPTS -cp /opt/zipkin/zipkin.jar org.springframework.boot.loader.launch.PropertiesLauncher
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
Enabling and Starting the Service
Enable and start the service you created.
sudo systemctl daemon-reload
sudo systemctl enable zipkin
sudo systemctl start zipkin
Checking the Service Status
Verify that the Zipkin service is running properly.
sudo systemctl status zipkin
You should see output similar to the following.
● zipkin.service - Zipkin Server
Loaded: loaded (/etc/systemd/system/zipkin.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2025-02-26 10:11:09 JST; 7s ago
Main PID: 1678 (java)
Tasks: 43 (limit: 617204)
Memory: 466.1M
CGroup: /system.slice/zipkin.service
└─1678 /usr/bin/java -Xms512m -Xmx1g -XX:+ExitOnOutOfMemoryError -Dloader.path=otel.jar,otel.jar!/lib -Dspring.profiles.active=otel -cp /opt/zipkin/zipkin.jar org.springframework.boot.loader.launch.PropertiesLauncher
Feb 26 10:11:10 zipkin java[1678]: oooooooo oooooooo
Feb 26 10:11:10 zipkin java[1678]: oooo oooo
Feb 26 10:11:10 zipkin java[1678]: ________ ____ _ _____ _ _
Feb 26 10:11:10 zipkin java[1678]: |__ /_ _| _ \| |/ /_ _| \ | |
Feb 26 10:11:10 zipkin java[1678]: / / | || |_) | ' / | || \| |
Feb 26 10:11:10 zipkin java[1678]: / /_ | || __/| . \ | || |\ |
Feb 26 10:11:10 zipkin java[1678]: |____|___|_| |_|\_\___|_| \_|
Feb 26 10:11:10 zipkin java[1678]: :: version 3.5.0 :: commit 0f8fc88 ::
Feb 26 10:11:10 zipkin java[1678]: 2025-02-26T10:11:10.944+09:00 WARN [/] 1678 --- [ main] i.m.p.PrometheusMeterRegistry : A MeterFilter is being configured after a Meter has been registered to this registry. All MeterFilters should
be configured before any Meters are registered. If that is not possible or you have a use case where it should be allowed, let the Micrometer maintainers know at https://github.com/micrometer-metrics/micrometer/issues/4920. Enable DEBUG level logging on t
his logger to see a stack trace of the call configuring this MeterFilter.
Feb 26 10:11:11 zipkin java[1678]: 2025-02-26T10:11:11.045+09:00 INFO [/] 1678 --- [oss-http-*:9411] c.l.a.s.Server : Serving HTTP at /[0:0:0:0:0:0:0:0]:9411 - http://127.0.0.1:9411/
Verification
Access the Zipkin UI to confirm that the service is running correctly.
curl -s http://localhost:9411/health
If it is running correctly, you will receive a response like the following.
{
"status" : "UP",
"zipkin" : {
"status" : "UP",
"details" : {
"OpenTelemetryHttpCollector{}" : {
"status" : "UP"
},
"InMemoryStorage{}" : {
"status" : "UP"
}
}
}
}
Access http://<server_address>:9411 in a web browser to view the Zipkin UI.
You can check the service logs with the following command.
sudo journalctl -u zipkin -f
If you modify /etc/systemd/system/zipkin.service, please reload the service and restart it.
sudo systemctl daemon-reload
sudo systemctl restart zipkin
The OTLP Tracing Endpoint is http://<server_address>:9411/v1/traces.
For information on how to send traces using the OpenTelemetry Java Agent, please refer to this article.