This guide covers common issues and their solutions.
Symptom: No Argus banner appears when starting the application.
Possible Causes:
-
Incorrect agent path
# Check if the JAR exists ls -la path/to/argus-agent.jar # Use absolute path java -javaagent:/absolute/path/to/argus-agent.jar ...
-
Java version too old
# Verify Java version (must be 21+) java -version
Symptom: Agent starts but no events appear.
Possible Causes:
-
Application not using virtual threads
// Make sure you're using virtual threads Thread.startVirtualThread(() -> { ... }); // or Executors.newVirtualThreadPerTaskExecutor();
-
JFR not enabled
# JFR should be enabled automatically, but you can verify java -XX:+FlightRecorder -javaagent:argus-agent.jar ... -
Events happening too fast
- Increase buffer size:
-Dargus.buffer.size=131072
- Increase buffer size:
Symptom: Application memory increases significantly with Argus.
Solutions:
-
Reduce buffer size
java -javaagent:argus-agent.jar \ -Dargus.buffer.size=16384 \ -jar app.jar -
Check for event storms
- If creating thousands of virtual threads per second, consider sampling
Symptom: Address already in use error.
Solution:
# Check what's using the port
lsof -i :9202
# Use a different port
java -Dargus.server.port=9090 -jar argus-server.jarSymptom: Cannot connect to WebSocket endpoint.
Checklist:
-
Verify server is running
curl http://localhost:9202/health # Should return: {"status":"healthy","clients":0} -
Check firewall settings
# macOS sudo pfctl -sr | grep 9202 # Linux sudo iptables -L -n | grep 9202
-
Verify WebSocket URL
// Correct const ws = new WebSocket('ws://localhost:9202/events'); // Wrong const ws = new WebSocket('ws://localhost:9202/'); // Missing /events
Symptom: Connected to WebSocket but no events received.
Possible Causes:
-
Agent and server not sharing buffer
- In standalone mode, the server has its own empty buffer
- Agent and server must run in the same JVM or use network transport
-
Application idle
- Events only occur when virtual threads are created/destroyed
Test with sample data:
# Send test message
wscat -c ws://localhost:9202/events
> ping
< pongSymptom: Could not find a Java installation matching: {languageVersion=21}
Solution:
# Install Java 21
# macOS with Homebrew
brew install openjdk@21
# Add to jenv (if using)
jenv add /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home
jenv local 21
# Or set JAVA_HOME
export JAVA_HOME=/path/to/jdk-21Symptom: Compilation errors when building from source.
Solution: Ensure Java 21 toolchain is configured in build.gradle.kts:
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}Symptom: CPU spikes when using Argus.
Possible Causes:
-
Too many events
- Application creating/destroying many virtual threads
- Consider reducing event frequency
-
Small buffer causing contention
- Increase buffer size:
-Dargus.buffer.size=131072
- Increase buffer size:
Symptom: Missing events in the stream.
Causes and Solutions:
-
Buffer overflow
# Increase buffer size -Dargus.buffer.size=262144 -
Slow consumers
- Ensure WebSocket clients process events quickly
- Consider adding client-side buffering
Cause: JFR streaming API not available.
Solution: Use JDK 14+ (JDK 21+ recommended for virtual threads).
Cause: Compiled with newer Java version than runtime.
Solution: Ensure runtime Java version >= compile version.
# Check versions
java -version # Runtime
./gradlew -version # Compile (uses toolchain)Cause: Attempting to start server twice.
Solution: Only call server.start() once, or stop before restarting.
Symptom: CLI displays "Cannot connect to Argus server".
Solutions:
-
Verify server is running
curl http://localhost:9202/health
-
Check host and port
argus --host 192.168.1.100 --port 9202
-
Firewall blocking connection
- Ensure port 9202 is accessible from the CLI host
Symptom: CLI connects but all metrics show 0.
Cause: The monitored application may be idle.
Solution: Generate some load on the application and metrics will appear.
Symptom: Dashboard shows "Enable profiling" placeholder.
Solutions:
-
Enable profiling
java -javaagent:argus-agent.jar \ -Dargus.profiling.enabled=true \ -jar your-app.jar -
Wait for data β flame graph needs a few seconds of sampling data
-
Check CDN access β flame graph requires loading d3-flamegraph from CDN (cdn.jsdelivr.net)
Symptom: Flame graph reflects historical data, not current activity.
Solution: The flame graph auto-resets every 60 seconds. Use the Reset button to clear immediately and start fresh. Use the Pause button to freeze the current view.
Symptom: OTLP enabled but collector receives nothing.
Checklist:
-
Verify OTLP is enabled
curl http://localhost:9202/config # Should show "otlpEnabled": true -
Check endpoint URL β must include
/v1/metricspath-Dargus.otlp.endpoint=http://localhost:4318/v1/metrics
-
Check collector is running
curl http://localhost:4318/v1/metrics
-
Check auth headers if using authenticated endpoint
-Dargus.otlp.headers=Authorization=Bearer\ mytoken
If you're still experiencing issues:
-
Search existing issues: GitHub Issues
-
Create a new issue with:
- Java version (
java -version) - OS and version
- Argus version
- Steps to reproduce
- Full error message/stack trace
- Java version (
-
Contact maintainer: @rlaope
Enable verbose logging for debugging:
java -javaagent:argus-agent.jar \
-Djava.util.logging.config.file=logging.properties \
-jar app.jarlogging.properties:
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
io.argus.level=FINE