10 Star 55 Fork 21

EdgeGallery / mep-agent

 / 详情

Initial get token failed

Close
讨论(info)
创建于  
2021-10-01 16:43

Log file of mep-agent in my applications pod

As you see in the picture the initial get token in mep-agent fails.

This is the mep-agent instance in the pod of my own user application.

The application is deployed and instantiated successfully via the web interfaces of developer and mecm platforms.

Due to failing of get token no further request through mep-agent works.

What can be the reason for this behaviour?

In case of any errors on the mep/mepauth side there are error logs see here in the code:

get token handler in mep/mepauth

But no one of this logs is to read in the mepauth.log file, see picture below. There is no log entry near the timestamp from the get token failure, see picture of mep-auth.log above. So the get token request seems not to be received bei mep/mepauth. The log

`log.Info("Get token request received.")`

in the get token handler in the picture above doesn't appear in the mepauth.log even though three user applications with mep-agent are running and healthy.

Image description

Since the request is not sent to mep/mepauth, it's assumed that an error occured within

errGetMepToken := GetMepToken(auth)

in fact before the request execution.

mep-agent start

The error can only be occured in the highlighted block in the postTokenRequest function below or in

// doRequest: do request.
func doRequest(req *http.Request) (*http.Response, error) {
	var tr = &http.Transport{
		TLSClientConfig: TLSConf,
	}
	client := &http.Client{Transport: tr}
	return client.Do(req)
}

before the request is sent.

mep-agent posttokenrequest

Edit:
I debugged the startup sequence of mep-agent and found out that the request for mep/token is ended with tcp timeout:

errGetMepToken

Error code is 10060.

To confirm this behaviour I try to connect to the Nodeport of mep-api-gw and it failed as I expected.

curl mep-api-gw

All of other NodePorts response somehow to the curl request but the mep-api-gw service says "network unreachable".

评论 (4)

zmansuroglu 创建了讨论(info)
zmansuroglu 关联仓库设置为EdgeGallery/mep-agent
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
zmansuroglu 修改了描述
展开全部操作日志

Have you create eg-mp1 and eg-mm5 network? I think this is a nerwork issue.
输入图片说明

eg-if.cfg is already in /etc/network/interfaces.d/. But the interfaces eg-mp1 and eg-mm5 don't exist though.

I used the offline installation, so the networks should be installed automatically, right?

After adding the line

source /etc/network/interfaces.d/eg-if.cfg

to the file

/etc/network/interfaces

manually, the networks eg-mp1 and eg-mm5 are created but get token still doesn't work.

鹿鑫 任务状态Open 修改为Close

hava fixed by creat network manually and reinstall mep

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
Go
1
https://gitee.com/edgegallery/mep-agent.git
git@gitee.com:edgegallery/mep-agent.git
edgegallery
mep-agent
mep-agent

搜索帮助

344bd9b3 5694891 D2dac590 5694891