[Worker] Worker 0 is ready!
Worker mails started
Fatal error: Uncaught RedisException: Connection refused in /usr/src/code/vendor/utopia-php/queue/src/Queue/Connection/Redis.php:181
Stack trace:
#0 /usr/src/code/vendor/utopia-php/queue/src/Queue/Connection/Redis.php(181): Redis->connect('redis', 6379)
#1 /usr/src/code/vendor/utopia-php/queue/src/Queue/Connection/Redis.php(77): Utopia\Queue\Connection\Redis->getRedis()
#2 /usr/src/code/vendor/utopia-php/queue/src/Queue/Connection/Redis.php(66): Utopia\Queue\Connection\Redis->rightPop('utopia-queue.qu...', 5)
#3 /usr/src/code/vendor/utopia-php/queue/src/Queue/Server.php(199): Utopia\Queue\Connection\Redis->rightPopArray('utopia-queue.qu...', 5)
#4 [internal function]: Utopia\Queue\Server->Utopia\Queue\{closure}('0')
#5 /usr/src/code/vendor/utopia-php/queue/src/Queue/Adapter/Swoole.php(37): call_user_func(Object(Closure), '0')
#6 {main}
thrown in /usr/src/code/vendor/utopia-php/queue/src/Queue/Connection/Redis.php on line 181
so I can't seem to send emails and this is the only error in the mails worker
weird....this seems to be a connection between the container and redis 🧐
can you check the env vars and make sure they're set correctly in the container?
yeah seemingly happened all of the sudden
lemme check
_APP_SMTP_HOST=smtp.mailgun.org
_APP_SMTP_PORT=587
_APP_SMTP_SECURE=tls
_APP_SMTP_USERNAME=support@mg.pva.ai
_APP_SMTP_PASSWORD=my_password
This ones extra weird yeah I agree, I can give you access if you need
no no. it's not a SMTP problem. It's a redis problem
_APP_REDIS_HOST=redis
_APP_REDIS_PORT=6379
_APP_REDIS_USER=
_APP_REDIS_PASS=
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/519ba1fee0d9/json": dial unix /var/run/docker.sock: connect: permission denied
in the redis-alpine
that's weird...redis shouldn't need the docker socket..
just restarted
orrr this might be a problem with the server 🧐
1:M 16 Feb 2024 16:29:41.175 # User requested shutdown...
1:M 16 Feb 2024 16:29:41.175 * Saving the final RDB snapshot before exiting.
1:M 16 Feb 2024 16:29:41.196 * DB saved on disk
1:M 16 Feb 2024 16:29:41.196 # Redis is now ready to exit, bye bye...
1:C 16 Feb 2024 16:29:57.683 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 16 Feb 2024 16:29:57.683 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 16 Feb 2024 16:29:57.683 # Configuration loaded
1:M 16 Feb 2024 16:29:57.683 * monotonic clock: POSIX clock_gettime
1:M 16 Feb 2024 16:29:57.688 * Running mode=standalone, port=6379.
1:M 16 Feb 2024 16:29:57.688 # Server initialized
1:M 16 Feb 2024 16:29:57.688 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:M 16 Feb 2024 16:29:57.688 * Loading RDB produced by version 7.0.4
1:M 16 Feb 2024 16:29:57.688 * RDB age 16 seconds
1:M 16 Feb 2024 16:29:57.688 * RDB memory usage when created 5.02 Mb
1:M 16 Feb 2024 16:29:57.711 * Done loading RDB, keys loaded: 1262, keys expired: 0.
1:M 16 Feb 2024 16:29:57.711 * DB loaded from disk: 0.023 seconds
1:M 16 Feb 2024 16:29:57.711 * Ready to accept connections
1:M 16 Feb 2024 16:30:58.053 * 10000 changes in 60 seconds. Saving...
1:M 16 Feb 2024 16:30:58.054 * Background saving started by pid 15
15:C 16 Feb 2024 16:30:58.072 * DB saved on disk
15:C 16 Feb 2024 16:30:58.072 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
1:M 16 Feb 2024 16:30:58.154 * Background saving terminated with success
1:M 16 Feb 2024 16:35:59.029 * 100 changes in 300 seconds. Saving...
1:M 16 Feb 2024 16:35:59.029 * Background saving started by pid 16
16:C 16 Feb 2024 16:35:59.048 * DB saved on disk
16:C 16 Feb 2024 16:35:59.048 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
1:M 16 Feb 2024 16:35:59.130 * Background saving terminated with success
1:M 16 Feb 2024 16:41:00.004 * 100 changes in 300 seconds. Saving...
1:M 16 Feb 2024 16:41:00.004 * Background saving started by pid 17
17:C 16 Feb 2024 16:41:00.023 * DB saved on disk
17:C 16 Feb 2024 16:41:00.023 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
1:M 16 Feb 2024 16:41:00.105 * Background saving terminated with success
lemme check again
so idk where that redis error came from, but anyways, this is what I'm getting
[Worker] Worker 0 is ready!
Worker mails started
[Job] Received Job (65cf912a607b33.25560742).
[Job] (65cf912a607b33.25560742) failed to run.
[Job] (65cf912a607b33.25560742) Error sending mail: SMTP Error: Could not authenticate.
[Error] Type: Exception
[Error] Message: Error sending mail: SMTP Error: Could not authenticate.
[Error] File: /usr/src/code/src/Appwrite/Platform/Workers/Mails.php
[Error] Line: 96
issue is, those are the right Mailgun credentials
could it be because the self-signed cert for some reason?
I can send an email with a command using the same credentials
Ahh okay this means it's an SMTP problem. Progress!
Did you set the email address environment variable? See https://appwrite.io/docs/advanced/self-hosting/email
The team one? Yeah. All SMTP variables are set same as my other Gmail SMTP server vars
Does could not authenticate just mean the credentials failed or could it mean other errors are caught as that?
Recommended threads
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- Unauthorized Charge After Appwrite Pro F...
I was using Appwrite Pro credits worth $100, which were valid until November. During this period, I was exploring Appwrite's services. However, I recently notic...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...