Closed lucassimon closed 3 years ago
Looks like a bug in mailslurper, not here. Restarting the env should fix it :)
I don't know what happens
After restart
Another connection fail
Unfortunately I don’t know either. It works fine repeatedly in our CI and all local environments. Maybe it’s a system issue, maybe a docker issue - I don’t know. However, it is not a bug i. this project which is why I will be closing this issue. I hope you understand and find a way to resolve this. Maybe someone on Stack Overflow can help!
Hello @aeneasr I know that is not a bug in Kratos. I solve it using another fake smtp server: Mailhog.
Some changes in my config:
iam-svc:
depends_on:
- kratos-migrate
build: .
restart: unless-stopped
environment:
DATABASE_URL_DECODED: postgres://kratos:secret@postgresd:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
SMTP_URL: smtp://mailhog:1025
mailhog:
image: mailhog/mailhog:latest
ports:
- 1025:1025
- 8025:8025
networks:
- lab-net
Because of that dependency with smtp server that I created too the issue: https://github.com/ory/kratos/issues/1668
"messages": [
{
"id": 1070001,
"text": "An email containing a verification link has been sent to the email address you provided.",
"type": "info",
"context": {}
}
]
},
"state": "sent_email"
}
Awesome! :)
Describe the bug
A clear and concise description of what the bug is.
When I setup the kratos v0.7.1-alpha1 and mailslurper on my docker-composer I got an error when the kratos sends an email.
Reproducing the bug
Steps to reproduce the behavior:
docker-compose up --build
curl
Fetch register flow
Request
curl -X GET 0.0.0.0:4433/self-service/registration/api -H 'Accept: application/json' | jq
Response
Submit register flow
Request
curl -X POST "http://0.0.0.0:4433/self-service/registration?flow=6e0c9b4a-3d94-428e-ba36-2f7fa3810e68" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"traits":{"email": "foo@bar.com"}, "method": "password", "password":"foo_bar_123"}' | jq
Response
Server logs
Server configuration
Expected behavior
I don't receive any email. Connection closed/fail, even the services are in the same network.
docker-compose.yaml
Environment