You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the community.general.redis_info module only support TCP/IP, if /etc/redis/redis.conf is edited to change the port and unixsocket lines:
# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
# port 6379
port 0
# Unix socket.
#
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
# unixsocket /run/redis/redis-server.sock
unixsocket /run/redis/redis-server.sock
# unixsocketperm 700
Then the module fails with:
unable to connect to database: Error 111 connecting to localhost:6379. Connection refused.
I'd like to suggest adding a login_socket or some such variable to the module.
Issue Type
Feature Idea
Component Name
redis
Additional Information
If the port is set to 0 the module still tries to connect using TCP/IP, for example:
- name: Get server informationcommunity.general.redis_info:
login_port: 0
Returns:
unable to connect to database: Error 111 connecting to localhost:0. Connection refused.
If the host is set to a socket path, as is the case for some client configuration, for example Nextcloud for example:
- name: Get server informationcommunity.general.redis_info:
login_host: /run/valkey/valkey-server.socklogin_port: 0
Returns:
unable to connect to database: Error -2 connecting to /run/valkey/valkey-server.sock:0.
Name or service not known.
And if the port is not specified the default is used, for example:
- name: Get server informationcommunity.general.redis_info:
login_host: /run/valkey/valkey-server.sock
Returns:
unable to connect to database: Error -2 connecting to /run/valkey/valkey-server.sock:6379.
Name or service not known.
Note I actually tested this with Valkey from Debian Bookworm Backports but I'm fairly confident that the same result would be returned with Redis.
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
Summary
Currently the community.general.redis_info module only support TCP/IP, if
/etc/redis/redis.conf
is edited to change theport
andunixsocket
lines:Then the module fails with:
I'd like to suggest adding a
login_socket
or some such variable to the module.Issue Type
Feature Idea
Component Name
redis
Additional Information
If the port is set to
0
the module still tries to connect using TCP/IP, for example:Returns:
If the host is set to a socket path, as is the case for some client configuration, for example Nextcloud for example:
Returns:
And if the port is not specified the default is used, for example:
Returns:
Note I actually tested this with Valkey from Debian Bookworm Backports but I'm fairly confident that the same result would be returned with Redis.
Code of Conduct
The text was updated successfully, but these errors were encountered: