Troubleshooting BlueFish File Mirror: Common Issues and Fixes
BlueFish File Mirror is a tool for mirroring files between systems. When it misbehaves, problems typically fall into a few repeatable categories: connectivity, permissions, configuration, performance, and data integrity. Below are common symptoms, root causes, and step-by-step fixes to get your mirrors healthy again.
1. Connection failures / sync not starting
Symptoms:
- Mirror job remains in “queued” or “failed” state.
- Remote host unreachable or timeouts.
Likely causes:
- Network outage, DNS issues, firewall blocking, wrong host/port, SSH key or credential problems.
Fixes:
- Check basic network reachability
- Ping the remote host:
ping remote-host - Test port:
telnet remote-host 22ornc -vz remote-host 22
- Ping the remote host:
- Verify DNS
- Resolve the hostname:
nslookup remote-hostordig remote-host - Use IP directly in config to rule out DNS.
- Resolve the hostname:
- Check firewall rules
- Ensure required ports (SSH/rsync/HTTP) are open on both ends and any intermediate firewall.
- Validate credentials
- Manually SSH to the remote host using the same user/key:
ssh -i /path/key user@remote-host - If using password auth, confirm the password and that password auth is enabled server-side.
- Manually SSH to the remote host using the same user/key:
- Confirm service endpoints
- If connecting to an API or daemon, ensure the service is running and listening:
systemctl status service-nameandss -tuln | grep :PORT.
- If connecting to an API or daemon, ensure the service is running and listening:
2. Authentication errors
Symptoms:
- “Permission denied”, “Authentication failed”, or repeated password prompts.
Likely causes:
- Wrong SSH key, missing key on server, expired credentials, incorrect permissions on key files.
Fixes:
- Permissions on SSH key
- Ensure private key has strict permissions:
chmod 600 /path/to/key
- Ensure private key has strict permissions:
- Public key on remote
- Confirm the public key exists in
~/.ssh/authorized_keysfor the target user.
- Confirm the public key exists in
- Agent and passphrase
- If using ssh-agent, ensure the key is loaded:
ssh-add -l - If using passphrase-protected keys in unattended jobs, consider using an agent or key without passphrase secured by OS protections.
- If using ssh-agent, ensure the key is loaded:
- Credential expiration
- Rotate or renew expired credentials (API tokens, service accounts).
- Logs
- Inspect server auth logs:
/var/log/auth.logor/var/log/securefor hints.
- Inspect server auth logs:
3. Permission denied on files or directories
Symptoms:
- Errors like “Permission denied” when reading or writing files during sync.
Likely causes:
- Mirror process runs as a user without rights, ACL issues, immutable flags, SELinux/AppArmor restrictions.
Fixes:
- Confirm user and permissions
- Identify the mirror service user and run:
sudo -u mirror-user ls -l /path/to/files
- Identify the mirror service user and run:
- Fix ownership and mode
- Chown/chmod as appropriate:
chown -R correctuser:group /mirror/pathandchmod -R 750 /mirror/path
- Chown/chmod as appropriate:
- Check ACLs
- List ACLs:
getfacl /path/to/file - Remove or update ACL entries if necessary.
- List ACLs:
- SELinux/AppArmor
- Check SELinux mode:
getenforceand relevant audit logs (/var/log/audit/audit.log). Temporarily set to permissive for testing:setenforce 0(restore after test). - For AppArmor, check profiles and logs.
- Check SELinux mode:
- Immutable flags
- Check and remove immutable flag:
lsattr /pathandchattr -i /path/to/file.
- Check and remove immutable flag:
4. Partial or corrupted files after sync
Symptoms:
- Files truncated, checksum mismatches, or corrupted content.
Likely causes:
- Interrupted transfers, disk space issues, file locking, or protocol mismatches.
Fixes:
- Check disk space
- On both ends:
df -handdf -ifor inodes.
- On both ends:
- Retry with checksums
- Use rsync-style checksum verification where possible (e.g.,
rsync –checksum).
- Use rsync-style checksum verification where possible (e.g.,
- Atomic updates
- Configure mirror to write to a temporary file then rename to avoid partial reads.
- Increase timeout and retry
- Lengthen timeouts and enable retries to avoid interruptions.
- Verify transfer protocol
- Ensure both ends use compatible protocol versions and options (binary mode for FTP, correct rsync flags).
- Run integrity checks
- Compare checksums before and after:
sha256sum fileon both sides.
- Compare checksums before and after:
5. Performance slowdowns
Symptoms:
- Syncs take much longer than expected or saturate CPU/disk.
Likely causes:
- Network congestion, high IO on source/target, inefficient configuration (e.g., single-threaded, small packet sizes).
Fixes:
- Measure baseline
- Use iperf for network, iostat/top/vmstat for system IO/CPU.
- Enable parallelism
- Increase parallel file transfers or threads if supported by BlueFish File Mirror.
- Tune rsync/transfer options
- Use compression only when CPU allows (
-z), adjust block size, enable pipelining.
- Use compression only when CPU allows (
- Network tuning
- Increase TCP window sizes, enable jumbo frames (if supported).
- Off-peak windows
- Schedule heavy syncs during low-usage periods.
- Avoid small-file overhead
- Bundle small files into archives for transport, then extract remotely.
6. Configuration errors or unexpected behavior after updates
Symptoms:
- Jobs that previously worked now fail after upgrading or config changes.
Likely causes:
- Config syntax changes, deprecated options, defaults changed in new versions.
Fixes:
- Review release notes
- Check changelogs for breaking changes and updated options.
- Validate config syntax
- Run any provided config-check tools or test commands.
- Revert to known good config
- Temporarily roll back to previous config/version to confirm the update caused the issue.
- Migrate settings
- Update configuration to new schema; follow vendor migration guides.
7. Logs empty or not helpful
Symptoms:
- Lack of useful logs for diagnosing failures.
Fixes:
- Increase log level
- Set debug or verbose logging in the service config.
- Centralize logs
- Send logs to syslog/journal or remote logging for easier correlation.
- Correlate timestamps
- Ensure clocks are synced via NTP/chrony on both ends.
- Capture packet traces
- When necessary, capture traffic with tcpdump for protocol-level debugging.
8. Jobs stuck in queue or duplicate runs
Symptoms:
- Multiple concurrent runs for same job, or jobs never start.
Likely causes:
- Locking mechanism failed, job cleanup not executed, or scheduler misconfiguration.
Fixes:
- Inspect lock files
- Remove stale lock files after confirming no active process.
- Check scheduler settings
- Ensure cron/systemd timers or internal scheduler aren’t overlapping jobs.
- Enforce single-run
- Use PID files or atomic lock mechanisms to prevent duplicates.
- Graceful cleanup
- Configure timeouts and cleanup routines for failed jobs.
Quick checklist for any mirror problem
- Verify network and DNS.
- Confirm credentials and permissions.
- Check disk space and resource utilization.
- Inspect and increase logging for clues.
- Retry with checksum/verification enabled.
- Consult release notes after upgrades.
If the problem persists, collect these artifacts before seeking vendor support:
- Mirror service logs (with timestamps).
- System logs (auth, syslog/journal).
- Output from:
df -h,ss -tuln,ps aux | grep bluefish, andsha256sumof problematic files. - Exact config file and version information.
Leave a Reply