Keycloak greenmail-keydape连接不';行不通
我正在尝试对我的keycload流编写一些集成测试。 为了验证注册邮件和忘记密码的邮件,我想使用greenmail 我的greenmail docker配置(在docker compose中): 和我的KeyClope电子邮件配置: 当我点击“测试连接”时,它不工作,我进入我的日志: 错误消息(对于无法打开/显示图像的用户):Keycloak greenmail-keydape连接不';行不通,keycloak,greenmail,Keycloak,Greenmail,我正在尝试对我的keycload流编写一些集成测试。 为了验证注册邮件和忘记密码的邮件,我想使用greenmail 我的greenmail docker配置(在docker compose中): 和我的KeyClope电子邮件配置: 当我点击“测试连接”时,它不工作,我进入我的日志: 错误消息(对于无法打开/显示图像的用户): 有人知道我漏掉了什么吗?问题不在于绿信或钥匙斗篷,而在于docker =>localhost(在KeyClope配置中使用)是KeyClope docker容器的loc
有人知道我漏掉了什么吗?问题不在于绿信或钥匙斗篷,而在于docker =>localhost(在KeyClope配置中使用)是KeyClope docker容器的localhost映射,而不是docker主机(即运行它的系统)的localhost映射。
将KeyClope的smtp主机更改为“host.docker.internal”解决了此问题=>这是在docker容器中获取主机ip地址的方法很抱歉,但您的日志图片在我的屏幕上无法读取。你能在你的问题中包含日志的文本吗?@DragonThinks我添加了它。
greenmail:
image: greenmail/standalone:1.5.7
environment:
- GREENMAIL_OPTS=-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose
ports:
- "3025:3025"
- "3143:3143"
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 3025; timeout 1000;
nester exception is: Connection refused