Learn how to configure or relocate socket files used by Redis Software. This article covers the default socket file paths based on version, how to set a custom path during installation, and the supported methods for migrating to a new socket location in an existing cluster. You'll also find guidance on troubleshooting common issues and helpful links.
Default Socket File Locations
-
RS < 5.2.2: Defaults to
/tmp -
RS ≥ 5.2.2: Defaults to
/var/opt/redislabs/run
Note: Upgrades from pre-5.2.2 do not automatically migrate socket files. Manual changes are required.
Specify Socket File Location During Installation
During a fresh Redis install, set a custom socket file location with:
sudo ./install.sh -s /path/to/socket/files
Ensure the target directory exists and is writable by the redislabs user.
Change Socket File Location for an Existing Cluster
Post-bootstrap socket path changes are not supported directly. Use one of these supported methods:
A. Replace Nodes One-by-One
- Install RS on a new node using the
-soption. - Add the new node to the cluster.
- Remove an old node.
- Repeat until all nodes use the new socket path.
B. Migrate Using Replica Of
- Create a new cluster with the desired socket path.
- Use
Replica Ofto replicate data from the old cluster. - Transition production traffic to the new cluster.
Do not use rlutil to change socket paths—it is deprecated and unsupported.
When Socket File Location Becomes an Issue
Common scenarios:
- Changing path on bootstrapped nodes (unsupported)
- Post-upgrade path mismatches
- PDNS or cluster failures due to invalid socket references
- Errors like:
Failed opening Unix socket: bind: No such file or directory
These issues often require node migration or manual remediation.
Troubleshooting Checklist
- Confirm socket file exists and is accessible
- Verify ownership (
redislabs:redislabs) and permissions - Ensure all nodes use the same socket path
- Search logs for
No such file or directoryerrors - Confirm configuration consistency after upgrade or restore
Best Practices & Takeaways
- Always configure socket path during installation
- Avoid modifying socket paths after cluster bootstrap
- For required changes, replace nodes or migrate clusters using supported methods
- Monitor documentation updates to reflect field learnings
Additional Resources
0 comments
Please sign in to leave a comment.