From 90f5a2371eb74729be13643f2690fed155079f46 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 22 Nov 2025 23:26:30 -0800 Subject: [PATCH] debug: add DNS verification and disable Java DNS caching Troubleshooting 'seaweedfs-volume: Temporary failure in name resolution': docker-compose.yml changes: - Add MAVEN_OPTS to disable Java DNS caching (ttl=0) Java caches DNS lookups which can cause stale results - Add ping tests before mvn test to verify DNS resolution Tests: ping -c 1 seaweedfs-volume && ping -c 1 seaweedfs-filer - This will show if DNS works before tests run workflow changes: - List Docker networks before running tests - Shows network configuration for debugging - Helps verify spark-tests joins correct network If ping succeeds but tests fail, it's a Java/Maven DNS issue. If ping fails, it's a Docker networking configuration issue. Note: Previous test failures may be from old code before Docker networking fix. --- .github/workflows/spark-integration-tests.yml | 3 +++ test/java/spark/docker-compose.yml | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spark-integration-tests.yml b/.github/workflows/spark-integration-tests.yml index 285312202..5c916b6bb 100644 --- a/.github/workflows/spark-integration-tests.yml +++ b/.github/workflows/spark-integration-tests.yml @@ -189,6 +189,9 @@ jobs: working-directory: test/java/spark run: | echo "Running Spark integration tests in Docker container..." + echo "Docker networks:" + docker network ls + echo "Starting spark-tests container (will start dependencies automatically)..." docker compose up --abort-on-container-exit --exit-code-from spark-tests spark-tests echo "✓ Tests completed" diff --git a/test/java/spark/docker-compose.yml b/test/java/spark/docker-compose.yml index a170d7464..39d32b7d0 100644 --- a/test/java/spark/docker-compose.yml +++ b/test/java/spark/docker-compose.yml @@ -79,7 +79,9 @@ services: - SEAWEEDFS_FILER_PORT=8888 - SEAWEEDFS_FILER_GRPC_PORT=18888 - HADOOP_HOME=/tmp - command: sh -c "sleep 30 && mvn test" + # Disable Java DNS caching to ensure fresh DNS lookups + - MAVEN_OPTS=-Dsun.net.inetaddr.ttl=0 -Dnetworkaddress.cache.ttl=0 + command: sh -c "sleep 30 && ping -c 1 seaweedfs-volume && ping -c 1 seaweedfs-filer && mvn test" depends_on: seaweedfs-filer: condition: service_healthy