D
D
denis_213213212020-10-01 12:16:28
Redis
denis_21321321, 2020-10-01 12:16:28

laravel-echo-server not finding redis?

Laravel-echo-server tries to find BD Redis at 127.0.0.1 ip .

5f759d95cab7c858686331.png

But another ip is entered in .env, by which he should look for it

.env

REDIS_HOST=81.161.127.17
REDIS_PASSWORD=null
REDIS_PORT=6379


Did php artisan config:cachenot help.

Checked if redis is working.

<?php
      $redis = new Redis();
      $redis->connect('81.161.127.17');
      $redis->set('key', 2);
      $value = $redis->get('key');
      var_dump($value);
  ?>


He brought out the data, so he is connected.

Or does laravel-echo-server need to be entered somewhere in a special place?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Krauz, 2020-10-04
@MelancholicTheDie

Laravel echo server is configured through a separate laravel-echo-server.json file.
In it, you can specify which ip and port to search for redis for it, also with the ability to specify a password.
Config example:

"databaseConfig": {
    "redis": {
      "host": "127.0.0.1",
      "password": "123",
      "port": 6379
    }
  },

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question