amazon web services - What would cause Elastic Search to not produce log files? -


i have installed elastic search v5.0 on ubuntu64 virtual machine via debian package given using tutorial elastic

as explained in tutorial sudo -i service elasticsearch start wont give messages here (poor design imo)

i tried adding stdout.log file directory , still empty after starting elastic search

if sudo bin/elasticsearch trace:

exception in thread "main" elasticsearchparseexception[malformed, expected settings start 'object', instead [value_string]]         @ org.elasticsearch.common.settings.loader.xcontentsettingsloader.load(xcontentsettingsloader.java:70)         @ org.elasticsearch.common.settings.loader.xcontentsettingsloader.load(xcontentsettingsloader.java:50)         @ org.elasticsearch.common.settings.loader.yamlsettingsloader.load(yamlsettingsloader.java:50)         @ org.elasticsearch.common.settings.settings$builder.loadfromstream(settings.java:938)         @ org.elasticsearch.common.settings.settings$builder.loadfrompath(settings.java:927)         @ org.elasticsearch.node.internal.internalsettingspreparer.prepareenvironment(internalsettingspreparer.java:102)         @ org.elasticsearch.bootstrap.bootstrap.initialenvironment(bootstrap.java:207)         @ org.elasticsearch.bootstrap.bootstrap.init(bootstrap.java:247)         @ org.elasticsearch.bootstrap.elasticsearch.init(elasticsearch.java:112)         @ org.elasticsearch.bootstrap.elasticsearch.execute(elasticsearch.java:103)         @ org.elasticsearch.cli.settingcommand.execute(settingcommand.java:54)         @ org.elasticsearch.cli.command.mainwithouterrorhandling(command.java:96)         @ org.elasticsearch.cli.command.main(command.java:62)         @ org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:80)         @ org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:73) 

and without sudo provlidges:

exception in thread "main" settingsexception[failed load settings   /usr/share/elasticsearch/config/elasticsearch.yml]; nested: accessdeniedexception[/usr/share/elasticsearch/config/elasticsearch.yml]; root cause: java.nio.file.accessdeniedexception: /usr/share/elasticsearch/config/elasticsearch.yml         @ sun.nio.fs.unixexception.translatetoioexception(unixexception.java:84)         @ sun.nio.fs.unixexception.rethrowasioexception(unixexception.java:102)         @ sun.nio.fs.unixexception.rethrowasioexception(unixexception.java:107)         @ sun.nio.fs.unixfilesystemprovider.newbytechannel(unixfilesystemprovider.java:214)         @ java.nio.file.files.newbytechannel(files.java:361)         @ java.nio.file.files.newbytechannel(files.java:407)         @ java.nio.file.spi.filesystemprovider.newinputstream(filesystemprovider.java:384)         @ java.nio.file.files.newinputstream(files.java:152)         @ org.elasticsearch.common.settings.settings$builder.loadfrompath(settings.java:927)         @ org.elasticsearch.node.internal.internalsettingspreparer.prepareenvironment(internalsettingspreparer.java:102)         @ org.elasticsearch.bootstrap.bootstrap.initialenvironment(bootstrap.java:207)         @ org.elasticsearch.bootstrap.bootstrap.init(bootstrap.java:247)         @ org.elasticsearch.bootstrap.elasticsearch.init(elasticsearch.java:112)         @ org.elasticsearch.bootstrap.elasticsearch.execute(elasticsearch.java:103)         @ org.elasticsearch.cli.settingcommand.execute(settingcommand.java:54)         @ org.elasticsearch.cli.command.mainwithouterrorhandling(command.java:96)         @ org.elasticsearch.cli.command.main(command.java:62)         @ org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:80)         @ org.elasticsearch.bootstrap.elasticsearch.main(elasticsearch.java:73) 

i'm not fan of posting text on stackoverflow here configuration located at: /etc/elasticsearch

# ------------------------------------ node ------------------------------------ # # use descriptive name node: # cluster.name: sdc-test-es-cluster # # ------------------------------------ node ------------------------------------ # # use descriptive name node: # node.name: node-1 # # add custom attributes node: # #node.attr.rack: r1 # # ----------------------------------- paths ------------------------------------ # # path directory store data (separate multiple locations comma): # path.data: /var/lib/elasticsearch # # path log files: # path.logs: /var/log/elasticsearch # # ----------------------------------- memory ----------------------------------- # # lock memory on startup: # #bootstrap.memory_lock: true # # make sure heap size set half memory available # on system , owner of process allowed use # limit. # # elasticsearch performs poorly when system swapping memory. # # ---------------------------------- network ----------------------------------- # # set bind address specific ip (ipv4 or ipv6): # #network.host: 192.168.0.1 # # set custom port http: # #http.port: 9200 # # more information, see documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html> # # --------------------------------- discovery ---------------------------------- # # pass initial list of hosts perform discovery when new node started: # default list of hosts ["127.0.0.1", "[::1]"] # #discovery.zen.ping.unicast.hosts: ["host1", "host2"] # # prevent "split brain" configuring majority of nodes (total number of nodes / 2 + 1): # #discovery.zen.minimum_master_nodes: 3 # # more information, see documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html> # # ---------------------------------- gateway ----------------------------------- # # block initial recovery after full cluster restart until n nodes started: # #gateway.recover_after_nodes: 3 # # more information, see documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html> # # ---------------------------------- various ----------------------------------- # # disable starting multiple nodes on single system: # #node.max_local_storage_nodes: 1 # # require explicit names when deleting indices: # #action.destructive_requires_name: true 

the problem misconfigured elasticsearch.

  1. ensure es uses config file correct location. example, "without sudo priviledges" outputs wrong location.

  2. ensure don't have mistakes in config.

to isolate problem, comment out in config, uncomment line-by-line custom settings in config, , try start. if find line causing problem, check documentation.

also, try start without "-d" option, elasticsearch output full stacktrace in console, , should tell more misconfigured setting.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -