Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using socket: no documentation and cannot make it work. #94

Open
Yivan opened this issue Mar 13, 2018 · 2 comments
Open

Using socket: no documentation and cannot make it work. #94

Yivan opened this issue Mar 13, 2018 · 2 comments

Comments

@Yivan
Copy link

Yivan commented Mar 13, 2018

Hello,

First, thanks for this nice GUI for Redis.

We are trying to make it work with redis on unix socket. We have many containers and using TCP is not a solution as docker is limited to around 30 networks and we don't want others containers being able to connect to redmin (if we make 1 network per stack to secure redis, we would be limited to maximum 30 indepedant stacks). So we set it as socket and share the socket folder between redis container and phpredmin container.

In my docker-compose I have:

        environment:
            - "PHPREDMIN_DATABASE_REDIS_0_HOST=unix:///var/run/redis/redis.sock"

But it don't work, i got a blanck page... no errors displayed and nothing in /var/log.

First, where can we find the errors log or force display them ?
Second what is the good synthax to make it work with socket, I tried:

  • unix:///var/run/redis/redis.sock
  • unix:/var/run/redis/redis.sock
  • unix://var/run/redis/redis.sock
  • ///var/run/redis/redis.sock
  • /var/run/redis/redis.sock
    But none works... : (

I should add using TCP, the exact same docker compose work.
Socket is working, i tested it with redis-cli.
So the problem seems to make phpredmin use the socket file... I any help could be given it would be nice, and may e add it to the documentation.

Thanks!

@sasanrose
Copy link
Owner

Hi

You can increase the log threshold to 5 in config file and see if it's helpful or not.
PhpRemin does not connect to Redis by itself so you need to consult with the Redis extension that you used. If you are using the official PhpRedmin image the Redis extension that is used in the image is https://github.com/phpredis/phpredis

@Yivan
Copy link
Author

Yivan commented Mar 13, 2018

Thanks @sasanrose

I manage to make it work by using:

        environment:
            - "PHPREDMIN_DATABASE_REDIS_0_HOST=/var/run/redis/redis.sock"
            - "PHPREDMIN_DATABASE_REDIS_0_PORT=0"

Forcing port to 0 disable attempting to connect in TCP.

The second problem was socket file has 700 permission. To work i need to set it to 777, by using unixsocketperm 777 in the redis.conf.

The issue can be close.
Maybe those tips could be added to the documentation.

Best regards.

@Yivan Yivan changed the title Using socket: no documentation and connaot make it work. Using socket: no documentation and connot make it work. Mar 13, 2018
@Yivan Yivan changed the title Using socket: no documentation and connot make it work. Using socket: no documentation and cannot make it work. Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants