jd / pifpaf

Python fixtures and daemon managing tools for functional testing
Apache License 2.0
193 stars 39 forks source link

elasticsearch fails to run on Arch Linux #17

Open felixonmars opened 8 years ago

felixonmars commented 8 years ago

I am getting the following errors when running the test suite for elasticsearch. I am not really familiar with elasticsearch myself, please let me know how I should proceed to test, thanks!

======================================================================
FAIL: pifpaf.tests.test_drivers.TestDrivers.test_elasticsearch
tags: worker-7
----------------------------------------------------------------------
traceback-1: {{{
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/fixtures/fixture.py", line 197, in setUp
    self._setUp()
  File "/home/felix/projects/pifpaf/pifpaf/drivers/elasticsearch.py", line 46, in _setUp
    wait_for_line=" started")
  File "/home/felix/projects/pifpaf/pifpaf/drivers/__init__.py", line 135, in _exec
    % (wait_for_line, b"".join(lines)))
RuntimeError: Program did not print: ` started'
Output: b'Exception in thread "main" ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config];\nLikely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config\n\tat sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)\n\tat sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)\n\tat sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)\n\tat sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)\n\tat java.nio.file.Files.readAttributes(Files.java:1737)\n\tat java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)\n\tat java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)\n\tat java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)\n\tat java.nio.file.Files.walkFileTree(Files.java:2662)\n\tat org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142)\n\tat org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103)\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:243)\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\nRefer to the log for complete error details.\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/fixtures/fixture.py", line 208, in setUp
    raise SetupError(details)
fixtures.fixture.SetupError: {}
}}}

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/fixtures/fixture.py", line 197, in setUp
    self._setUp()
  File "/home/felix/projects/pifpaf/pifpaf/drivers/elasticsearch.py", line 46, in _setUp
    wait_for_line=" started")
  File "/home/felix/projects/pifpaf/pifpaf/drivers/__init__.py", line 135, in _exec
    % (wait_for_line, b"".join(lines)))
RuntimeError: Program did not print: ` started'
Output: b'Exception in thread "main" ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config];\nLikely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config\n\tat sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)\n\tat sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)\n\tat sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)\n\tat sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)\n\tat java.nio.file.Files.readAttributes(Files.java:1737)\n\tat java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)\n\tat java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)\n\tat java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)\n\tat java.nio.file.Files.walkFileTree(Files.java:2662)\n\tat org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142)\n\tat org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103)\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:243)\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\nRefer to the log for complete error details.\n'
jd commented 8 years ago

What version and OS are you running? It seems it looks for /usr/share/elasticsearch/config but can't find it.

felixonmars commented 8 years ago

It is elasticsearch 2.3.4 on Arch Linux x86_64.

jd commented 8 years ago

Ok, I have the same version on Darwin here. Is the config file/dir present?

felixonmars commented 8 years ago

No, it doesn't :(

jd commented 8 years ago

According to https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/elasticsearch#n39 the path should be replaced by /etc/elasticsearch in the script. So it's weird. I don't have any Arch Linux around to debug, but if anyone has time to dig into that…

sitilge commented 6 years ago

Ping, the same problem.