{"id":11861395,"date":"2019-08-23T16:23:53","date_gmt":"2019-08-23T16:23:53","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/redis-connection-test-failed\/"},"modified":"2019-08-23T16:23:53","modified_gmt":"2019-08-23T16:23:53","slug":"redis-connection-test-failed","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/redis-connection-test-failed\/","title":{"rendered":"Redis Connection Test: Failed"},"content":{"rendered":"<p>Hi there, thanks for the great plugin. I&#8217;m new to object cache and Redis, couldn&#8217;t make the connection test pass. Here is the screenshot of the failed connection test: https:\/\/imgur.com\/AkLpYp7 . Here is the result of the &#8220;service redis status&#8221;:<\/p>\n<pre><code>service redis status\n\u25cf redis-server.service - Advanced key-value store\n   Loaded: loaded (\/lib\/systemd\/system\/redis-server.service; enabled; vendor preset: enabled)\n   Active: active (running) since Sat 2019-08-24 00:11:03 CST; 4s ago\n     Docs: http:\/\/redis.io\/documentation,\n           man:redis-server(1)\n  Process: 28764 ExecStop=\/bin\/kill -s TERM $MAINPID (code=exited, status=0\/SUCCESS)\n  Process: 28768 ExecStart=\/usr\/bin\/redis-server \/etc\/redis\/redis.conf (code=exited, status=0\/SUCCESS)\n Main PID: 28784 (redis-server)\n    Tasks: 4 (limit: 1152)\n   CGroup: \/system.slice\/redis-server.service\n           \u2514\u250028784 \/usr\/bin\/redis-server 127.0.0.1:6379\n\nAug 24 00:11:03 shcces2 systemd[1]: Starting Advanced key-value store...\nAug 24 00:11:03 shcces2 systemd[1]: redis-server.service: Can&#039;t open PID file \/var\/run\/redis\/redis-server.pid (yet?) after start: No such file or directory\nAug 24 00:11:03 shcces2 systemd[1]: Started Advanced key-value store.<\/code><\/pre>\n<p>I notice the &#8220;Can&#8217;t open PID file \/var\/run\/redis\/redis-server.pid&#8221; error, but when I look into the \/var\/run folder, I found: <\/p>\n<p><code>drwxr-sr-x  2 redis    www-data   80 Aug 24 00:11 redis\/<\/code><\/p>\n<p>inside it, there is:<\/p>\n<pre><code>-rw-rw----  1 redis www-data    6 Aug 24 00:11 redis-server.pid\nsrwxrwxr-x  1 redis www-data    0 Aug 24 00:11 redis-server.sock=<\/code><\/pre>\n<p>I tried to remove the redis folder and restart redis. The folder will be re-generated with the same content. Is this the cause? How can I fix it?<\/p>\n<p>Here is the result of: ss -lptun | grep 6379<\/p>\n<pre><code>ss -lptun | grep 6379\ntcp    LISTEN   0        128             127.0.0.1:6379           0.0.0.0:*      users:((&quot;redis-server&quot;,pid=28784,fd=6))                                        \ntcp    LISTEN   0        128                 [::1]:6379              [::]:*      users:((&quot;redis-server&quot;,pid=28784,fd=7)) <\/code><\/pre>\n<p>&#8220;telnet localhost 6379&#8221; and &#8220;redis-cli ping&#8221; work fine.<\/p>\n","protected":false},"template":"","class_list":["post-11861395","topic","type-topic","status-publish","hentry","topic-tag-redis"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11861395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11861395\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11861395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}