{"record":{"id":"776f36e755881078","repo":"Crosstalk-Solutions/project-nomad","slug":"warning-during-volume-cleanup-check-server-logs-f","errorCode":null,"errorMessage":"Warning during volume cleanup. Check server logs for details.","messagePattern":"Warning during volume cleanup\\. Check server logs for details\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"admin/app/services/docker_service.ts","lineNumber":447,"sourceCode":"\n        for (const vol of serviceVolumes) {\n          try {\n            const volume = this.docker.getVolume(vol.Name)\n            await volume.remove({ force: true })\n            this._broadcast(serviceName, 'volume-removed', `Removed volume: ${vol.Name}`)\n          } catch (error: any) {\n            logger.warn(`Failed to remove volume ${vol.Name}: ${error.message}`)\n          }\n        }\n\n        if (serviceVolumes.length === 0) {\n          this._broadcast(serviceName, 'no-volumes', `No volumes found to clear`)\n        }\n      } catch (error: any) {\n        logger.warn({ err: error }, `[DockerService] Error during volume cleanup for ${serviceName}`)\n        this._broadcast(\n          serviceName,\n          'volume-cleanup-warning',\n          'Warning during volume cleanup. Check server logs for details.'\n        )\n      }\n\n      // Step 4: Mark service as uninstalled\n      service.installed = false\n      service.installation_status = 'installing'\n      await service.save()\n      this.invalidateServicesStatusCache()\n\n      // Step 5: Recreate the container\n      this._broadcast(serviceName, 'recreating', `Recreating container...`)\n      const containerConfig = this._parseContainerConfig(service.container_config)\n\n      // Execute installation asynchronously and handle cleanup\n      this._createContainer(service, containerConfig).catch(async (error) => {\n        logger.error(`Reinstallation failed for ${serviceName}: ${error.message}`)\n        await this._cleanupFailedInstallation(serviceName)","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/Crosstalk-Solutions/project-nomad/blob/0bd1c6f4f9888d577fe232de06ac144bb8337131/admin/app/services/docker_service.ts#L429-L465","documentation":"In forceReinstall, after container cleanup the volume-clearing step (docker.listVolumes + remove) is wrapped in a catch that logs the error and broadcasts a volume-cleanup-warning without aborting the reinstall. This means old persisted data may survive the reinstall. The underlying cause (volume in use, permission denied, daemon error) appears only in the server log entry [DockerService] Error during volume cleanup.","triggerScenarios":"Force-reinstalling a service whose volumes are still attached to a running container (container removal failed or raced), volumes held by another container, or the Docker daemon denying volume removal. Empty volume list is handled gracefully (no-volumes); only actual list/remove errors trigger this.","commonSituations":"External Compose stack or another container mounting the same named volume; container cleanup warning (error 268) preceded this so the container still holds the volumes; Docker root permissions mismatch after daemon config change; NFS/bind-mount backed volumes that cannot be removed.","solutions":["Check server logs for the exact volume cleanup error","Ensure no container is using the volumes: docker ps -a --filter volume=<name>, stop/remove it (docker rm -f), then retry","Remove volumes manually: docker volume rm <service-volumes>, then re-run force-reinstall","Verify Docker daemon health and volume driver availability"],"exampleFix":"// before\n// force-reinstall with stale volumes in use\n// after\nawait exec('docker rm -f my-service') // free the volumes first\nawait exec('docker volume rm my-service-data')\nawait adminApi.forceReinstall('my-service')","handlingStrategy":"fallback","validationCode":"// Ensure nothing holds the volumes before reinstalling\nconst inUse = await exec(`docker ps -q --filter volume=${volumeName}`)\nif (inUse.stdout.trim()) {\n  await exec(`docker rm -f $(docker ps -q --filter volume=${volumeName})`)\n}\nawait adminApi.forceReinstall(service)","typeGuard":"const isVolumeCleanupWarning = (evt: { event?: string }): boolean =>\n  evt.event === 'volume-cleanup-warning'\n\nif (isVolumeCleanupWarning(msg)) warnUser('Old data may persist after reinstall; check server logs')","tryCatchPattern":null,"preventionTips":["Remember the warning is non-fatal but stale data may survive — verify data reset after reinstall if that matters","Handle both cleanup-warning and volume-cleanup-warning events in the install progress UI","If persistent-data reset is required, remove volumes manually before force-reinstall"],"tags":["docker","volumes","cleanup","force-reinstall"],"backgroundTag":"docker-volume-removal-failed","analyzedSha":"0bd1c6f4f9888d577fe232de06ac144bb8337131","analyzedAt":"2026-08-27T05:34:15.424Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}