Not able to use the authentication token to get user info using curl command from Linux server
{"error":{"message":"System.ArgumentNullException: Exception of type 'System.ArgumentNullException' was thrown.\r\nParameter name: userInfo\r\n
at Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.ProcessStreetEventClaims(Boolean ignoreFiltering)\r\n
at Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GatherProductionData()\r\n
at Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GetAllEntities(QueryOptions queryOptions)\r\n
at Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GetAllEntities()\r\n
at ThomsonReuters.Dss.Core.DataLayer.RepositoryPersistenceStrategy.GetAll[TEntity]()\r\n
at ThomsonReuters.Dss.Core.Entities.ContextBase.GetAll[TEntity]()\r\n
at ThomsonReuters.Dss.StandardExtractions.StandardExtractionsContextBase.get_UserPackages()\r\n
at ThomsonReuters.Dss.Api.StandardExtractions.UserPackagesBaseController.Get()\r\n
at lambda_method(Closure , Object , Object[] )\r\n
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() Error ID: [fa1b1168-f968-4f27-bb9b-f086759c7f94]"}}
Can you please help?
Best Answer
-
This query has been answered via other query https://community.developers.refinitiv.com/questions/15761/login-error-2.html
0
Answers
-
@Ayan, can you please share the request that caused this error ?
0 -
curl -H "Prefer: respond-async" -H "Content-Type : application/json" -k -H "Accept-Encoding : gzip,deflate" -H "Authorization : Token token_value" https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackages
0 -
This command is run properly in my environment. I will contact support team to verify the error.
0 -
I have used SOAP UI windows
application and could able to generate the token from windows machine and could
able to get the list of packages as well. However using the same token trying
to execute below requestFrom Linux server
curl -v -i -k -X GET -H
"Prefer: respond-async" -H "Authorization:Token
_SWCQZ28d5wlevi***********ayanw7UJOo05xyfw0TsU" https://10.xxx.xxx//RestApi/v1/StandardExtractions/UserPackagesResponse:
* About to connect() to 10.xxx.x.xxx
port 443 (#0)* Trying
10.xxx.x.xxx... connected* Connected to 10.xxx.x.xxx
(10.xxx.x.xxx) port 443 (#0)* Initializing NSS with
certpath: sql:/etc/pki/nssdb* warning: ignoring value of
ssl.verifyhost* skipping SSL peer certificate
verification* SSL connection using
TLS_RSA_WITH_RC4_128_MD5* Server certificate:
*
subject: CN=hosted.datascopeapi.reuters.com,O=Thomson Reuters,L=New York,ST=New
York,C=US*
start date: Nov 14 00:00:00 2015 GMT*
expire date: Nov 14 23:59:59 2017 GMT*
common name: hosted.datascopeapi.reuters.com*
issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust
Network,O=Symantec Corporation,C=US> GET
//RestApi/v1/StandardExtractions/UserPackages HTTP/1.1> User-Agent: curl/7.19.7
(x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3
libidn/1.18 libssh2/1.4.2> Host: 10.xxx.x.xxx
> Accept: */*
> Prefer: respond-async
> Authorization:Token
_SWCQZ28d5wlevi***********ayanw7UJOo05xyfw0TsU>
< HTTP/1.1 500 Internal
Server ErrorHTTP/1.1 500 Internal Server
Error< Set-Cookie:
DSSAPI-COOKIE=R537264362; path=/Set-Cookie:
DSSAPI-COOKIE=R537264362; path=/< Cache-Control: no-cache
Cache-Control: no-cache
< Pragma: no-cache
Pragma: no-cache
< Content-Type:
application/json; charset=utf-8Content-Type: application/json;
charset=utf-8< Expires: -1
Expires: -1
< Server: Microsoft-IIS/7.5
Server: Microsoft-IIS/7.5
<
X-Request-Execution-Correlation-Id: 4fb66fda-1fd5-480a-8220-f6ac1a94cd17X-Request-Execution-Correlation-Id:
4fb66fda-1fd5-480a-8220-f6ac1a94cd17< X-App-Id: Custom.RestApi
X-App-Id: Custom.RestApi
< X-App-Version: 11.1.534.64
X-App-Version: 11.1.534.64
< Date: Wed, 12 Jul 2017
14:59:15 GMTDate: Wed, 12 Jul 2017 14:59:15
GMT< Content-Length: 4150
Content-Length: 4150
<
{"error":{"message":"System.ArgumentNullException:
Exception of type 'System.ArgumentNullException' was thrown.\r\nParameter name:
userInfo\r\n at
Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.ProcessStreetEventClaims(Boolean
ignoreFiltering)\r\n at
Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GatherProductionData()\r\n
at Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GetAllEntities(QueryOptions
queryOptions)\r\n at
Reuters.DataScopeSelect.DataLayer.Entity.StandardExtractions.UserPackageRepository.GetAllEntities()\r\n
at ThomsonReuters.Dss.Core.DataLayer.RepositoryPersistenceStrategy.GetAll[TEntity]()\r\n
at
ThomsonReuters.Dss.Core.Entities.ContextBase.GetAll[TEntity]()\r\n
at
ThomsonReuters.Dss.StandardExtractions.StandardExtractionsContextBase.get_UserPackages()\r\n
at ThomsonReuters.Dss.Api.StandardExtractions.UserPackagesBaseController.Get()\r\n
at lambda_method(Closure , Object , Object[] )\r\n at
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object
instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext
controllerContext, IDictionary`2 arguments, CancellationToken
cancellationToken)\r\n--- End of stack trace from previous location where
exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at
System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at
System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at
System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n---
End of stack trace from previous location where exception was thrown
---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)\r\n at
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext(*
Connection #0 to host 10.192.6.222 left intact* Closing connection #0
) Error ID:
[a2dd9a6c-3634-4966-a010-372638a7e42f]"}}0 -
Does it mean that SOAP UI can use https://10.xxx.xxx//RestApi/v1/StandardExtractions/UserPackages to get the list of packages?
0 -
We have proxy set up in place for Linux server, where as we can use https://hosted.datascopeapi.reuters.com link directly in SOAP UI.
0 -
If 10.xxx.xxx is a proxy, it should be used with -x or --proxy option in curl.
-x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port
--proxy-anyauth Pick "any" proxy authentication method (H)
--proxy-basic Use Basic authentication on the proxy (H)
--proxy-digest Use Digest authentication on the proxy (H)How can it be converted to hosted.datascopeapi.reuters.com? Is 10.xxx.xxx a firewall with port forwarding?
I assume that the 0.xxx.xxx may add something in the request which causes the server error.
0 -
10.xx.xxx.xxx is a firewall with port forwarding. It is not proxy.
0 -
It should relate the settings of firewall. What kind of firewall are you using? Is it Iptables on Linux machine?
I have tested the curl command with port forwarding over SSH tunneling. The request works fine.
0 -
@Ayan
So, how is the problem? Have you checked the firewall yet?
0 -
My Apologies for late reply, we are using two IPs to connect TRTH.10.192.6.221 and 10.192.6.222. Initially we were using 222 and was not able to connect, now we are using 10.192.6.221 and able to connect. Can you please check from your end why there is a problem with 10.192.6.222? We have check our team and they said both the IPs are good to connect. Please look into the commands and their output as below.
$ curl -kI https://10.192.6.222/RestApi/v1
HTTP/1.1 200 OK Set-Cookie: DSSAPI-COOKIE=R868494345; path=/ Cache-Control: private Content-Length: 5020 Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 4.0 X-Request-Execution-Correlation-Id: e97f5a6c-ae36-4e81-b3b0-c4e5df243da4 X-App-Id: Custom.RestApi X-App-Version: 811.1.4.64 Date: Tue, 25 Jul 2017 06:49:03 GMT
$ curl -kI https://10.192.6.221/RestApi/v1
HTTP/1.1 200 OK Set-Cookie: DSSAPI-COOKIE=R2485808843; path=/ Cache-Control: private Content-Length: 5020 Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNetMvc-Version: 4.0 X-Request-Execution-Correlation-Id: b31d471b-453c-421f-abac-abb8604ae711 X-App-Id: Custom.RestApi X-App-Version: 11.1.534.64 Date: Tue, 25 Jul 2017 06:49:12 GMT
Please help.
0 -
I assume that 10.192.6.221 and 10.192.6.222 are IP addresses of firewalls.
The X-App-Version (811.1.4.64) from 10.192.6.222 looks different from 10.192.6.221 and my result.
C:\Users\xxx\Downloads\curl_7_53_1_openssl_nghttp2_x64>curl -kI https://hosted.datascopeapi.reuters.com/RestApi/v1
...
X-App-Version: 11.1.534.64
Date: Tue, 25 Jul 2017 10:44:18 GMTCould you please verify again that X-App-Version returned from 10.192.6.222 is 811.1.4.64?
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 623 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 688 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛