This guide addresses common issues encountered when setting up and running ARAT-RL.
Symptoms: command not found: mvn
Solutions:
- Ubuntu:
sudo apt-get install maven - macOS:
brew install maven - Verify:
mvn -version
Symptoms: Build failures, version mismatch errors
Solutions:
- Install both Java 8 and 11
- Use environment files:
source ./java8.env # For JDK 8 services source ./java11.env # For JDK 11 services
- Verify correct version:
java -version mvn -version
Symptoms: Services fail to start, database connection errors
Solutions:
- Start Docker Desktop
- Verify Docker is running:
docker ps - Test Docker:
docker run hello-world
Symptoms: mvn clean install fails with errors
Common Causes & Solutions:
-
Memory Issues:
export MAVEN_OPTS="-Xmx4g -XX:MaxPermSize=512m" mvn clean install -DskipTests
-
Dependency Resolution:
mvn clean install -DskipTests -U
-
Network Issues:
mvn clean install -DskipTests -o # Offline mode -
Java Version Mismatch:
# Check and set correct Java version export JAVA_HOME=/path/to/correct/java export PATH=$JAVA_HOME/bin:$PATH mvn clean install -DskipTests
Symptoms: Services fail to start, classpath errors
Solutions:
-
Verify all services built successfully:
find service -name "cp.txt" -type f # Should show 6 files
-
Rebuild missing services:
cd service/jdk8_1 mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
Symptoms: Dependency resolution errors, version conflicts
Solutions:
- Check Spring Boot versions in pom.xml files
- Update conflicting dependencies manually
- Use
mvn dependency:treeto identify conflicts
Symptoms: Services fail to start, connection refused errors
Diagnostic Steps:
-
Check Docker containers:
docker ps -a
-
Check port availability:
lsof -i :30100 # Check specific port netstat -an | grep LISTEN
-
Check tmux sessions:
tmux list-sessions
-
Check service logs:
tmux attach -t service_name
Symptoms: MongoDB/MySQL connection failures
Solutions:
-
Start required Docker containers:
docker run --name=gn-mongo --restart=always -p 27018:27017 -d genomenexus/gn-mongo:latest docker run -d -p 27019:27017 --name mongodb mongo:latest docker run -d -p 3306:3306 --name mysqldb -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=users mysql
-
Wait for containers to be ready (30 seconds)
-
Verify connections:
docker logs gn-mongo docker logs mongodb docker logs mysqldb
Symptoms: "Address already in use" errors
Solutions:
-
Find processes using ports:
lsof -i :30100
-
Kill conflicting processes:
kill -9 <PID>
-
Or use different ports by modifying the configuration
Symptoms: Coverage/bug counts don't match published results
Common Causes:
- Java Version Differences: Use exact versions specified in environment files
- Missing Coverage: Ensure JaCoCo agent is properly configured
- Service Configuration: Verify all services use the same configuration as in the paper
- Environment Variables: Ensure consistent environment setup
Verification Steps:
- Check Java versions match requirements
- Verify all cp.txt files exist
- Ensure Docker containers are running
- Test with single service first
- Compare with known working setup
Symptoms: Zero or incorrect coverage metrics
Solutions:
- Verify JaCoCo agent configuration
- Check coverage collection scripts
- Ensure services are instrumented correctly
- Verify coverage ports are accessible
-
Java Path Issues:
# Use /usr/libexec/java_home to find correct paths /usr/libexec/java_home -v 1.8 /usr/libexec/java_home -v 11 -
Permission Issues:
# Grant necessary permissions sudo chmod +x setup_macos.sh -
Homebrew Issues:
# Update Homebrew brew update && brew upgrade
-
Package Repository Issues:
sudo apt-get update sudo apt-get upgrade
-
Java Installation Issues:
sudo apt-get install openjdk-8-jdk openjdk-11-jdk sudo update-alternatives --config java
-
Check Prerequisites:
- Java 8 and 11 installed
- Maven installed
- Docker running
- All dependencies installed
-
Verify Setup:
- All cp.txt files exist
- Java environment files are correct
- Docker containers are running
- No port conflicts
-
Test Basic Functionality:
# Test single service python3 run_service.py features-service 11000 blackbox # Check service health curl http://localhost:30100/health
-
Collect Information:
- OS version and architecture
- Java versions (
java -version,mvn -version) - Docker version (
docker --version) - Error messages and logs
- Steps taken to reproduce the issue
# Check service status
tmux list-sessions
# Check Docker containers
docker ps -a
# Check port usage
lsof -i :30100
# Check Java environment
echo $JAVA_HOME
java -version
# Check Maven environment
mvn -version
# Verify build artifacts
find service -name "cp.txt" -type f- Service logs: Check tmux sessions
- Docker logs:
docker logs <container_name> - Maven logs: Check console output during build
- Python logs: Check console output during tool execution
- Install Maven:
brew install maven(macOS) orsudo apt-get install maven(Ubuntu)
- Set JAVA_HOME:
export JAVA_HOME=/path/to/java - Use environment files:
source ./java8.env
- Check if service is running:
tmux list-sessions - Check port availability:
lsof -i :port - Restart service if needed
- Start Docker Desktop
- Verify:
docker ps
- Rebuild service:
mvn dependency:build-classpath -Dmdep.outputFile=cp.txt - Check if build was successful:
mvn clean install -DskipTests