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

Symfony 3.3 : Connection refused [tcp://127.0.0.1:6379] #42

Open
blacxi opened this issue Nov 15, 2023 · 0 comments
Open

Symfony 3.3 : Connection refused [tcp://127.0.0.1:6379] #42

blacxi opened this issue Nov 15, 2023 · 0 comments

Comments

@blacxi
Copy link

blacxi commented Nov 15, 2023

Hi,
On an old project in Symfony 3.3 (sorry, I can't upgrade), I'm trying to use your bundle to protect the connection against brutforcing.
After adding and configuring a redis container, I got the following error which occurs after connection. do you know what could be the reason please?

I can connect to my redis container and the PING command works well in the REDIS-CLI.

Connection refused [tcp://127.0.0.1:6379]
CRITICAL | request	| Uncaught PHP Exception Predis\Connection\ConnectionException: "Connection refused [tcp://127.0.0.1:6379]" at /var/www/.../vendor/predis/predis/src/Connection/AbstractConnection.php line 155

Here are my configurations

docker-compose.yml

    redis:
        image: redis:6.0
        command: redis-server --port 6379 --maxmemory 64mb --maxmemory-policy volatile-lfu --appendonly yes
        ports:
          - 6379:6379
        networks:
            main:
                aliases:
                    - redis

services.yaml

services:
    cache.redis:
        public: true
        class: Symfony\Component\Cache\Adapter\RedisAdapter
        parent: cache.adapter.redis
        tags:
            -   name: 'cache.redis'
                clearer: cache.app_clearer
                provider: 'redis://127.0.0.1'
                namespace: 'project_name'

config for "maba/gentle-force-bundle": "0.5.4",

maba_gentle_force:
    redis:
        host: '127.0.0.1'
        failure_strategy: fail
    limits:
        credentials_error:
            - max_usages: 3
              period: 1m
              bucketed_usages: 2

            - max_usages: 10
              period: 1d
    listeners:
        - path: ^/login         # match only POST requests to /login*
          methods: [POST]
          limits_key: credentials_error
          identifiers: [ip]
          strategy: ~
          success_statuses: ['302']
    strategies: ~

Connection-refused-tcp-127-0-0-1-6379-500-Internal-Server-Error- (1)

Best regards,
Blacxi

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

1 participant