question

Upvotes
Accepted
31 2 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 512.0 KiB each and 1.0 MiB total.

Moved to EDP.

Hello @mehdi.azzouzi

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

@Mehdi

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

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 512.0 KiB each and 1.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
22k 58 14 21

@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 512.0 KiB each and 1.0 MiB total.

@Umer Nalla @Gurpreet. I've answered to the client directly on April 16th. Also escalated this error to ERT in Cloud team with Service Cloud case 07556796

Upvote
31 2 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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