Elasticsearch-Exporter icon indicating copy to clipboard operation
Elasticsearch-Exporter copied to clipboard

Caught Exception in main process: Type Error: Cannot read property 'settings' of undefined

Open BlackRabbitt opened this issue 11 years ago • 10 comments

The error log says:

Elasticsearch Exporter - Version 1.4.0 Reading source statistics from ElasticSearch Reading mapping from ElasticSearch Caught exception in Main process: TypeError: Cannot read property 'settings' of undefined TypeError: Cannot read property 'settings' of undefined at IncomingMessage. (/Elasticsearch-Exporter-master/drivers/es.js:338:59) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:943:16 at process._tickCallback (node.js:419:13) Number of calls: 1 Fetched Entries: 0 documents Processed Entries: 0 documents Source DB Size: 1049958 documents

Is this error occured because of Source DB Size. Is the size too large?

Thank you.

BlackRabbitt avatar Oct 09 '14 06:10 BlackRabbitt

What are you command line arguments? What version of ES are running this on?

The size of source DB shouldn't make a difference, it rather seems that a source index didn't respond with a mapping. I assume this error is consistent?

Can you tell me what response you get when you run a _mapping call?

mallocator avatar Oct 09 '14 17:10 mallocator

sudo node exporter.js -a 10.0.x.x -p 9200 -i A_3025 -b localhost -p 9200 -j A_3025 is the command line argument I used. And I am using ES version 1.3.2.

The command worked well with another local cluster, But when I tried it with the production cluster I got such issue.

Response is positive from _mapping call. And I am sure, the mapping is correct too.

BlackRabbitt avatar Oct 10 '14 03:10 BlackRabbitt

Not sure what the error here is, but ES responds without a mapping. Maybe try with a lower case index name?

mallocator avatar Oct 12 '14 19:10 mallocator

i had same exception . eexport -a localhost -i heluo-weinxin-zhengwu -b 192.168.10.71 ,index name is lowercase. is because of complex setting? the index's setting

{
   "heluo-weixin-zhengwu": {
      "settings": {
         "index": {
            "creation_date": "1417361872706",
            "analysis": {
               "filter": {
                  "my_synonym_filter": {
                     "type": "synonym",
                     "synonyms_path": "ik/custom/synonyms.dic"
                  }
               },
               "analyzer": {
                  "default_search": {
                     "filter": [
                        "my_synonym_filter",
                        "lowercase",
                        "stop"
                     ],
                     "tokenizer": "ik"
                  },
                  "default_index": {
                     "tokenizer": "ik"
                  }
               }
            },
            "number_of_shards": "1",
            "uuid": "qCeRINF1QcSIZB8xxsMGbw",
            "version": {
               "created": "1040099"
            },
            "number_of_replicas": "0"
         }
      }
   }
}

thm1118 avatar Jan 27 '15 10:01 thm1118

Does your ES cluster accept the setting if you set it manually? Are there any more details in the ElasticSearch log?

mallocator avatar Jan 27 '15 18:01 mallocator

i try again, it work now .:)

thm1118 avatar Jan 28 '15 05:01 thm1118

Without any changes? That's weird.

mallocator avatar Jan 28 '15 09:01 mallocator

I can replicate this by using an alias for the sourceIndex. When switching to the actual index name, all works fine.

josegonzalez avatar Feb 25 '15 21:02 josegonzalez

Good to know, thanks @josegonzalez I'll be sure to consider that with the 2.0 implementation.

mallocator avatar Feb 26 '15 00:02 mallocator

Yeah, my current hack to is to find the index being aliased - fun with bash! - and then retrieve that one.

josegonzalez avatar Feb 26 '15 00:02 josegonzalez

Yes, a little late, but I've moved on to other projects. Unfortunately, I can't point you to any other repo that forked and continued the work here, so you'll have to look for another solution, although I believe AI will soon make all of these little tools obsolete.

Most functionality was broken when ES moved to v6, and I don't even know what version we're on today, so it's no surprise it's broken. If there's huge demand I may come back to this as I was working on a more generic implementation with drivers for different DBs, a web GUI, and other little improvements. For now, consider this project abandoned 😢. One person can only do so much.

mallocator avatar Jan 18 '24 03:01 mallocator