Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

can not parse IpAddress from Response #14

Open
qiankunli opened this issue Nov 2, 2018 · 0 comments
Open

can not parse IpAddress from Response #14

qiankunli opened this issue Nov 2, 2018 · 0 comments

Comments

@qiankunli
Copy link

if we access http://192.168.60.8:8080/v2/apps/wxeco/xmkp-datacenter/tasks direct, the response is

{"tasks":[{"appId":"/wxeco/xmkp-datacenter","healthCheckResults":[{"alive":true,"consecutiveFailures":0,"firstSuccess":"2018-11-02T07:15:57.360Z","instanceId":"instance [wxeco_xmkp-datacenter.marathon-fe7688ce-de6e-11e8-a5b9-52e277e06d8e]","lastSuccess":"2018-11-02T07:40:50.371Z"}],"host":"192.168.60.88","id":"wxeco_xmkp-datacenter.fe7688ce-de6e-11e8-a5b9-52e277e06d8e","ipAddresses":[{"ipAddress":"172.31.36.92","protocol":"IPv4"}],"ports":[],"servicePorts":[],"slaveId":"41801d6e-2d7d-447b-ad55-613533e90a92-S2","state":"TASK_RUNNING","stagedAt":"2018-11-02T07:14:53.176Z","startedAt":"2018-11-02T07:15:00.986Z","version":"2018-11-02T07:14:52.002Z","localVolumes":[]}]}

if we use marathon-client with the code

GetAppTasksResponse getAppTasksResponse = marathon.getAppTasks("wxeco/xmkp-datacenter");
System.out.println(JSON.toJSONString(getAppTasksResponse));

the output is

{"tasks":[{"appId":"/wxeco/xmkp-datacenter","healthCheckResults":[{"alive":true,"consecutiveFailures":0,"firstSuccess":"2018-11-02T07:15:57.360Z","lastSuccess":"2018-11-02T07:40:50.371Z"}],"host":"192.168.60.88","id":"wxeco_xmkp-datacenter.fe7688ce-de6e-11e8-a5b9-52e277e06d8e","ipAddresses":[{}],"ports":[],"servicePorts":[],"stagedAt":"2018-11-02T07:14:53.176Z","startedAt":"2018-11-02T07:15:00.986Z","state":"TASK_RUNNING","version":"2018-11-02T07:14:52.002Z"}]}

marathon-client lost the ip info

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant