Wednesday, 24 May 2017

ElasticSearch/npm: elasticdump: Unexpected token error during dumping of response data

While dumping the output of an elastic dump command, unexpected token error occurred as shown below. What is wrong here? Do i need to pass in a different data type here? Is it possible to take a look at the response being parsed?

##>elasticdump  --input="https://<SERVER_IP>/elasticsearch/_search" --output="c:\edmp.log" --type=data
Wed, 24 May 2017 10:55:32 GMT | starting dump
undefined:1
<!DOCTYPE html>
^

SyntaxError: Unexpected token <
    at Object.parse (native)
    at Request._callback (C:\Users\user\AppData\Roaming\npm\node_modules\elast
icdump\lib\transports\elasticsearch.js:52:21)
    at Request.self.callback (C:\Users\user\AppData\Roaming\npm\node_modules\e
lasticdump\node_modules\request\request.js:188:22)
    at emitTwo (events.js:100:13)
    at Request.emit (events.js:185:7)
    at Request.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\ela
sticdump\node_modules\request\request.js:1171:10)
    at emitOne (events.js:90:13)
    at Request.emit (events.js:182:7)
    at IncomingMessage.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_mod
ules\elasticdump\node_modules\request\request.js:1091:12)
    at IncomingMessage.g (events.js:273:16)



via StillNestling

No comments:

Post a Comment