EC-Release / sdk

The Agent SDK
Other
4 stars 7 forks source link

Unable to make fuse mode connection with 2730 #76

Closed ramaraosrikakulapu closed 4 years ago

ramaraosrikakulapu commented 4 years ago

I am trying to play with 2730 version and trying to make EC connections with that version.

[EC Client x0] 2020/03/29 19:08:24 [proxy has been unset for the url: http://localhost:8001/agent]
 [EC Client x0] 2020/03/29 19:08:24 [http proxy was not used for the request: http://localhost:8001/agent]
 [EC Client x0] 2020/03/29 19:08:26 [error while adding the client inst.]
 [EC Client x0] 2020/03/29 19:08:26 [github.build.ge.com/212359746/wzcore.(*Client).Hire.func6.2.1 websocket: bad handshake]

From the experience, bad handshake error comes when client agent unable to find the target (server) agent. But I reverified all the details and did not find any issue in server or client scripts.

ramaraosrikakulapu commented 4 years ago

Here are the scripts skeletons -

gwserver.yml

ec-config:
  conf:
    mod: gw:server
    gpt : ":8001"
    zon: {zone-id}
    sst: https://{zone-id}.run.aws-usw02-dev.ice.predix.io/v1beta
    tkn: {admin token}
    hst: ws://localhost:8001/agent
    dbg: true
    aid: {agent id}
    grp: {group name}
    cid: {client id}
    csc: {client secret}
    dur: 300
    oa2: https://{oauth2 URI}/oauth/token
    rht: localhost
    rpt: ":5432"

Client script:

./agent_darwin_sys_2730 -mod client -aid {agent id} -tid {target id} -zon {zone id} -grp {group name} -sst https://{zone-id}.run.aws-usw02-dev.ice.predix.io/v1beta -hst ws://localhost:8001/agent  -cid {client id} -csc {client secret} -oa2 https://{oauth2 URI}/oauth/token -dur 1200 -lpt :6192 -dbg

Please let me know, if I can provide more details

palokam commented 4 years ago

@ramaraosrikakulapu is the same issue exists with GW:Client as well? Can you do a quick verification as well.

ayasuda2OO3 commented 4 years ago

@ramaraosrikakulapu can you share logs from the gw:server agent?

ayasuda2OO3 commented 4 years ago

badHandshake referred to failing in authentication. Please validate the groups info, usage.

ramaraosrikakulapu commented 4 years ago

Reverified the configuration details and here are the logs for gwserver -

[EC GW:Server x0] 2020/04/02 15:52:31 [[{"status":"failed authentication"}]]
 [EC GW:Server x0] 2020/04/02 15:52:31 [[github.build.ge.com/212359746/wzconf.(*Config).TokenValidation.func1.1 token validation call failed.]]
 [EC GW:Server x0] 2020/04/02 15:52:31 [[github.build.ge.com/212359746/wzcore.(*GWServer).ECRequest.func1 authentication failed. verify oauth token and zone id.]]
 [EC GW:Server x0] 2020/04/02 15:53:03 [[reporting usage..]]

client logs -

[EC Client x0] 2020/04/02 15:52:28 [[http proxy was not used for the request: http://localhost:8787/agent]]
 [EC Client x0] 2020/04/02 15:52:31 [[error while adding the client inst.]]
 [EC Client x0] 2020/04/02 15:52:31 [[github.build.ge.com/212359746/wzcore.(*Client).Hire.func6.2.1 websocket: bad handshake]]
ayasuda2OO3 commented 4 years ago

Issue was caused by missing uaa token. Fix is now available in release v1.1beta.fukuoka.2730 please verify and close @ramaraosrikakulapu @palokam

ramaraosrikakulapu commented 4 years ago

Thank you @ayasuda2003 . Will download the latest binaries.

ramaraosrikakulapu commented 4 years ago

Fuse mode is working fine with gwserver and gwclient. Thanks @ayasuda2003 @palokam .. FYI