title: Hapi catbox not able to connect to redis server
body: <p>First of all, I would like to say that I'm new to Hapi so don't judge me hard.</p>
  
  <p>I am following <a href="https://hapi.dev/tutorials/caching/?lang=en_US" rel="nofollow noreferrer">this tutorial</a> trying to set up server-side caching based on Redis using <code>catbox</code> and <code>catbox-redis</code> <code>npm</code> packages, and I get the following error:</p>
  
  <pre><code>{
    reason: Error: Connection is closed.
        at Redis.connectionCloseHandler (/home/yuriy/dev/sources/all/hapi-getting-started/node_modules/ioredis/built/redis/index.js:305:24)
        at Object.onceWrapper (events.js:300:26)
        at Redis.emit (events.js:210:5)
        at processTicksAndRejections (internal/process/task_queues.js:75:11)
  }
  </code></pre>
  
  <p>As you can see it says that error is in <code>ioredis</code> (v4.14.1 according to package-lock.json) package which is dependency of <code>catbox-redis</code>.</p>
  
  <p>I have Redis server running locally.</p>
  
  <pre><code>username@my-computer:~$ redis-cli -v
  redis-cli 4.0.9
  username@my-computer:~$ redis-cli 
  127.0.0.1:6379&gt; ping
  PONG
  </code></pre>
  
  <p>Here is my <code>package.json</code>:</p>
  
  <pre><code>{
    "name": "hapi-getting-started",
    "version": "1.0.0",
    "description": "",
    "main": "src/index.ts",
    "scripts": {
      "build": "rimraf dist &amp;&amp; tsc",
      "start": "rimraf dist &amp;&amp; tsc &amp;&amp; node dist/index.js",
      "dev": "tsc -w | nodemon dist/index.js"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
      "@hapi/catbox": "^10.2.3",
      "@hapi/catbox-redis": "^5.0.5",
      "@hapi/hapi": "^18.4.0",
      "rimraf": "^3.0.0",
      "typescript": "^3.7.2"
    },
    "devDependencies": {
      "@types/hapi__catbox": "^10.2.2",
      "@types/hapi__catbox-redis": "^5.0.0",
      "@types/hapi__hapi": "^18.2.6",
      "@types/node": "^12.12.14",
      "nodemon": "^2.0.1"
    }
  }
  </code></pre>
  
  <p>And here is my <code>src/index.ts</code>:</p>
  
  <pre><code>const Hapi = require('@hapi/hapi');
  const CatboxRedis = require('@hapi/catbox-redis');
  
  console.log(`Running environment ${process.env.NODE_ENV || 'dev'}`);
  
  // Catch uncaught exceptions
  process.on('uncaughtException', (error: Error) =&gt; {
    console.error(`uncaughtException ${error.message}`);
    console.error({ reason });
  });
  
  // Catch unhandled rejected promises
  process.on('unhandledRejection', (reason: any) =&gt; {
    console.error(`unhandledRejection ${reason}`);
    console.error({ error });
  });
  
  const init = async () =&gt; {
    const server = Hapi.server({
      host: 'localhost',
      port: 8000,
      cache: {
        name: 'redis-cache',
        provider: {
          constructor: CatboxRedis,
          options: {
            partition: 'my_cached_data',
            tls: {},
          },
        },
      },
    });
  
    await server.start();
    console.log('Server running on %s', server.info.uri);
  };
  
  init();
  </code></pre>
  
  <p>Any ideas what I am doing wrong? I've spent a lot of time on this issue so any help would be very appreciated.</p>