#[SOLVED] SMTP Failing with Mailgun on Redis error?

1 messages · Page 1 of 1 (latest)

stoic tinsel
#
[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

tall sun
#

can you check the env vars and make sure they're set correctly in the container?

stoic tinsel
#

yeah seemingly happened all of the sudden

#

lemme check

stoic tinsel
#

This ones extra weird yeah I agree, I can give you access if you need

tall sun
stoic tinsel
stoic tinsel
# tall sun no no. it's not a SMTP problem. It's a redis problem
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

tall sun
stoic tinsel
#

just restarted

tall sun
#

orrr this might be a problem with the server 🧐

stoic tinsel
#
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

stoic tinsel
# tall sun orrr this might be a problem with the server 🧐

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

tall sun
stoic tinsel
stoic tinsel
stoic tinsel
#

any tips for debugging?

tall sun
stoic tinsel
#

ooh good point lemme ask

stoic tinsel
#

no restrictions in place

stoic tinsel
#

so

#

my boss did

#

and it worked with the given password, but I'll try it with Appwrite

stoic tinsel
#

You're right, let me try both

#

same error

stoic tinsel
#

I need to mod the docker usergroup, my boss never added the normal non-root user to the sudo group for docker so I get a permission denied, need to add sudo to it or that, just figured I'd try to noreply credentials first

#

yeah

#

soooo not sure, noreply works, but support doesn't, which is weird because they're on the same account but yolo

#

thank you ❤️

tall sun
stoic tinsel
#

based on what he sent me haha

#

don't feel like doing his devops for free in Mailgun, just wanted to check to make sure it wasn't my fault

stoic tinsel
stoic tinsel
# tall sun maybe...

no worries haha, either way it'll come, just was curious if any more pushes before then for bugfixed 1.4.x