question

Upvotes
Accepted
16 1 0 5

Electron gets disconnected

Hi, We have trier to run the python client you suggested as it is in Github. The token expiration time from the server is 300. yous sample tries to refresh the access token after 270 seconds.We are getting the same disconnection problem: ending authentication request with refresh token to https://api.edp.thomsonreuters.com:443/auth/oauth2/beta1/token ...
EDP-GW authentication result failure: 400 Bad Request
Text: {"error":"access_denied" ,"error_description":"iPlanet session has been expired." }
Could not get authorisaton tokenwe ran the following:

git clone https://github.com/TR-API-Samples/Example.WebSocketAPI.Python.TestClientcd Example.WebSocketAPI.Python.TestClient/python pywstestclient.py -H emea-1.pricing.streaming.edp.thomsonreuters.com -p 443 -items VOD.L,BT.L -u GE-A-01627571-3-1503 -pw <our_password>

elektron-sdkrdp-apirefinitiv-data-platform
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Moved to EDP.

Upvotes
Accepted

@mehdi.azzouzi

The error could be from the refresh token expired (18 hours). If not, we will need to look further on how and when this application has been used.

The workaround is to avoid using refresh token at the moment and send the machineID and password instead. I’ve tested by simply modify the code at get_sts_token function to not using refresh token.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@Nawapoom Lohajarernvanich

Do you mean the modified request would be:

'username': {machineID e.g. GE-A-00000000-0-0000}
'password': {pass}
'grant_type': 'refresh_token'

instead of

'username': opts.user, 
'refresh_token': current_refresh_token,
'grant_type': 'refresh_token'

Possibly related: can customer get iPlanet if they're running multiple full login session from multiple IPs (positions)?

Upvotes
13k 32 12 18

@mehdi.azzouzi: I downloaded the sample from github and ran it with same parameters and did not observe any disconnects. The token was successfully refreshed every 270 seconds. Are you going through a proxy server?

+ @Umer Nalla have you ever seen this?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
16 1 0 5

hi there, i am still seeing my Elektron via my python code getting disconnected. This is really bad because we are not in production:

I have followed your instructions of not using the refresh token but instead sending machineID and password but unfortunately it crashes undeterministicly with the following error:

File "/lib/python3.7/site-packages/websocket/_app.py", line 155, in send
"Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

Can someone please help me on this serious matter as this is severly impacting PRODUCTION.

Thank you

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea