Skip to content

Memcached not working #450

@urbaman

Description

@urbaman

Hi,

Installed the operator and a 3-replica dragonfly instance.

apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
  labels:
    app.kubernetes.io/name: dragonfly
  name: dragonfly-db
  namespace: dragonfly-db
spec:
  replicas: 3
  memcachedPort: 11211
  nodeSelector:
    workload: database
  resources:
    requests:
      cpu: 500m
      memory: 500Mi
    limits:
      cpu: 600m
      memory: 750Mi

Redis seems to work:

kubectl run -it --rm --restart=Never redis-cli --image=redis -- bash
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
root@redis-cli:/data# redis-cli -h dragonfly-db.dragonfly-db                  
dragonfly-db.dragonfly-db:6379> ping
PONG
dragonfly-db.dragonfly-db:6379>

Memcached does not, only stats seems to work:

kubectl port-forward -n dragonfly-db svc/dragonfly-db 11211:11211
Forwarding from 127.0.0.1:11211 -> 11211
Forwarding from [::1]:11211 -> 11211
Handling connection for 11211
telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SET my_key_db_ZERO 1000
ERROR
^[[A^[[B
ERROR
set foo 1000
ERROR
stats   
STAT pid 7
STAT uptime 1883
STAT time 1769296203
STAT version v1.35.0
STAT libevent epoll
STAT pointer_size 8
STAT rusage_user 14.0218
STAT rusage_system 11.3836
STAT max_connections -1
STAT curr_connections 5
STAT total_connections -1
STAT rejected_connections -1
STAT bytes_read 61846
STAT bytes_written 11026
STAT limit_maxbytes -1
END
SET foo bar
ERROR
select 1
ERROR
select 0
ERROR
R
ERROR
^R
keys *
ERROR
mg foo f v\r\n
EN
VA 2 f30\r\n
ERROR
hi\r\n
ERROR
mg foo f c v N30\r\n
ERROR
ms foo 3 C999
 new\r\nERROR

ERROR

ERROR
ms foo 3 C999
ERROR
ms foo 3
ERROR
mg foo f c v
ERROR

Master replica logs:

kubectl logs -n dragonfly-db dragonfly-db-0
                   .--::--.                   
   :+*=:          =@@@@@@@@=          :+*+:   
  %@@@@@@%*=.     =@@@@@@@@-     .=*%@@@@@@#  
  @@@@@@@@@@@@#+-. .%@@@@#. .-+#@@@@@@@@@@@%  
  -@@@@@@@@@@@@@@@@*:#@@#:*@@@@@@@@@@@@@@@@-  
    :+*********####-%@%%@%-####********++.    
   .%@@@@@@@@@@@@@%:@@@@@@:@@@@@@@@@@@@@@%    
   .@@@@@@@@%*+-:   =@@@@=  .:-+*%@@@@@@@%.   
     =*+-:           ###*          .:-+*=     
                     %@@%                     
I20260124 22:38:40.582020     7 init.cc:127] dragonfly running in opt mode.
I20260124 22:38:40.582193     7 dfly_main.cc:902] Starting dragonfly df-v1.35.0-67c51eb70c5aa16e38ddaa906689e7aa31037590
                     *@@*                     
                     +@@=                     
                     :##:                     
                     :@@:                     
                      @@                      
                      ..                      
* Logs will be written to the first available of the following paths:
/tmp/dragonfly.*
./dragonfly.*
* For the available flags type dragonfly [--help | --helpfull]
* Documentation can be found at: https://www.dragonflydb.io/docs
I20260124 22:38:40.582530     7 dfly_main.cc:944] maxmemory has not been specified. Deciding myself....
I20260124 22:38:40.582551     7 dfly_main.cc:953] Found 750.00MiB available memory. Setting maxmemory to 600.00MiB
W20260124 22:38:40.582613     7 dfly_main.cc:398] Weird error 1 switching to epoll
I20260124 22:38:40.583245     7 proactor_pool.cc:149] Running 1 io threads
I20260124 22:38:40.588227     7 dragonfly_listener.cc:150] SSL version: OpenSSL 3.0.17 1 Jul 2025
I20260124 22:38:40.588810     7 dfly_main.cc:298] Listening on admin socket any:9999
I20260124 22:38:40.590649     7 server_family.cc:1092] Host OS: Linux 6.18.2-talos x86_64 with 1 threads
I20260124 22:38:40.592049     7 snapshot_storage.cc:186] Load snapshot: Searching for snapshot in directory: "/data"
W20260124 22:38:40.592132     7 server_family.cc:1192] Load snapshot: No snapshot found
I20260124 22:38:40.671689    12 listener_interface.cc:102] sock[5] AcceptServer - listening on 0.0.0.0:9999
I20260124 22:38:40.671731    12 listener_interface.cc:102] sock[6] AcceptServer - listening on 0.0.0.0:6379
I20260124 22:38:40.671753    12 listener_interface.cc:102] sock[7] AcceptServer - listening on 0.0.0.0:11211
I20260124 22:38:40.958863    12 version_monitor.cc:174] Your current version '1.35.0' is not the latest version. A newer version '1.36.0' is now available. Please consider an update.
I20260124 22:38:53.063741    12 server_family.cc:3647] Initiate replication with: NO ONE
I20260124 22:39:07.753708    12 dflycmd.cc:749] Registered replica 10.244.8.93:6379
I20260124 22:39:07.761173    12 dflycmd.cc:366] Started sync with replica 10.244.8.93:6379
I20260124 22:39:07.763728    12 dflycmd.cc:423] Transitioned into stable sync with replica 10.244.8.93:6379
I20260124 22:39:22.604485    12 dflycmd.cc:749] Registered replica 10.244.9.153:6379
I20260124 22:39:22.613476    12 dflycmd.cc:366] Started sync with replica 10.244.9.153:6379
I20260124 22:39:22.615561    12 dflycmd.cc:423] Transitioned into stable sync with replica 10.244.9.153:6379
W20260124 23:19:23.796795    12 memcache_parser.cc:281] unknown meta flag: N30\r\n
W20260124 23:20:01.067701    12 memcache_parser.cc:281] unknown meta flag: C999

Am I forgetting something important?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions