Timelion - no data returned from Quandl


#1

Hello,

I am running Kibana 5.0.0 and cannot seem to get any data returned from Quandl.

I added my API key to the ../src.core_plugins/timelion/timelion.json file. Restarted Kibana.

Then used .quandlI('FRBC/USINFL') to get data and tried many others.

I tried all permutations of 1d, 1M, 1y etc. No data returned each time. Extended the time fram to last 5 years. Still nothing.

Note: i know the data exists b/c I can download the data from the browser using URL: https://www.quandl.com/api/v3/datasets/FRBC/USINFL.csv?api_key=myapi_key

Am i doing something wrong?

Any ideas are much appreciated. It all looks so straightforward from the youtube demos, docs, etc.

Regards,
Frank


(Sanjiv Jivan) #2

Works for me. You have a typo - it's quandl, not quandll but assuming that's not the problem make sure that you have the Time range set appropriately like Last 1 year. If it's too small like Today or Last 7 days I don't get results either.

Sanjiv


#3

Thanks for the reply Sanjiv, but I tried the same and still no data.


(Mark Walkom) #4

What does more info say then?


#5

Here is the More Info dump...

Error: in cell #1: quandl() returned no results
at throwWithCell (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\src\core_plugins\timelion\server\handlers\chain_runner.js:30:11)
at C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\src\core_plugins\timelion\server\handlers\chain_runner.js:156:13
at arrayEach (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\lodash\index.js:1289:13)
at Function. (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\lodash\index.js:3345:13)
at C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\src\core_plugins\timelion\server\handlers\chain_runner.js:148:9
at tryCatcher (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\util.js:26:23)
at Promise._settlePromiseFromHandler (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\promise.js:503:31)
at Promise._settlePromiseAt (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\promise.js:577:18)
at Promise._settlePromises (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\promise.js:693:14)
at Async._drainQueue (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\async.js:123:16)
at Async._drainQueues (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\async.js:133:10)
at Immediate.Async.drainQueues (C:\ELK\kibana-5.0.0-windows-x86\kibana-5.0.0-windows-x86\node_modules\bluebird\js\main\async.js:15:14)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)


(Rashid Khan) #6

Seems to work for me too. Perhaps a proxy or something in the way of it getting to the internet? The query is executed on the Kibana server.


#7

All,

Thank you for checking.

I ran the URL mentioned above which is provided by Quandl from the WIndows Server where Kibana is running. I downloaded the csv file no problem. So it appears I can get out to the internet.

Kibana is running as a windows service on the server.

Regards,
Frank


(Sanjiv Jivan) #8

Does kibana server display any logs? It could be a certificate issue when it tries to make the https call and your company has a self signed certificate. The browser will be able to make the call by the call from kibana js can fail. There's a workaround for that and I can point you to it if you can confirm this is the problem.


#9

Hi Sanjiv,

I started a new kibana log today. Ran Kibana timelion using the same quandl query. I am seeing "statusCode":400. What does this mean?

What is the workaround? I can try this as well if you can share it.

Also, what would I need to look for in the log if its related to a certificate issue?

Sidenote: I installed ES 5.0.2 and Kibana 5.02 on my laptop..ran the same query over wifi from home (no server or corporate network involved). Sometimes it worked and sometimes it came up with the same error.
It seems once I get the error I can't seem to get rid of it. I have not been able to prove this 100% accurately.

Thanks again for your suggestions.

Frank


(Sanjiv Jivan) #10

Which OS are you running on? Perhaps a firewall / AV software is interfering. You can google for http status code 400. The error I got clearly said it was an ssl error. I put in a quick and dirty workaround as a temporary way to see the data in timelion. Might be worth setting up a http proxy like wireshark to examine the outbound request and response.

The error I got was

Error: in cell #1: request to https://www.quandl.com/api/v1/datasets/CHRIS/CME_ES4.json?sort_order=asc&trim_start=2015-12-07&trim_end=2016-12-07&collapse=weekly&auth_token=xxx failed, reason: self signed certificate in certificate chain at throwWithCell (C:/java8/elk2/kibana-4.6.1-windows-x86/installedPlugins/timelion/server/handlers/chain_runner.js:29:11) at C:/java8/elk2/kibana-4.6.1-windows-x86/installedPlugins/timelion/server/handlers/chain_runner.js:156:13 at arrayEach (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\lodash\index.js:1289:13) at Function.<anonymous> (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\lodash\index.js:3345:13) at C:/java8/elk2/kibana-4.6.1-windows-x86/installedPlugins/timelion/server/handlers/chain_runner.js:148:9 at bound (domain.js:287:14) at runBound (domain.js:300:12) at tryCatcher (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\util.js:26:23) at Promise._settlePromiseFromHandler (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\promise.js:503:31) at Promise._settlePromiseAt (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\promise.js:577:18) at Promise._settlePromises (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\promise.js:693:14) at Async._drainQueue (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\async.js:124:16) at Async._drainQueues (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\async.js:134:10) at Immediate.Async.drainQueues [as _onImmediate] (C:\java8\elk2\kibana-4.6.1-windows-x86\node_modules\bluebird\js\main\async.js:16:14) at processImmediate [as _immediateCallback] (timers.js:383:17)

I worked around it by adding the line

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

in the kibanaa/node_modules/bluebird/js/main/async.js function Async()


#11

I am running on Windows Server 2012 R2


#12

When I look up HTTP Error code 400 the explanation is: Bad Request. the request could not be understood by the server due to malformed syntax

The other thing I see.. in your error message u can see the quandl query...Nowhere in the log do I see my quandl query.


(Sanjiv Jivan) #13

Try putting a bogus key and see if it reports an error indicating it was an invalid key. That way you can at least determine that the request it being made correctly. Are you running from within your company firewall? Try running it from another machine an possibly a machine on a different network like your home. This will help you isolate the problem.


#14

I tried the following:

1.not connected to my home wifi. Running ES and Kibana locally.
2.Put a bogus api key in the timelion.json file.

I don't get any quandl query in the kibana log file.

I installed and tried the same on my mac and get the same error and still no mention of the quandl query in the kibana log.

{"type":"response","@timestamp":"2016-12-09T11:58:04Z","tags":[],"pid":1080,"method":"post","statusCode":400,"req":{"url":"/api/timelion/run","method":"post","headers":{"host":"localhost:5601","connection":"keep-alive","content-length":"133","accept":"application/json, text/plain, /","origin":"http://localhost:5601","kbn-version":"5.0.2","user-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://localhost:5601/app/timelion","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.8"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"http://localhost:5601/app/timelion"},"res":{"statusCode":400,"responseTime":325,"contentLength":9},"message":"POST /api/timelion/run 400 325ms - 9.0B"}


(Sanjiv Jivan) #15

My last suggestion would be to regenerate your key on the quandl site. Make sure you activate the account after you register.

Which country are you trying to access quandl from? I'm not sure but perhaps quandl has some restrictions in their usage agreement. I'm accessing it from the US.


#16

Hi Sanjiv,

I regenerated the key this morning. Not sure what you mean by activating it? Once they generate the key there is an additional step to activate it?

I am also accessing from the US.

Maybe something changed in the newer versions of Kibana/Timelion that the quandl query is not written to the log file?

Quandl page with published error codes: https://www.quandl.com/docs/api#http-return-codes

http 40x errors indicates something is wrong with the request.

Thank you very much for the great suggestions!

Regards,
Frank


(Sanjiv Jivan) #17

Based on your previous kibana log, the http status code was 400 and the link you posted says

QEAx01 400 We could not recognize your API key. Please check your API key and try again. You can find your API key under your account settings.

So it does appear to be related to your key. Did you add your key to installedPlugins/timelion/limelion.json unde the quandl section.


#18

I don't have an installedPlugins folder. Perhaps your running an older version of Kibana?

I have the timelion.json in the Kibana folder in .../src/core_plugins/timelion/timelion.json

I added the key to this section: "quandl": {
"key": "my_api_key"
}


(Sanjiv Jivan) #19

I'm on Kibana 4.6.1 and it appears you're placing the api_key in the correct location for 5.0. rashid's post above illustrates that this works with Timelion 5.0 too so I think it's back to an issue with your API key. Try finding someone (like a colleague?) who has quandl working and experiment using your key to see if that works so you isolate that to your quandl account / key.


(system) #20

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.