{"action":"closed","issue":{"url":"https://api.github.com/repos/twitter/twemproxy/issues/374","labels_url":"https://api.github.com/repos/twitter/twemproxy/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/twitter/twemproxy/issues/374/comments","events_url":"https://api.github.com/repos/twitter/twemproxy/issues/374/events","html_url":"https://github.com/twitter/twemproxy/issues/374","id":89048398,"number":374,"title":"Got Error: Server closed the connection","user":{"login":"lscgzwd","id":7054255,"avatar_url":"https://avatars.githubusercontent.com/u/7054255?v=3","gravatar_id":"","url":"https://api.github.com/users/lscgzwd","html_url":"https://github.com/lscgzwd","followers_url":"https://api.github.com/users/lscgzwd/followers","following_url":"https://api.github.com/users/lscgzwd/following{/other_user}","gists_url":"https://api.github.com/users/lscgzwd/gists{/gist_id}","starred_url":"https://api.github.com/users/lscgzwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lscgzwd/subscriptions","organizations_url":"https://api.github.com/users/lscgzwd/orgs","repos_url":"https://api.github.com/users/lscgzwd/repos","events_url":"https://api.github.com/users/lscgzwd/events{/privacy}","received_events_url":"https://api.github.com/users/lscgzwd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-17T15:24:55Z","updated_at":"2015-06-17T15:40:29Z","closed_at":"2015-06-17T15:40:29Z","body":"I used the latest source build.\r\n\r\nmysql yml config file:\r\n\r\n[root@10-10-13-39 ~]# cat /usr/local/twemproxy/conf/nutcracker.yml \r\nleaf:\r\n  listen: /dev/shm/redis\r\n  hash: fnv1a_64\r\n  preconnect: true\r\n  distribution: ketama\r\n  auto_eject_hosts: true\r\n  server_retry_timeout: 30000\r\n  server_failure_limit: 3\r\n  servers:\r\n   - 127.0.0.1:6379:1\r\n\r\nstart command:\r\n[root@10-10-13-39 twemproxy]# /usr/local/twemproxy/sbin/nutcracker -c /usr/local/twemproxy/conf/nutcracker.yml -p /usr/local/twemproxy/run/redisproxy.pid \r\n[2015-06-17 23:17:51.632] nc.c:187 nutcracker-0.4.0 built for Linux 2.6.32-431.11.7.el6.ucloud.x86_64 x86_64 started on pid 13765\r\n[2015-06-17 23:17:51.633] nc.c:192 run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one\r\n\r\nredis-cli:\r\n\r\n[root@10-10-13-39 ~]# redis-cli -s /dev/shm/redis\r\nredis /dev/shm/redis> set a 0\r\nError: Server closed the connection\r\nredis /dev/shm/redis> select 0\r\nError: Server closed the connection\r\nredis /dev/shm/redis> SET A 0\r\nError: Server closed the connection\r\nredis /dev/shm/redis> SELECT 0\r\nError: Server closed the connection\r\nredis /dev/shm/redis> auth\r\nError: Server closed the connection\r\n\r\n\r\nstrace log:\r\n\r\nProcess 13765 attached - interrupt to quit\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554334, 844951}, NULL) = 0\r\nread(8, \"*1\\r\\n$3\\r\\nset\\r\\n\", 16336)   = 13\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554334, 845105}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554334, 845443}, NULL) = 0\r\nread(8, \"*1\\r\\n$3\\r\\nset\\r\\n\", 16336)   = 13\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554334, 845572}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554339, 180301}, NULL) = 0\r\nread(8, \"*3\\r\\n$3\\r\\nset\\r\\n$1\\r\\na\\r\\n$1\\r\\n0\\r\\n\", 16336) = 27\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554339, 180432}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554342, 212131}, NULL) = 0\r\nread(8, \"*2\\r\\n$6\\r\\nselect\\r\\n$1\\r\\n0\\r\\n\", 16336) = 23\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554342, 212235}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554345, 771093}, NULL) = 0\r\nread(8, \"*3\\r\\n$3\\r\\nSET\\r\\n$1\\r\\nA\\r\\n$1\\r\\n0\\r\\n\", 16336) = 27\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554345, 771207}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554349, 142041}, NULL) = 0\r\nread(8, \"*2\\r\\n$6\\r\\nSELECT\\r\\n$1\\r\\n0\\r\\n\", 16336) = 23\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554349, 142145}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753264, u64=12753264}}}, 1024, 30000) = 1\r\naccept(7, 0, NULL)                      = 8\r\nfcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)\r\nfcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0\r\nepoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\naccept(7, 0, NULL)                      = -1 EAGAIN (Resource temporarily unavailable)\r\nepoll_wait(4, {{EPOLLOUT, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\nepoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLET, {u32=12753536, u64=12753536}}) = 0\r\nepoll_wait(4, {{EPOLLIN, {u32=12753536, u64=12753536}}}, 1024, 30000) = 1\r\ngettimeofday({1434554350, 915098}, NULL) = 0\r\nread(8, \"*1\\r\\n$4\\r\\nauth\\r\\n\", 16336)  = 14\r\ngetpeername(8, {sa_family=AF_FILE, NULL}, [2]) = 0\r\nepoll_ctl(4, EPOLL_CTL_DEL, 8, NULL)    = 0\r\ngettimeofday({1434554350, 915213}, NULL) = 0\r\nclose(8)                                = 0\r\nepoll_wait(4, {}, 1024, 30000)          = 0\r\nepoll_wait(4, {}, 1024, 30000)          = 0\r\nepoll_wait(4, {}, 1024, 30000)          = 0"}}