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

bug: Independent external APIs cannot be automatically discovered by linking APIs servers #7185

Closed
liangyawang opened this issue Jun 2, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@liangyawang
Copy link

liangyawang commented Jun 2, 2022

No description provided.

@tokers tokers added the bug Something isn't working label Jun 2, 2022
@spacewander
Copy link
Member

Could you add a log

    local cjson = require("cjson.safe"); ngx.log(ngx.EMERG, "AA", cjson.encode(apiserver))

in

local response, err = httpc:request({
?

@liangyawang
Copy link
Author

liangyawang commented Jun 3, 2022 via email

@liangyawang
Copy link
Author

liangyawang commented Jun 3, 2022 via email

@tzssangglass
Copy link
Member

您好 请问您会讲中文吗 如果会的话 我向您提问一下 这行代码加在lua文件的什么位置?

In the line above this line of code:

local response, err = httpc:request({

The new code was added to print what apiserver is.

@liangyawang
Copy link
Author

liangyawang commented Jun 4, 2022 via email

@tzssangglass
Copy link
Member

2022/06/03 19:25:53 [error] 3135#3135: *10445111 [lua] init.lua:517: http_access_phase(): failed to set upstream: no valid upstream node: nil, client: 100.100.100.100, server: _, request: "GET /actuator/health HTTP/1.1", host: "teacher-test.xxxx.cn”

This log indicates that APISIX was unable to query valid IP from kubernates based on service_name. From the information you provided it is hard to tell where the problem is.

官网中没有对kubernetes的自动发现做详细的描述 所以此刻 我不清楚问题出在了哪里

I didn't find an article describing this in detail either.

You can choose to read the source code to understand it.

Or you can try the suggestion above to add log output and let's locate the problem together.

@liangyawang
Copy link
Author

liangyawang commented Jun 6, 2022 via email

@tzssangglass
Copy link
Member

请问一下是否能够提供一个通过api创建自动发现类型为kubernetes的路由的例子

2022年6月4日 下午6:29,梁亚旺 @.***> 写道: Dear team member Do you have any examples about the configuration of automatic discovery by APIs through kubernetes and the creation of routes with kubernetes as the type of automatic discovery through APIs? If yes, please send me examples for other types of automatic discovery in the official website, except kubernetes. I think I may have used them incorrectly, so please give me two examples to try. Thank you very much

hi @zhixiongdu027 , can you provide some examples?

@juzhiyuan
Copy link
Member

Updated: https://the-asf.slack.com/archives/CUC5MN17A/p1654503566448579?thread_ts=1654480287.905789&cid=CUC5MN17A

@zhixiongdu027
Copy link
Contributor

抱歉抱歉,我现在才看到此信息。
我将在今晚尝试复现和修复此问题,

根据报错信息显示,我初步怀疑跟
apiserver 的初始化有关。

@zhixiongdu027
Copy link
Contributor

I'm sorry, I've done several scene simulations locally and can't reproduce the situation in the picture.

Maybe the problem is related to the cluster configuration,

Is it convenient for me to communicate quickly through Im (wechat ,qq, mail) to solve this problem?
You can send your qq,wechart to my mail ([email protected])
@liangyawang

@liangyawang
Copy link
Author

liangyawang commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants