Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下以下如何填? #2

Open
siemenstutorials opened this issue Dec 18, 2021 · 18 comments
Open

请教下以下如何填? #2

siemenstutorials opened this issue Dec 18, 2021 · 18 comments

Comments

@siemenstutorials
Copy link

机器人邮箱

BOT_MAIL_USERNAME=''
BOT_MAIL_PASSWORD=''

小白请教大佬!请问这里填什么邮箱?可否指点一二?

@luolongfei
Copy link
Owner

luolongfei commented Dec 19, 2021

这里填送信邮箱,比如填 [email protected] ,程序后面将登录 [email protected],并用这个邮箱给你发邮件。而如果你用于收信的邮箱是 [email protected],那么 [email protected] 将会收到 [email protected] 的邮件。这样说能理解吗?

@luolongfei
Copy link
Owner

你的 netflix 账户是一个邮箱对吧?那么这里的 BOT_MAIL_USERNAME 可以直接填奈飞账户邮箱,BOT_MAIL_PASSWORD 填你的邮箱密码(非奈飞账户密码),程序会监听此邮箱里的新邮件,当发现有密码被重置的邮件后,会触发执行改回密码的操作

@luolongfei
Copy link
Owner

建议你单独开一个 gmail 小号,将奈飞账户的邮件转发到此小号,此 gmail 小号需要开启二次验证以及应用密码,并启用 smtp 和 pop 功能,然后 BOT_MAIL_USERNAME 就填这个 gmail 小号,BOT_MAIL_PASSWORD 填你的应用密码。

@siemenstutorials
Copy link
Author

建议你单独开一个 gmail 小号,将奈飞账户的邮件转发到此小号,此 gmail 小号需要开启二次验证以及应用密码,并启用 smtp 和 pop 功能,然后 BOT_MAIL_USERNAME 就填这个 gmail 小号,BOT_MAIL_PASSWORD 填你的应用密码。
感谢大佬回复!我明白了!!

@siemenstutorials
Copy link
Author

账户是一个

多个 Netflix 账户

MULTIPLE_NETFLIX_ACCOUNTS='[[email protected]|dmtFG][[email protected]|chn]'

机器人邮箱

BOT_MAIL_USERNAME='[email protected]'
BOT_MAIL_PASSWORD='hbuezwzushequ'

用于接收通知的邮箱

INBOX='[email protected]'

Redis 地址(本地可设为 127.0.0.1,以 docker-compose 形式运行请设为 redis_for_netflix)

REDIS_HOST='redis_for_netflix'

Redis 端口

REDIS_PORT=6379

大佬 按您说的这样填了 但是当我把[email protected]的奈飞密码变更时,1987@gmail.没收到邮件!!能帮我看下我的这个填写是否有问题不?

@luolongfei
Copy link
Owner

1、确定你的 [email protected] 邮箱有没有收到奈飞的密码被修改邮件
2、确定你 [email protected] 的邮件会自动转发到 [email protected] 邮箱
3、确定你的 [email protected] 邮箱开启了 stmp/pop 相关功能,并且设置了应用密码
4、如果你用的 gmail 相关服务,确保你有全局的外网环境
5、提供相关日志

@siemenstutorials
Copy link
Author

siemenstutorials commented Dec 20, 2021

1、确定你的 [email protected] 邮箱有没有收到奈飞的密码被修改邮件 2、确定你 [email protected] 的邮件会自动转发到 [email protected] 邮箱 3、确定你的 [email protected] 邮箱开启了 stmp/pop 相关功能,并且设置了应用密码 4、如果你用的 gmail 相关服务,确保你有全局的外网环境 5、提供相关日志

大佬 看下这个日志是否有问题
1:可以收到邮件(邮件在推广模块中)
2: [email protected] 的邮件会自动转发到 [email protected] !这个地方不是很清楚要如何设置?
3:[email protected]开启了STMP/POP 同时设置了应用密码
4:有全局环境
5:日志如下
[root@racknerd-7aeac4 netflix]# docker logs redis_for_netflix
1:C 20 Dec 2021 14:40:14.443 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 20 Dec 2021 14:40:14.443 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 20 Dec 2021 14:40:14.443 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 20 Dec 2021 14:40:14.444 * monotonic clock: POSIX clock_gettime
1:M 20 Dec 2021 14:40:14.445 * Running mode=standalone, port=6379.
1:M 20 Dec 2021 14:40:14.445 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 20 Dec 2021 14:40:14.445 # Server initialized
1:M 20 Dec 2021 14:40:14.445 # 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 20 Dec 2021 14:40:14.446 * Ready to accept connections
[root@racknerd-7aeac4 netflix]#

@siemenstutorials
Copy link
Author

1、确定你的 [email protected] 邮箱有没有收到奈飞的密码被修改邮件 2、确定你 [email protected] 的邮件会自动转发到 [email protected] 邮箱 3、确定你的 [email protected] 邮箱开启了 stmp/pop 相关功能,并且设置了应用密码 4、如果你用的 gmail 相关服务,确保你有全局的外网环境 5、提供相关日志

大佬 看下这个日志是否有问题 1:可以收到邮件(邮件在推广模块中) 2: [email protected] 的邮件会自动转发到 [email protected] !这个地方不是很清楚要如何设置? 3:[email protected]开启了STMP/POP 同时设置了应用密码 4:有全局环境 5:日志如下 [root@racknerd-7aeac4 netflix]# docker logs redis_for_netflix 1:C 20 Dec 2021 14:40:14.443 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 20 Dec 2021 14:40:14.443 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 20 Dec 2021 14:40:14.443 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 20 Dec 2021 14:40:14.444 * monotonic clock: POSIX clock_gettime 1:M 20 Dec 2021 14:40:14.445 * Running mode=standalone, port=6379. 1:M 20 Dec 2021 14:40:14.445 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 1:M 20 Dec 2021 14:40:14.445 # Server initialized 1:M 20 Dec 2021 14:40:14.445 # 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 20 Dec 2021 14:40:14.446 * Ready to accept connections [root@racknerd-7aeac4 netflix]#

[root@racknerd-7aeac4 ~]# docker logs netflix
[2021-12-20 22:40:16.107] INFO | 9:main:run:1090 - 当前程序版本为 v0.4
[2021-12-20 22:40:16.108] INFO | 9:main:run:1091 - 开始监听密码被改邮件
[2021-12-20 22:55:22.035] ERROR | 9:main:run:1175 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
[2021-12-20 22:55:25.589] ERROR | 9:main:run:1175 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
[2021-12-20 22:55:28.484] ERROR | 9:main:run:1175 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
[2021-12-20 22:55:48.449] INFO | 8:main:run:1090 - 当前程序版本为 v0.4
[2021-12-20 22:55:48.450] INFO | 8:main:run:1091 - 开始监听密码被改邮件

@luolongfei
Copy link
Owner

Error -2 connecting to redis_for_netflix:6379. Name or service not known.

很明显有报错。
1、你是用 docker 直接执行的?不是用 docker-compose 执行的?
2、确定你 .env 文件中配置的 REDIS_HOST 是什么值

@siemenstutorials
Copy link
Author

Error -2 connecting to redis_for_netflix:6379. Name or service not known.

很明显有报错。 1、你是用 docker 直接执行的?不是用 docker-compose 执行的? 2、确定你 .env 文件中配置的 REDIS_HOST 是什么值

1:大佬我是正常按您库上写的顺序操作的,最后是运行docker-compose up -d ,所以应该是以docker-compose执行的!
2:REDIS_HOST的值 是默认的值 没有改动!

@luolongfei
Copy link
Owner

我明天看看,你重新执行一下试试,看样子应该是脚本所在容器比 redis 早了一点,导致找不到 redis 服务。

@luolongfei
Copy link
Owner

@siemenstutorials 我更新了依赖项声明,现在应该全部正常了才对,按文档重新拉取最新代码并在 docker-compose.yml 所在目录执行 docker-compose up -d --build

@siemenstutorials
Copy link
Author

@siemenstutorials 我更新了依赖项声明,现在应该全部正常了才对,按文档重新拉取最新代码并在 docker-compose.yml 所在目录执行 docker-compose up -d --build

大佬您好已用最新的脚本测试显示日志如下报错:

[root@racknerd-7aeac4 netflix]# docker-compose logs
Attaching to netflix, redis_for_netflix
netflix | [2021-12-24 23:04:53.253] INFO | 9:main:run:1147 - 当前程序版本为 v0.5.1
netflix | [2021-12-24 23:04:53.254] INFO | 9:main:run:1148 - 开始监听密码被改邮件
netflix | [2021-12-24 23:28:24.515] ERROR | 9:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:28:27.280] ERROR | 9:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:28:30.515] ERROR | 9:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:28:33.275] ERROR | 9:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:28:42.245] INFO | 8:main:run:1147 - 当前程序版本为 v0.5.1
netflix | [2021-12-24 23:28:42.247] INFO | 8:main:run:1148 - 开始监听密码被改邮件
netflix | [2021-12-24 23:34:11.199] ERROR | 8:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:34:13.995] ERROR | 8:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:34:17.217] ERROR | 8:main:run:1232 - 出错:Error -2 connecting to redis_for_netflix:6379. Name or service not known.
netflix | [2021-12-24 23:34:20.881] INFO | 9:main:run:1147 - 当前程序版本为 v0.5.1
netflix | [2021-12-24 23:34:20.881] INFO | 9:main:run:1148 - 开始监听密码被改邮件

邮件无法收到 具体原因能帮忙分析下如何 解决吗?

@luolongfei
Copy link
Owner

不应该啊🤔,我测试了几次都是正常的,你这里的错误还是提示无法连接 redis,像是 redis容器比脚本容器晚启动。你再多尝试几次呢,重新执行 docker-compose up -d --build,试五次左右,每次执行后,等待一会再输出日志看看,是不是能百分百重现这个问题?我有点怀疑是你 docker 或者 docker-compose 版本是不是太低了,你发下你 docker 和 docker-compose 的版本呢?

@luolongfei
Copy link
Owner

如果多次尝试还出现,那么可能就需要再改一下,加个脚本效验了

@siemenstutorials
Copy link
Author

[root@racknerd-7aeac4 netflix]# docker version
Client: Docker Engine - Community
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:45:41 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

[root@racknerd-7aeac4 netflix]# docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019

不应该啊🤔,我测试了几次都是正常的,你这里的错误还是提示无法连接 redis,像是 redis容器比脚本容器晚启动。你再多尝试几次呢,重新执行 docker-compose up -d --build,试五次左右,每次执行后,等待一会再输出日志看看,是不是能百分百重现这个问题?我有点怀疑是你 docker 或者 docker-compose 版本是不是太低了,你发下你 docker 和 docker-compose 的版本呢?

@luolongfei
Copy link
Owner

有没有按我说的重试

@siemenstutorials
Copy link
Author

有没有按我说的重试

有的 重试过5次 您有TG吗文便联系不?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants