KeyDB
KeyDB copied to clipboard
6.3.4 version does not support hotname as announced IP in sentinel
Reading the configuration file, at line 40
'sentinel announce-ip "web5"' sentinel directive while not in sentinel mode
It used to work up until latest update but now it has stopped. resolve-hostname is (and was) enabled.
the error message you provided states that you are not running in sentinel mode, have you tried running keydb-sentinel
Correct, sentinel does not start due to that error. If I change sentinel config line 'sentinel announce-ip "web5"' to have IP address - it does start.
The error message you provided states that you are providing a sentinel config while not in sentinel mode, I would double check that you are correctly calling keydb-sentinel, otherwise I was unable to reproduce this on amd64 ubuntu 22.04(i.e. 'sentinel announce-ip "web5"' did not cause any errors), could you provide more details about your setup where you see this.
I see that latest update has overwritten my Sentinel service /lib/systemd/system/keydb-sentinel.service file and has changed owner user to default one.
I did not expect it to be overwritten without asking but now I know that it is best to leave service file unchanged. This is not a bug but seemed like a bug initially as keydb user could not read and write all files properly due to such a change.
I have set my config files to use default user now to be compatible with such a change.
Sentinel and keydb-server starts now but in a strange way. When I issue a command systemctl start keydb-server service initiated with systemctl start on Ubuntu 22 does not exit back to the command line immediately but instead "hangs" until you press Ctrl+C. The log files show that server and sentinel are running fine:
2131850:2131850:X 10 Nov 2023 04:43:57.155 # oO0OoO0OoO0Oo KeyDB is starting oO0OoO0OoO0Oo
2131850:2131850:X 10 Nov 2023 04:43:57.155 # KeyDB version=6.3.4, bits=64, commit=00000000, modified=0, pid=2131850, just started
2131850:2131850:X 10 Nov 2023 04:43:57.155 # Configuration loaded
2131850:2131850:X 10 Nov 2023 04:43:57.155 * monotonic clock: POSIX clock_gettime
2131850:2131850:X 10 Nov 2023 04:43:57.156 * Running mode=sentinel, port=26389.
2131850:2131850:X 10 Nov 2023 04:43:57.156 # Sentinel ID is 28f940d3a558d15316136a70edce6144fd703279
2131850:2131850:X 10 Nov 2023 04:43:57.156 # +monitor master mymaster web1 6389 quorum 2
2131850:2131863:X 10 Nov 2023 04:43:57.156 * Thread 0 alive.
2131850:2131863:X 10 Nov 2023 04:43:58.164 # +sdown master mymaster web1 6389
If service file is the default one with no modifications - why it does not exit back to command line after starting the service?
This happens with both:
systemctl start keydb-sentinel systemctl start keydb-server
And status shows it is activating:
sudo service keydb-server status;
● keydb-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/keydb-server.service; enabled; vendor preset: enabled)
Active: activating (start) since Fri 2023-11-10 04:53:57 EST; 24s ago
Docs: https://docs.keydb.dev,
man:keydb-server(1)
Cntrl PID: 2177431 (keydb-server)
Tasks: 13 (limit: 618865)
Memory: 6.1M
CPU: 276ms
CGroup: /system.slice/keydb-server.service
└─2177431 "/usr/bin/keydb-server -10.10.10.10:6389" "" "" "" ""
sudo service keydb-sentinel status;
● keydb-sentinel.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/keydb-sentinel.service; enabled; vendor preset: enabled)
Active: activating (start) since Fri 2023-11-10 04:54:30 EST; 1min 5s ago
Docs: https://docs.keydb.dev,
man:keydb-sentinel(1)
Cntrl PID: 2180242 (keydb-sentinel)
Tasks: 10 (limit: 618865)
Memory: 5.1M
CPU: 226ms
CGroup: /system.slice/keydb-sentinel.service
└─2180242 "/usr/bin/keydb-sentinel -10.10.10.10:26389 [sentinel]"