-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
upstreamName通过变量设置产生的问题? #1980
Comments
你可以打开debug日志,查看一下处理过程。看报错的话是查询dns时候 等待超时30s了。(tengine<>dns resolver) |
谢谢你的回答,在nginx方面我是一个新手,你说的打开debug日志 是指 error_log /**/logs/error.log debug; 这样吗? 如果是,我已经打开了,错误日志还是上述的那样。 因为我的nginx部署在内网环境,是没有dns服务这些的。或者是否有什么选项 让我关闭dns查询功能? 我想描述的是在nginx1.24官网版本中 我没有这个问题,在tengine3.1中有这个问题,是我配置错了还是tengine就是这么设计的? |
这个配置会触发nginx和tengine动态解析(请求过来的时候才会解析这个instance的dns resolver),无法关闭,除非你把instance配置成 如果你不想动态dns查询,也可以直接写成这样 proxy_pass http://<some_domain>; 这样 启动nginx/tengine的时候 会在启动的阶段解析成ip |
|
您好,我是因为dyups模块的功能发现这个项目的
在nginx中
server {
listen 3100;
location / {
set $myup "instance";
proxy_pass http://$myup;
}
}
这段配置文件,如果我上游upstream没有配置instance,nginx会马上返回502;
但是在tengine中,nginx大概在30秒后才返回502;
错误日志类似这样:
recv() failed (111: Connection refused) while resolving, resolver: 120.1.1105.201:53
recv() failed (111: Connection refused) while resolving, resolver: 120.1.1105.201:53
*2 instance could not be resolved (110: Operation timed out),client:
请问是我哪个配置错了吗?
The text was updated successfully, but these errors were encountered: