Getting elasticSearch host not found Error when trying to do the local setup using installation docs

I was following Installation — BookBrainz Developer Docs 0.1 documentation docs for setting up my enviornment. I followed everything but when I ran develop docker script , I am getting a error which says: Waiting for elasticsearch:9200 .elasticsearch: forward host lookup failed: Unknown host . I will be glad if someone could help.

Welcome @AkhilJ321 !
Can you try running the command docker-compose up elasticsearch in your terminal and paste the ouput logs into a gist or pastebin?
It’s hard to know what could be wrong without seeing any error message or something.
Running the docker container should give us a clue as to what might be happening.

when I ran the command jdk errors came but i have also installed jdk enviornment properly and its version is:
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7)
OpenJDK 64-Bit Server VM (build 19.0.2+7, mixed mode)

docker-compose up elasticsearch
[+] Running 1/0
 ⠿ Container elasticsearch  Running                                      0.0s
Attaching to elasticsearch
elasticsearch exited with code 139
^[[A^[[Delasticsearch  | #
elasticsearch  | # A fatal error has been detected by the Java Runtime Environment:
elasticsearch  | #
elasticsearch  | #  SIGSEGV (0xb) at pc=0x00007fc48f419a37, pid=1, tid=0x00007fc490202700
elasticsearch  | #
elasticsearch  | # JRE version: OpenJDK Runtime Environment (8.0_161-b14) (build 1.8.0_161-b14)
elasticsearch  | # Java VM: OpenJDK 64-Bit Server VM (25.161-b14 mixed mode linux-amd64 compressed oops)
elasticsearch  | # Problematic frame:
elasticsearch  | # C  [libc.so.6+0x36a37]  abort+0x297
elasticsearch  | #
elasticsearch  | # Core dump written. Default location: /usr/share/elasticsearch/core or core.1
elasticsearch  | #
elasticsearch  | # Can not save log file, dump to screen..
elasticsearch  | #
elasticsearch  | # A fatal error has been detected by the Java Runtime Environment:
elasticsearch  | #
elasticsearch  | #  SIGSEGV (0xb) at pc=0x00007fc48f419a37, pid=1, tid=0x00007fc490202700
elasticsearch  | #
elasticsearch  | # JRE version: OpenJDK Runtime Environment (8.0_161-b14) (build 1.8.0_161-b14)
elasticsearch  | # Java VM: OpenJDK 64-Bit Server VM (25.161-b14 mixed mode linux-amd64 compressed oops)
elasticsearch  | # Problematic frame:
elasticsearch  | # C  [libc.so.6+0x36a37]  abort+0x297
elasticsearch  | #
elasticsearch  | # Core dump written. Default location: /usr/share/elasticsearch/core or core.1
elasticsearch  | #
elasticsearch  | # If you would like to submit a bug report, please visit:
elasticsearch  | #   http://bugreport.java.com/bugreport/crash.jsp
elasticsearch  | # The crash happened outside the Java Virtual Machine in native code.
elasticsearch  | # See problematic frame for where to report the bug.
elasticsearch  | #
elasticsearch  | 
elasticsearch  | ---------------  T H R E A D  ---------------
elasticsearch  | 
elasticsearch  | Current thread (0x00007fc48800b210):  JavaThread "main" [_thread_in_native, id=46, stack(0x00007fc490102000,0x00007fc490203000)]
elasticsearch  | 
elasticsearch  | siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000
elasticsearch  | 
elasticsearch  | Registers:
elasticsearch  | RAX=0x0000000000000006, RBX=0x000000000000001c, RCX=0x00007fc48f4181f7, RDX=0x0000000000000006
elasticsearch  | RSP=0x00007fc4901fc470, RBP=0x00007fc4901fc6e0, RSI=0x000000000000002e, RDI=0x0000000000000001
elasticsearch  | R8 =0x0000000000000000, R9 =0x00007fc4901fc3c0, R10=0x0000000000000008, R11=0x0000000000000202
elasticsearch  | R12=0x00007ffce5811c90, R13=0x00007fc43e0edd58, R14=0x0000000000000001, R15=0x00007fc43e0edd50
elasticsearch  | RIP=0x00007fc48f419a37, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000000
elasticsearch  |   TRAPNO=0x000000000000000d
elasticsearch  | 
elasticsearch  | Top of Stack: (sp=0x00007fc4901fc470)
elasticsearch  | 0x00007fc4901fc470:   0000000000000020 0000000000000000
elasticsearch  | 0x00007fc4901fc480:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc490:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4a0:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4b0:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4c0:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4d0:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4e0:   0000000000000000 0000000000000000
elasticsearch  | 0x00007fc4901fc4f0:   0000000000000000 ffffffffffffffff
elasticsearch  | 0x00007fc4901fc500:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc510:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc520:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc530:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc540:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc550:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc560:   ffffffffffffffff ffffffffffffffff
elasticsearch  | 0x00007fc4901fc570:   ffffffffffffffff 0000000000000000
elasticsearch  | 0x00007fc4901fc580:   0000000000000000 00007fc4884773c0
elasticsearch  | 0x00007fc4901fc590:   000000000000000c 00007fc43dedb92f
elasticsearch  | 0x00007fc4901fc5a0:   000000003ffffff8 000000003ffffff8
elasticsearch  | 0x00007fc4901fc5b0:   0000000000000004 0000000000000000
elasticsearch  | 0x00007fc4901fc5c0:   0000005b00000034 00007fc488476de0
elasticsearch  | 0x00007fc4901fc5d0:   00007fc43e0f49d0 0000000000000006
elasticsearch  | 0x00007fc4901fc5e0:   00007fc43e0f12c0 00007fc43e300ff8
elasticsearch  | 0x00007fc4901fc5f0:   00007fc4901fc730 00007fc48fff6f9f
elasticsearch  | 0x00007fc4901fc600:   00007fc400000001 0000000000000000
elasticsearch  | 0x00007fc4901fc610:   0000011d0000007c 00007fc48fffb659
elasticsearch  | 0x00007fc4901fc620:   00007fc4901fc6a0 00007fc4901fc6a8
elasticsearch  | 0x00007fc4901fc630:   00007fc4901fc6b8 0000000000000000
elasticsearch  | 0x00007fc4901fc640:   00007fc4901fc718 0000000000000000
elasticsearch  | 0x00007fc4901fc650:   0000000000000000 00007fc4901fc6b0
elasticsearch  | 0x00007fc4901fc660:   00007fc43e0f23b8 00007fc4901fc718 
elasticsearch  | 
elasticsearch  | Instructions: (pc=0x00007fc48f419a37)
elasticsearch  | 0x00007fc48f419a17:   00 00 c7 05 fd 73 38 00 06 00 00 00 e8 98 e7 ff
elasticsearch  | 0x00007fc48f419a27:   ff 8b 05 f2 73 38 00 83 f8 06 0f 85 fa fd ff ff
elasticsearch  | 0x00007fc48f419a37:   f4 bf 7f 00 00 00 c7 05 d9 73 38 00 08 00 00 00
elasticsearch  | 0x00007fc48f419a47:   e8 a4 8a 08 00 48 8d 3d bd 73 38 00 48 81 ec 80 
elasticsearch  | 
elasticsearch  | Register to memory mapping:
elasticsearch  | 
elasticsearch  | RAX=0x0000000000000006 is an unknown value
elasticsearch  | RBX=0x000000000000001c is an unknown value
elasticsearch  | RCX=0x00007fc48f4181f7: gsignal+0x37 in /lib64/libc.so.6 at 0x00007fc48f3e3000
elasticsearch  | RDX=0x0000000000000006 is an unknown value
elasticsearch  | RSP=0x00007fc4901fc470 is pointing into the stack for thread: 0x00007fc48800b210
elasticsearch  | RBP=0x00007fc4901fc6e0 is pointing into the stack for thread: 0x00007fc48800b210
elasticsearch  | RSI=0x000000000000002e is an unknown value
elasticsearch  | RDI=0x0000000000000001 is an unknown value
elasticsearch  | R8 =0x0000000000000000 is an unknown value
elasticsearch  | R9 =0x00007fc4901fc3c0 is pointing into the stack for thread: 0x00007fc48800b210
elasticsearch  | R10=0x0000000000000008 is an unknown value
elasticsearch  | R11=0x0000000000000202 is an unknown value
elasticsearch  | R12=0x00007ffce5811c90 is an unknown value
elasticsearch  | R13=0x00007fc43e0edd58: <offset 0x216d58> in /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/amd64/libnet.so at 0x00007fc43ded7000
elasticsearch  | R14=0x0000000000000001 is an unknown value
elasticsearch  | R15=0x00007fc43e0edd50: <offset 0x216d50> in /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/amd64/libnet.so at 0x00007fc43ded7000
elasticsearch  | 
elasticsearch  | 
elasticsearch  | Stack: [0x00007fc490102000,0x00007fc490203000],  sp=0x00007fc4901fc470,  free space=1001k
elasticsearch  | Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
elasticsearch  | C  [libc.so.6+0x36a37]  abort+0x297
elasticsearch  | C  [ld-linux-x86-64.so.2+0xf4c3]  _dl_init_internal+0x113
elasticsearch  | 
elasticsearch  | Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
elasticsearch  | j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;Z)V+0
elasticsearch  | j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+328
elasticsearch  | j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+217
elasticsearch  | j  java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
elasticsearch  | j  java.lang.System.loadLibrary(Ljava/lang/String;)V+7
elasticsearch  | j  sun.nio.fs.UnixNativeDispatcher$1.run()Ljava/lang/Void;+2
elasticsearch  | j  sun.nio.fs.UnixNativeDispatcher$1.run()Ljava/lang/Object;+1
elasticsearch  | v  ~StubRoutines::call_stub
elasticsearch  | j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
elasticsearch  | j  sun.nio.fs.UnixNativeDispatcher.<clinit>()V+7
elasticsearch  | v  ~StubRoutines::call_stub
elasticsearch  | j  sun.nio.fs.UnixFileSystem.<init>(Lsun/nio/fs/UnixFileSystemProvider;Ljava/lang/String;)V+92
elasticsearch  | j  sun.nio.fs.LinuxFileSystem.<init>(Lsun/nio/fs/UnixFileSystemProvider;Ljava/lang/String;)V+3
elasticsearch  | j  sun.nio.fs.LinuxFileSystemProvider.newFileSystem(Ljava/lang/String;)Lsun/nio/fs/LinuxFileSystem;+6
elasticsearch  | j  sun.nio.fs.LinuxFileSystemProvider.newFileSystem(Ljava/lang/String;)Lsun/nio/fs/UnixFileSystem;+2
elasticsearch  | j  sun.nio.fs.UnixFileSystemProvider.<init>()V+13
elasticsearch  | j  sun.nio.fs.LinuxFileSystemProvider.<init>()V+1
elasticsearch  | v  ~StubRoutines::call_stub
elasticsearch  | j  sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;+0
elasticsearch  | j  sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+85
elasticsearch  | j  sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+5
elasticsearch  | j  java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+79
elasticsearch  | j  java.lang.Class.newInstance()Ljava/lang/Object;+138
elasticsearch  | j  sun.nio.fs.DefaultFileSystemProvider.createProvider(Ljava/lang/String;)Ljava/nio/file/spi/FileSystemProvider;+19
elasticsearch  | j  sun.nio.fs.DefaultFileSystemProvider.create()Ljava/nio/file/spi/FileSystemProvider;+42
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider()Ljava/nio/file/spi/FileSystemProvider;+0
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSystemHolder.access$000()Ljava/nio/file/spi/FileSystemProvider;+0
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSystemHolder$1.run()Ljava/nio/file/spi/FileSystemProvider;+0
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSystemHolder$1.run()Ljava/lang/Object;+1
elasticsearch  | v  ~StubRoutines::call_stub
elasticsearch  | j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem()Ljava/nio/file/FileSystem;+7
elasticsearch  | j  java.nio.file.FileSystems$DefaultFileSys
1 Like

Someone else had an issue that looked exactly the same.
@kellnerd did you find a solution to the issues you had running ElasticSearch?
That pesky java runtime issue resulting in a SIGSEGV error.

1 Like

Indeed, that seems to be exactly the same error that I’ve encountered five days ago:

As I have just disabled Elasticsearch for now and didn’t investigate further, I’ve got two questions for @AkhilJ321 which might help us to solve this issue:

  1. Which OS are you using?
  2. How much RAM does your computer have and do you have a swap file or a swap partition enabled or not?

1.I am using Manjaro Linux
2.Ram of system is 16GB and swap partition is not enabled in my system.

Thank you for the confirmation, that’s exactly my setup, too. So the issue is probably related to the missing swap partition indeed, as @mr_monkey guessed on IRC last week.

Even if it should be related to Manjaro in the end, it’s definitely worth to investigate further whether having a swap partition or swap file set up makes a difference.
As I’m currently happily working in a development setup without Elasticsearch, would you mind trying to setup a swap partition and test if Elasticsearch successfully runs with that?

I had already bookmarked this wiki article but haven’t tried it myself because I was busy with other things :sweat_smile:

Thanks for the response and guidance .I will try following this documentation and test it but can you tell me how did you managed to use the local enviornment without elasticsearch.

I modified my docker-compose file and commented Elasticsearch out:

I tried with making a swap partition but it didn’t work also. Still giving the same error. Now I should also go without ElasticSearch.

1 Like

A Java VM generally doesn’t segfault like this if it runs out of memory. By the stack trace, you still have 9 GB free at time it crashed.