Hubs-Foundation / hubs-cloud

Resources for self hosted Hubs Cloud instances
Mozilla Public License 2.0
149 stars 88 forks source link

Issues with SMTP configuration (mail not sending) #321

Closed LeoRitterVR closed 6 months ago

LeoRitterVR commented 7 months ago

Hello,

I am opening this post because I am encountering a problem when deploying this solution in a Kubernetes environment.

I based my approach on the tutorial described in this link to perform the operation: https://hubs.mozilla.com/labs/community-edition-case-study-quick-start-on-gcp-w-aws-services/

I am facing an issue when my deployment is finished and I try to connect as an administrator to the hub. Everything appears to be functional visually (no specific errors in the console), however, it seems that the email for connection request is not being sent.

General information:

Upon inspecting the logs of the Reticulum pod, I found this during the connection attempt:

image

Here is also the configuration of my render_hcce.sh file used during deployment:

image

I have tried several SMTP services like Mailgun and Amazon SES, and have tested the configurations in another application, so it is unlikely that the SMTP service is at fault here. I also tried to open my 587 port (the one the SMTP service is using), but that didn't changed anything.

Any help regarding a possible mishandling would be greatly appreciated.

Doginal commented 7 months ago

Try running kubectl get secret configs -n hcce that will show you if the values got applied correctly. exec into the ret pod and try echoing out the vars maybe they didn't get set correctly on kubectl apply 🤷‍♂️

LeoRitterVR commented 7 months ago

Try running kubectl get secret configs -n hcce that will show you if the values got applied correctly. exec into the ret pod and try echoing out the vars maybe they didn't get set correctly on kubectl apply 🤷‍♂️

Unless I'm mistaken, it's not possible to run the command "kubectl get secret configs -n hcce" in the pod's environment because kubectl is not installed there. In any case, that's my situation.

Should I manually install it to be able to perform the execution?

Doginal commented 7 months ago

run it from where you installed the platform! That will show you if the configs exist then check kubectl describe secret configs -n hcce which will show you if each key/value has data. Then in the pod, echo out the env var you want to see. There is no need to install kubectl in the pods.

Arko7777 commented 6 months ago

run it from where you installed the platform! That will show you if the configs exist then check kubectl describe secret configs -n hcce which will show you if each key/value has data. Then in the pod, echo out the env var you want to see. There is no need to install kubectl in the pods.

facing same issue, checked all the value + data and echoed all out. smh still not sending the mail. Any idea what the issue may be?

Arko7777 commented 6 months ago

run it from where you installed the platform! That will show you if the configs exist then check kubectl describe secret configs -n hcce which will show you if each key/value has data. Then in the pod, echo out the env var you want to see. There is no need to install kubectl in the pods.

facing same issue, checked all the value + data and echoed all out. smh still not sending the mail. Any idea what the issue may be?

Thanks to the great support of @Doginal I have fixed the issue and now everything is running on my GCP connected to SES.

Here some info for everybody facing the same issue:

Following steps solved my issue:

1) change Port from 25 to 587 2) bash render_hcce.sh && kubectl apply -f hcce.yaml 3) kubectl get pods -n hcce 4) kubectl delete pod [YOUR_RETICULUM] -n hcce 5) DONE :white_check_mark:

mikemorran commented 6 months ago

Great job @Doginal and @Arko7777