Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

After installing, elasticsearch will not start due to no logging configuration? #58

@jerrac

Description

@jerrac

I just did an initial test install with this role. I configured three nodes and ran the play. When I tried checking the health of the cluster, it became apparent that elasticsearch was not started.

So I tried starting it manually, and I got this:

root@node1:~# /usr/share/elasticsearch/bin/elasticsearch Failed to configure logging... ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config]; at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:158) at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103) at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:204) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:258) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:97) at java.nio.file.Files.readAttributes(Files.java:1686) at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:109) at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69) at java.nio.file.Files.walkFileTree(Files.java:2602) at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142) ... 4 more log4j:WARN No appenders could be found for logger (bootstrap). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root. at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Refer to the log for complete error details. root@node1:~# ls /etc/elasticsearch/ elasticsearch.yml node1 logging.yml scripts 

Here are the ansible vars, just replace node1 with node2 or node3 to get the other nodes config:

es_version: 2.1.1 es_log_dir: "/opt/elasticsearch/logs" es_work_dir: "/opt/elasticsearch/temp" es_heap_size: "3072m" es_config: cluster.name: "asdfqwerty" discovery.zen.ping.unicast.hosts: "http://node1:9301" http.port: 9200 transport.tcp.port: 9301 bootstrap.mlockall: True discovery.zen.ping.multicast.enabled: False path.repo: "/path/to/repo/path" discovery.zen.minimum_master_nodes: 2 action.destructive_requires_name: True es_instance_name: "node1" es_config: node.name: "node1" node.data: True node.master: True es_data_dir: "/mounts/node1" 

Did I miss some required var?

I did try /etc/init.d/node1_elasticsearch start and it did not work, nor did it output any errors. Just Starting ... [OK]. /var/logs/elasticsearch is empty so I can't figure anything out from there.

So, what obvious step am I missing?

Should this kind of question be posted on discuss.elastic.co somewhere instead of here? If so, what forum?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions