dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

fresh install, bad request on importing

Open Muphet opened this issue 9 years ago • 3 comments

so i have found this api and gave it a try since i am currently working on collection database myself. after installing demo dashboard (or api) and importing data, i am getting bad request response.

error:  Error: Bad Request
    at respond (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\transport.js:293:15)
    at checkRespForFailure (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\transport.js:252:7)
    at HttpConnector.<anonymous> (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\connectors\http.js:155:7)
    at IncomingMessage.wrapper (D:\workspace\a\dashboard\node_modules\elasticsearch\node_modules\lodash\index.js:3095:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
error: { Error: Bad Request
    at respond (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\transport.js:293:15)
    at checkRespForFailure (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\transport.js:252:7)
    at HttpConnector.<anonymous> (D:\workspace\a\dashboard\node_modules\elasticsearch\src\lib\connectors\http.js:155:7)
    at IncomingMessage.wrapper (D:\workspace\a\dashboard\node_modules\elasticsearch\node_modules\lodash\index.js:3095:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  status: 400,
  displayName: 'BadRequest',
  message: 'Bad Request' } 'Error: Bad Request\n    at respond (D:\\workspace\\a\\dashboard\\node_modules\\elasticsearch\\src\\lib\\transport.js:293:15)\n    at checkRespForFailure (D:\\workspace\\a\\dashboard\\node_modules\\elasticsearch\\src\\lib\\transport.js:252:7)\n    at HttpConnector.<anonymous> (D:\\workspace\\a\\dashboard\\node_modules\\elasticsearch\\src\\lib\\connectors\\http.js:155:7)\n    at IncomingMessage.wrapper (D:\\workspace\\a\\dashboard\\node_modules\\elasticsearch\\node_modules\\lodash\\index.js:3095:19)\n    at emitNone (events.js:91:20)\n    at IncomingMessage.emit (events.js:185:7)\n    at endReadableNT (_stream_readable.js:974:12)\n    at _combinedTickCallback (internal/process/next_tick.js:74:11)\n    at process._tickCallback (internal/process/next_tick.js:98:9)'
Unhandled rejection TypeError: Cannot read property 'items' of undefined
    at D:\workspace\a\dashboard\index.js:64:28
    at tryCatcher (D:\workspace\a\dashboard\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:510:31)
    at Promise._settlePromise (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:567:18)
    at Promise._settlePromise0 (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:612:10)
    at Promise._settlePromises (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:691:18)
    at Promise._fulfill (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:636:18)
    at Promise._resolveCallback (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:431:57)
    at Promise._settlePromiseFromHandler (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:522:17)
    at Promise._settlePromise (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:567:18)
    at Promise._settlePromise0 (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:612:10)
    at Promise._settlePromises (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:691:18)
    at Promise._fulfill (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:636:18)
    at Request._callback (D:\workspace\a\dashboard\node_modules\bluebird\js\release\nodeback.js:42:21)
    at Request.self.callback (D:\workspace\a\dashboard\node_modules\request\request.js:186:22)
    at emitTwo (events.js:106:13)

Unhandled rejection TypeError: Cannot read property 'items' of undefined
    at D:\workspace\a\dashboard\index.js:64:28
    at tryCatcher (D:\workspace\a\dashboard\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:510:31)
    at Promise._settlePromise (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:567:18)
    at Promise._settlePromise0 (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:612:10)
    at Promise._settlePromises (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:691:18)
    at Promise._fulfill (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:636:18)
    at Promise._resolveCallback (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:431:57)
    at Promise._settlePromiseFromHandler (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:522:17)
    at Promise._settlePromise (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:567:18)
    at Promise._settlePromise0 (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:612:10)
    at Promise._settlePromises (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:691:18)
    at Promise._fulfill (D:\workspace\a\dashboard\node_modules\bluebird\js\release\promise.js:636:18)
    at Request._callback (D:\workspace\a\dashboard\node_modules\bluebird\js\release\nodeback.js:42:21)
    at Request.self.callback (D:\workspace\a\dashboard\node_modules\request\request.js:186:22)
    at emitTwo (events.js:106:13)

Muphet avatar Nov 27 '16 17:11 Muphet

Hello @Muphet, thanks for feedback.

I have two ideas to fix it:

  • make sure Elasticsearch is run on your localhost (on ubuntu sudo service elasticsearch start)
  • please lets try to create collection with some another example data i.e. list of cities https://raw.githubusercontent.com/itemsapi/itemsapi-example-data/master/items/cities.json to be sure that's no problem with your data

selection_727

If none of these ideas work for you, please let me know

cigolpl avatar Nov 27 '16 20:11 cigolpl

yes i used that way as well, i am submitting default data provided on init. i was using elastic search 5.0 yesterday but tried 1.7 today and same result

Muphet avatar Nov 28 '16 08:11 Muphet

I've made tests with with ES 5.0.0 and got the same errors as you.. (5.0.0 version is not supported at the moment but I'll definitely improve error messages)

Anyway tried now with version 1.7.6 and fine for me (from my experiences each version > 1.4 and < 2.x are ok)

I am suggesting, please:

  • make sure about your ES version curl http://localhost:9200
  • make sure that dashboard run your ES instance ELASTICSEARCH_URL=http://localhost:9200/ PORT=3000 npm start
  • open your app http://localhost:3000 and put link to data again

Hope it will be helpful

cigolpl avatar Nov 28 '16 09:11 cigolpl