cakephp / cakephp/queue

[InvalidArgumentException] Unknown connection scheme: 'redis'

Open
#48 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
36
Forks
22
Avg merge
20h 36m
Merged PRs (30d)
2

Description

I've been trying this plugin for mailing purpose. Somehow I've an issue connecting to redis.

When I'm using predis directly, I can't connect and submit my data to the redis.

This is my stack trace

2021-01-20 08:33:30 Error: [InvalidArgumentException] Unknown connection scheme: 'redis'. in C:\Dev\www\emailtemplate\vendor\predis\predis\src\Connection\Factory.php on line 87
Stack Trace:
- C:\Dev\www\emailtemplate\vendor\predis\predis\src\Client.php:120
- C:\Dev\www\emailtemplate\vendor\predis\predis\src\Client.php:59
- C:\Dev\www\emailtemplate\vendor\enqueue\redis\PRedis.php:126
- C:\Dev\www\emailtemplate\vendor\enqueue\redis\RedisConnectionFactory.php:105
- C:\Dev\www\emailtemplate\vendor\enqueue\redis\RedisConnectionFactory.php:89
- call_user_func - [internal], line ??- C:\Dev\www\emailtemplate\vendor\enqueue\redis\RedisContext.php:160
- C:\Dev\www\emailtemplate\vendor\enqueue\redis\RedisProducer.php:70
- C:\Dev\www\emailtemplate\vendor\enqueue\enqueue\Client\Driver\GenericDriver.php:225
- C:\Dev\www\emailtemplate\vendor\enqueue\enqueue\Client\Driver\GenericDriver.php:62
- C:\Dev\www\emailtemplate\vendor\enqueue\enqueue\Client\Producer.php:121
- C:\Dev\www\emailtemplate\vendor\enqueue\enqueue\Client\Producer.php:53
- C:\Dev\www\emailtemplate\vendor\enqueue\simple-client\SimpleClient.php:185
- C:\Dev\www\emailtemplate\vendor\cakephp\queue\src\QueueManager.php:217
- C:\Dev\www\emailtemplate\vendor\cakephp\queue\src\Mailer\QueueTrait.php:53
- C:\Dev\www\emailtemplate\src\Controller\Api\EmailsController.php:120
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Controller\Controller.php:529
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Controller\ControllerFactory.php:79
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\BaseApplication.php:251
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:77
- C:\Dev\www\emailtemplate\vendor\cakephp\authorization\src\Middleware\AuthorizationMiddleware.php:129
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\authentication\src\Middleware\AuthenticationMiddleware.php:122
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Routing\Middleware\RoutingMiddleware.php:166
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Middleware\BodyParserMiddleware.php:174
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Routing\Middleware\RoutingMiddleware.php:166
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Routing\Middleware\AssetMiddleware.php:68
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Error\Middleware\ErrorHandlerMiddleware.php:121
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\debug_kit\src\Middleware\DebugKitMiddleware.php:60
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:73
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Runner.php:58
- C:\Dev\www\emailtemplate\vendor\cakephp\cakephp\src\Http\Server.php:90
- C:\Dev\www\emailtemplate\webroot\index.php:40

My configuration look like this.

'DebugKit' => [
        'ignoreAuthorization' => true,
    ],
	
	'Queue' => [
		'default' => [
			  // A DSN for your configured backend. default: null
			  'url' => 'redis:',
			  //'url' => 'redis://127.0.0.1:6397',

			  // The queue that will be used for sending messages. default: default
			  // This can be overriden when queuing or processing messages
			  'queue' => 'default',

			  // The name of a configured logger, default: null
			  'logger' => 'stdout',

			  // The name of an event listener class to associate with the worker
			  //'listener' => \App\Listener\WorkerListener::class,
		]
	],

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Queue configuration shown in the issue and trace the Redis connection through the mentioned RedisConnectionFactory.php and PRedis.php entries. Reproduce the reported unknown-scheme error, then verify that the configured Redis DSN is accepted and queued mail can connect without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, redis
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.