dokku / dokku-elasticsearch

an elasticsearch plugin for dokku
MIT License
93 stars 35 forks source link

5.3.0 container stuck at restarting #53

Closed AlmightyOatmeal closed 5 years ago

AlmightyOatmeal commented 7 years ago

Creating an instance via:

# export ELASTICSEARCH_IMAGE="elasticsearch"
# export ELASTICSEARCH_IMAGE_VERSION="5.3.0"
# dokku elasticsearch:create vonavi-dokku-01
=====> Copying config files into place
       Waiting for container to be ready
  ERROR: unable to connect

It's stuck restarting:

# dokku elasticsearch:list
NAME             VERSION              STATUS      EXPOSED PORTS  LINKS
vonavi-dokku-01  elasticsearch:5.3.0  restarting  -
# docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS                          PORTS               NAMES
19c846557ea2        elasticsearch:5.3.0   "/docker-entrypoin..."   44 seconds ago      Restarting (1) 10 seconds ago                       dokku.elasticsearch.vonavi-dokku-01

It looks like it does right away:

# sudo dokku elasticsearch:start vonavi-dokku-01; docker logs --tail 50 --follow --timestamps 09f18065711c
-----> Starting container
=====> Container started
2017-07-13T20:56:33.187847336Z CmaFree:               0 kB
2017-07-13T20:56:33.187857343Z HugePages_Total:       0
2017-07-13T20:56:33.187867600Z HugePages_Free:        0
2017-07-13T20:56:33.187877843Z HugePages_Rsvd:        0
2017-07-13T20:56:33.187887793Z HugePages_Surp:        0
2017-07-13T20:56:33.187897690Z Hugepagesize:       2048 kB
2017-07-13T20:56:33.187907616Z DirectMap4k:       55276 kB
2017-07-13T20:56:33.187917736Z DirectMap2M:      468992 kB
2017-07-13T20:56:33.187928023Z DirectMap1G:           0 kB
2017-07-13T20:56:33.187938303Z
2017-07-13T20:56:33.187948300Z
2017-07-13T20:56:33.187960490Z CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 62 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, tsc
2017-07-13T20:56:33.187973006Z
2017-07-13T20:56:33.187983013Z /proc/cpuinfo:
2017-07-13T20:56:33.187993186Z processor    : 0
2017-07-13T20:56:33.188003843Z vendor_id    : GenuineIntel
2017-07-13T20:56:33.188014230Z cpu family   : 6
2017-07-13T20:56:33.188033446Z model        : 62
2017-07-13T20:56:33.188044976Z model name   : Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
2017-07-13T20:56:33.188085980Z stepping : 4
2017-07-13T20:56:33.188097636Z microcode    : 0x1
2017-07-13T20:56:33.188108230Z cpu MHz      : 2399.998
2017-07-13T20:56:33.188118963Z cache size   : 15360 KB
2017-07-13T20:56:33.188129436Z physical id  : 0
2017-07-13T20:56:33.188139990Z siblings : 1
2017-07-13T20:56:33.188150120Z core id      : 0
2017-07-13T20:56:33.188160216Z cpu cores    : 1
2017-07-13T20:56:33.188170386Z apicid       : 0
2017-07-13T20:56:33.188180840Z initial apicid   : 0
2017-07-13T20:56:33.188190906Z fpu      : yes
2017-07-13T20:56:33.188201446Z fpu_exception    : yes
2017-07-13T20:56:33.188211933Z cpuid level  : 13
2017-07-13T20:56:33.188222310Z wp       : yes
2017-07-13T20:56:33.188232723Z flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm vnmi ept fsgsbase tsc_adjust smep erms xsaveopt arat
2017-07-13T20:56:33.188246530Z bugs     :
2017-07-13T20:56:33.188256713Z bogomips : 4799.99
2017-07-13T20:56:33.188266753Z clflush size : 64
2017-07-13T20:56:33.188276856Z cache_alignment  : 64
2017-07-13T20:56:33.188286953Z address sizes    : 40 bits physical, 48 bits virtual
2017-07-13T20:56:33.188297330Z power management:
2017-07-13T20:56:33.188307170Z
2017-07-13T20:56:33.188316790Z
2017-07-13T20:56:33.188326430Z
2017-07-13T20:56:33.188336123Z Memory: 4k page, physical 500064k(5828k free), swap 0k(0k free)
2017-07-13T20:56:33.188346476Z
2017-07-13T20:56:33.188356200Z vm_info: OpenJDK 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-8u121-b13-1~bpo8+1-b13), built on Jan 24 2017 09:37:46 by "pbuilder" with gcc 4.9.2
2017-07-13T20:56:33.188367920Z
2017-07-13T20:56:33.188377580Z time: Thu Jul 13 20:56:33 2017
2017-07-13T20:56:33.188387660Z elapsed time: 0 seconds (0d 0h 0m 0s)
2017-07-13T20:56:33.188398010Z
2017-07-13T20:57:04.821832721Z #
2017-07-13T20:57:04.821953488Z # There is insufficient memory for the Java Runtime Environment to continue.
2017-07-13T20:57:04.821971038Z # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
2017-07-13T20:57:04.822006438Z OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
2017-07-13T20:57:04.829359974Z # Can not save log file, dump to screen..
2017-07-13T20:57:04.829437578Z #
2017-07-13T20:57:04.829452871Z # There is insufficient memory for the Java Runtime Environment to continue.
2017-07-13T20:57:04.829464411Z # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
2017-07-13T20:57:04.829514811Z # Possible reasons:
2017-07-13T20:57:04.829526528Z #   The system is out of physical RAM or swap space
2017-07-13T20:57:04.829537334Z #   In 32 bit mode, the process size limit was hit
2017-07-13T20:57:04.829548384Z # Possible solutions:
2017-07-13T20:57:04.829558998Z #   Reduce memory load on the system
2017-07-13T20:57:04.829569658Z #   Increase physical memory or swap space
2017-07-13T20:57:04.829580024Z #   Check if swap backing store is full
2017-07-13T20:57:04.829590264Z #   Use 64 bit Java on a 64 bit OS
2017-07-13T20:57:04.829600258Z #   Decrease Java heap size (-Xmx/-Xms)
2017-07-13T20:57:04.829639458Z #   Decrease number of Java threads
2017-07-13T20:57:04.829664594Z #   Decrease Java thread stack sizes (-Xss)
2017-07-13T20:57:04.829685324Z #   Set larger code cache with -XX:ReservedCodeCacheSize=
2017-07-13T20:57:04.829704404Z # This output file may be truncated or incomplete.
2017-07-13T20:57:04.829716104Z #
2017-07-13T20:57:04.829726351Z #  Out of Memory Error (os_linux.cpp:2630), pid=1, tid=0x00007fd36b24c700
2017-07-13T20:57:04.829737628Z #
2017-07-13T20:57:04.829792424Z # JRE version:  (8.0_121-b13) (build )
2017-07-13T20:57:04.829803881Z # Java VM: OpenJDK 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops)
2017-07-13T20:57:04.829815148Z # Core dump written. Default location: /usr/share/elasticsearch/core or core.1
2017-07-13T20:57:04.829826111Z #
2017-07-13T20:57:04.829836034Z
2017-07-13T20:57:04.829846511Z ---------------  T H R E A D  ---------------
2017-07-13T20:57:04.829857234Z
2017-07-13T20:57:04.829867481Z Current thread (0x00007fd36400b800):  JavaThread "Unknown thread" [_thread_in_vm, id=35, stack(0x00007fd36b14c000,0x00007fd36b24d000)]
2017-07-13T20:57:04.829879641Z
2017-07-13T20:57:04.829889764Z Stack: [0x00007fd36b14c000,0x00007fd36b24d000],  sp=0x00007fd36b24b520,  free space=1021k
2017-07-13T20:57:04.829900531Z Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
2017-07-13T20:57:04.829911314Z V  [libjvm.so+0xa9700d]
2017-07-13T20:57:04.829921631Z V  [libjvm.so+0x4ea26c]
2017-07-13T20:57:04.829932158Z V  [libjvm.so+0x8e2b90]
2017-07-13T20:57:04.829942594Z V  [libjvm.so+0x8dd27e]
2017-07-13T20:57:04.829952901Z V  [libjvm.so+0xa93d2c]
2017-07-13T20:57:04.829963128Z V  [libjvm.so+0x5f4360]
2017-07-13T20:57:04.829991444Z V  [libjvm.so+0x4c878d]
2017-07-13T20:57:04.830003334Z V  [libjvm.so+0x5f51d1]
2017-07-13T20:57:04.830014005Z V  [libjvm.so+0x5def9f]
2017-07-13T20:57:04.830024185Z V  [libjvm.so+0xa5ad19]
2017-07-13T20:57:04.830034148Z V  [libjvm.so+0xa5af32]
2017-07-13T20:57:04.830044128Z V  [libjvm.so+0x6372ef]
2017-07-13T20:57:04.830054095Z V  [libjvm.so+0xa3dc3a]
2017-07-13T20:57:04.830064125Z V  [libjvm.so+0x6ad815]  JNI_CreateJavaVM+0x65
2017-07-13T20:57:04.830074371Z C  [libjli.so+0x2f6e]
2017-07-13T20:57:04.830084301Z C  [libjli.so+0x74bd]
2017-07-13T20:57:04.830094261Z C  [libpthread.so.0+0x8064]  start_thread+0xc4
2017-07-13T20:57:04.830104491Z
2017-07-13T20:57:04.830114208Z
2017-07-13T20:57:04.830124241Z ---------------  P R O C E S S  ---------------
2017-07-13T20:57:04.830134691Z
2017-07-13T20:57:04.830144541Z Java Threads: ( => current thread )
2017-07-13T20:57:04.830155921Z
2017-07-13T20:57:04.830165775Z Other Threads:
2017-07-13T20:57:04.830175991Z
2017-07-13T20:57:04.830190041Z =>0x00007fd36400b800 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=35, stack(0x00007fd36b14c000,0x00007fd36b24d000)]
2017-07-13T20:57:04.830202955Z
2017-07-13T20:57:04.830213005Z VM state:not at safepoint (not fully initialized)
2017-07-13T20:57:04.830223585Z
2017-07-13T20:57:04.830233445Z VM Mutex/Monitor currently owned by a thread: None
2017-07-13T20:57:04.830244045Z
2017-07-13T20:57:04.830253911Z GC Heap History (0 events):
2017-07-13T20:57:04.830264225Z No events
2017-07-13T20:57:04.830274231Z
2017-07-13T20:57:04.830284115Z Deoptimization events (0 events):
2017-07-13T20:57:04.830294335Z No events
2017-07-13T20:57:04.830304441Z
2017-07-13T20:57:04.830314418Z Internal exceptions (0 events):
2017-07-13T20:57:04.830324725Z No events
2017-07-13T20:57:04.830334808Z
2017-07-13T20:57:04.830344771Z Events (0 events):
2017-07-13T20:57:04.830355035Z No events
2017-07-13T20:57:04.830365261Z
2017-07-13T20:57:04.830375198Z
2017-07-13T20:57:04.830385048Z Dynamic libraries:
2017-07-13T20:57:04.830395028Z 00400000-00401000 r-xp 00000000 00:2a 102                                /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
2017-07-13T20:57:04.830406085Z 00600000-00601000 r--p 00000000 00:2a 102                                /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
2017-07-13T20:57:04.830416985Z 00601000-00602000 rw-p 00001000 00:2a 102                                /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
2017-07-13T20:57:04.830437098Z 006cc000-006ed000 rw-p 00000000 00:00 0                                  [heap]
2017-07-13T20:57:04.830448955Z 80000000-85330000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830459458Z 7fd350000000-7fd350021000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830469731Z 7fd350021000-7fd354000000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830479908Z 7fd354228000-7fd354353000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830490245Z 7fd354353000-7fd354729000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830546581Z 7fd354729000-7fd35472a000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830558848Z 7fd35472a000-7fd35472b000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830569528Z 7fd35472b000-7fd354835000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830579818Z 7fd354835000-7fd354beb000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830590088Z 7fd354beb000-7fd354e5b000 rwxp 00000000 00:00 0
2017-07-13T20:57:04.830600365Z 7fd354e5b000-7fd363beb000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830610735Z 7fd363beb000-7fd363bf3000 r-xp 00000000 00:2a 162                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so
2017-07-13T20:57:04.830622068Z 7fd363bf3000-7fd363df2000 ---p 00008000 00:2a 162                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so
2017-07-13T20:57:04.830633371Z 7fd363df2000-7fd363df3000 r--p 00007000 00:2a 162                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so
2017-07-13T20:57:04.830644671Z 7fd363df3000-7fd363df4000 rw-p 00008000 00:2a 162                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so
2017-07-13T20:57:04.830656258Z 7fd363df4000-7fd363dff000 r-xp 00000000 00:2a 73                         /lib/x86_64-linux-gnu/libnss_files-2.19.so
2017-07-13T20:57:04.830667148Z 7fd363dff000-7fd363ffe000 ---p 0000b000 00:2a 73                         /lib/x86_64-linux-gnu/libnss_files-2.19.so
2017-07-13T20:57:04.830679221Z 7fd363ffe000-7fd363fff000 r--p 0000a000 00:2a 73                         /lib/x86_64-linux-gnu/libnss_files-2.19.so
2017-07-13T20:57:04.830690148Z 7fd363fff000-7fd364000000 rw-p 0000b000 00:2a 73                         /lib/x86_64-linux-gnu/libnss_files-2.19.so
2017-07-13T20:57:04.830700868Z 7fd364000000-7fd364034000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830710931Z 7fd364034000-7fd368000000 ---p 00000000 00:00 0
2017-07-13T20:57:04.830721005Z 7fd368015000-7fd36801f000 r-xp 00000000 00:2a 71                         /lib/x86_64-linux-gnu/libnss_nis-2.19.so
2017-07-13T20:57:04.830731611Z 7fd36801f000-7fd36821e000 ---p 0000a000 00:2a 71                         /lib/x86_64-linux-gnu/libnss_nis-2.19.so
2017-07-13T20:57:04.830742195Z 7fd36821e000-7fd36821f000 r--p 00009000 00:2a 71                         /lib/x86_64-linux-gnu/libnss_nis-2.19.so
2017-07-13T20:57:04.830752771Z 7fd36821f000-7fd368220000 rw-p 0000a000 00:2a 71                         /lib/x86_64-linux-gnu/libnss_nis-2.19.so
2017-07-13T20:57:04.830774071Z 7fd368220000-7fd368235000 r-xp 00000000 00:2a 69                         /lib/x86_64-linux-gnu/libnsl-2.19.so
2017-07-13T20:57:04.830786345Z 7fd368235000-7fd368434000 ---p 00015000 00:2a 69                         /lib/x86_64-linux-gnu/libnsl-2.19.so
2017-07-13T20:57:04.830797631Z 7fd368434000-7fd368435000 r--p 00014000 00:2a 69                         /lib/x86_64-linux-gnu/libnsl-2.19.so
2017-07-13T20:57:04.830808655Z 7fd368435000-7fd368436000 rw-p 00015000 00:2a 69                         /lib/x86_64-linux-gnu/libnsl-2.19.so
2017-07-13T20:57:04.830819545Z 7fd368436000-7fd368438000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.830829852Z 7fd368438000-7fd36843f000 r-xp 00000000 00:2a 67                         /lib/x86_64-linux-gnu/libnss_compat-2.19.so
2017-07-13T20:57:04.830840745Z 7fd36843f000-7fd36863e000 ---p 00007000 00:2a 67                         /lib/x86_64-linux-gnu/libnss_compat-2.19.so
2017-07-13T20:57:04.830851592Z 7fd36863e000-7fd36863f000 r--p 00006000 00:2a 67                         /lib/x86_64-linux-gnu/libnss_compat-2.19.so
2017-07-13T20:57:04.830862405Z 7fd36863f000-7fd368640000 rw-p 00007000 00:2a 67                         /lib/x86_64-linux-gnu/libnss_compat-2.19.so
2017-07-13T20:57:04.830873245Z 7fd368640000-7fd36866e000 r-xp 00000000 00:2a 109                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjava.so
2017-07-13T20:57:04.830884312Z 7fd36866e000-7fd36886d000 ---p 0002e000 00:2a 109                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjava.so
2017-07-13T20:57:04.830897948Z 7fd36886d000-7fd36886e000 r--p 0002d000 00:2a 109                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjava.so
2017-07-13T20:57:04.830910392Z 7fd36886e000-7fd368870000 rw-p 0002e000 00:2a 109                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjava.so
2017-07-13T20:57:04.830921748Z 7fd368870000-7fd36887f000 r-xp 00000000 00:2a 157                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libverify.so
2017-07-13T20:57:04.830932938Z 7fd36887f000-7fd368a7f000 ---p 0000f000 00:2a 157                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libverify.so
2017-07-13T20:57:04.830943985Z 7fd368a7f000-7fd368a82000 r--p 0000f000 00:2a 157                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libverify.so
2017-07-13T20:57:04.830955062Z 7fd368a82000-7fd368a83000 rw-p 00012000 00:2a 157                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libverify.so
2017-07-13T20:57:04.830966095Z 7fd368a83000-7fd368a8a000 r-xp 00000000 00:2a 156                        /lib/x86_64-linux-gnu/librt-2.19.so
2017-07-13T20:57:04.830977032Z 7fd368a8a000-7fd368c89000 ---p 00007000 00:2a 156                        /lib/x86_64-linux-gnu/librt-2.19.so
2017-07-13T20:57:04.830987845Z 7fd368c89000-7fd368c8a000 r--p 00006000 00:2a 156                        /lib/x86_64-linux-gnu/librt-2.19.so
2017-07-13T20:57:04.830998668Z 7fd368c8a000-7fd368c8b000 rw-p 00007000 00:2a 156                        /lib/x86_64-linux-gnu/librt-2.19.so
2017-07-13T20:57:04.831009472Z 7fd368c8b000-7fd368ca1000 r-xp 00000000 00:2a 119                        /lib/x86_64-linux-gnu/libgcc_s.so.1
2017-07-13T20:57:04.831028625Z 7fd368ca1000-7fd368ea0000 ---p 00016000 00:2a 119                        /lib/x86_64-linux-gnu/libgcc_s.so.1
2017-07-13T20:57:04.831040535Z 7fd368ea0000-7fd368ea1000 rw-p 00015000 00:2a 119                        /lib/x86_64-linux-gnu/libgcc_s.so.1
2017-07-13T20:57:04.831051632Z 7fd368ea1000-7fd368fa1000 r-xp 00000000 00:2a 118                        /lib/x86_64-linux-gnu/libm-2.19.so
2017-07-13T20:57:04.831062578Z 7fd368fa1000-7fd3691a0000 ---p 00100000 00:2a 118                        /lib/x86_64-linux-gnu/libm-2.19.so
2017-07-13T20:57:04.831073622Z 7fd3691a0000-7fd3691a1000 r--p 000ff000 00:2a 118                        /lib/x86_64-linux-gnu/libm-2.19.so
2017-07-13T20:57:04.831084458Z 7fd3691a1000-7fd3691a2000 rw-p 00100000 00:2a 118                        /lib/x86_64-linux-gnu/libm-2.19.so
2017-07-13T20:57:04.831096585Z 7fd3691a2000-7fd36928e000 r-xp 00000000 00:2a 116                        /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
2017-07-13T20:57:04.831108065Z 7fd36928e000-7fd36948e000 ---p 000ec000 00:2a 116                        /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
2017-07-13T20:57:04.831119172Z 7fd36948e000-7fd369496000 r--p 000ec000 00:2a 116                        /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
2017-07-13T20:57:04.831130372Z 7fd369496000-7fd369498000 rw-p 000f4000 00:2a 116                        /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
2017-07-13T20:57:04.831141452Z 7fd369498000-7fd3694ad000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831151762Z 7fd3694ad000-7fd36a145000 r-xp 00000000 00:2a 114                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
2017-07-13T20:57:04.831163038Z 7fd36a145000-7fd36a345000 ---p 00c98000 00:2a 114                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
2017-07-13T20:57:04.831174222Z 7fd36a345000-7fd36a3e8000 r--p 00c98000 00:2a 114                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
2017-07-13T20:57:04.831185445Z 7fd36a3e8000-7fd36a411000 rw-p 00d3b000 00:2a 114                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
2017-07-13T20:57:04.831196512Z 7fd36a411000-7fd36a442000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831206675Z 7fd36a442000-7fd36a5e3000 r-xp 00000000 00:2a 41                         /lib/x86_64-linux-gnu/libc-2.19.so
2017-07-13T20:57:04.831217468Z 7fd36a5e3000-7fd36a7e3000 ---p 001a1000 00:2a 41                         /lib/x86_64-linux-gnu/libc-2.19.so
2017-07-13T20:57:04.831228245Z 7fd36a7e3000-7fd36a7e7000 r--p 001a1000 00:2a 41                         /lib/x86_64-linux-gnu/libc-2.19.so
2017-07-13T20:57:04.831239095Z 7fd36a7e7000-7fd36a7e9000 rw-p 001a5000 00:2a 41                         /lib/x86_64-linux-gnu/libc-2.19.so
2017-07-13T20:57:04.831249765Z 7fd36a7e9000-7fd36a7ed000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831260472Z 7fd36a7ed000-7fd36a7f0000 r-xp 00000000 00:2a 39                         /lib/x86_64-linux-gnu/libdl-2.19.so
2017-07-13T20:57:04.831271298Z 7fd36a7f0000-7fd36a9ef000 ---p 00003000 00:2a 39                         /lib/x86_64-linux-gnu/libdl-2.19.so
2017-07-13T20:57:04.831282282Z 7fd36a9ef000-7fd36a9f0000 r--p 00002000 00:2a 39                         /lib/x86_64-linux-gnu/libdl-2.19.so
2017-07-13T20:57:04.831299582Z 7fd36a9f0000-7fd36a9f1000 rw-p 00003000 00:2a 39                         /lib/x86_64-linux-gnu/libdl-2.19.so
2017-07-13T20:57:04.831312162Z 7fd36a9f1000-7fd36a9ff000 r-xp 00000000 00:2a 108                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
2017-07-13T20:57:04.831324005Z 7fd36a9ff000-7fd36abfe000 ---p 0000e000 00:2a 108                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
2017-07-13T20:57:04.831335635Z 7fd36abfe000-7fd36abff000 r--p 0000d000 00:2a 108                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
2017-07-13T20:57:04.831347272Z 7fd36abff000-7fd36ac00000 rw-p 0000e000 00:2a 108                        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
2017-07-13T20:57:04.831358692Z 7fd36ac00000-7fd36ac1a000 r-xp 00000000 00:2a 107                        /lib/x86_64-linux-gnu/libz.so.1.2.8
2017-07-13T20:57:04.831369752Z 7fd36ac1a000-7fd36ae19000 ---p 0001a000 00:2a 107                        /lib/x86_64-linux-gnu/libz.so.1.2.8
2017-07-13T20:57:04.831380728Z 7fd36ae19000-7fd36ae1a000 r--p 00019000 00:2a 107                        /lib/x86_64-linux-gnu/libz.so.1.2.8
2017-07-13T20:57:04.831391688Z 7fd36ae1a000-7fd36ae1b000 rw-p 0001a000 00:2a 107                        /lib/x86_64-linux-gnu/libz.so.1.2.8
2017-07-13T20:57:04.831403028Z 7fd36ae1b000-7fd36ae33000 r-xp 00000000 00:2a 85                         /lib/x86_64-linux-gnu/libpthread-2.19.so
2017-07-13T20:57:04.831414025Z 7fd36ae33000-7fd36b032000 ---p 00018000 00:2a 85                         /lib/x86_64-linux-gnu/libpthread-2.19.so
2017-07-13T20:57:04.831425145Z 7fd36b032000-7fd36b033000 r--p 00017000 00:2a 85                         /lib/x86_64-linux-gnu/libpthread-2.19.so
2017-07-13T20:57:04.831436025Z 7fd36b033000-7fd36b034000 rw-p 00018000 00:2a 85                         /lib/x86_64-linux-gnu/libpthread-2.19.so
2017-07-13T20:57:04.831447192Z 7fd36b034000-7fd36b038000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831457778Z 7fd36b038000-7fd36b058000 r-xp 00000000 00:2a 32                         /lib/x86_64-linux-gnu/ld-2.19.so
2017-07-13T20:57:04.831468868Z 7fd36b143000-7fd36b144000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831479562Z 7fd36b144000-7fd36b14c000 rw-s 00000000 00:2a 189                        /tmp/hsperfdata_elasticsearch/1
2017-07-13T20:57:04.831490495Z 7fd36b14c000-7fd36b14f000 ---p 00000000 00:00 0
2017-07-13T20:57:04.831501075Z 7fd36b14f000-7fd36b253000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831511585Z 7fd36b253000-7fd36b255000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831522025Z 7fd36b255000-7fd36b256000 r--p 00000000 00:00 0
2017-07-13T20:57:04.831532365Z 7fd36b256000-7fd36b258000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831542758Z 7fd36b258000-7fd36b259000 r--p 00020000 00:2a 32                         /lib/x86_64-linux-gnu/ld-2.19.so
2017-07-13T20:57:04.831554615Z 7fd36b259000-7fd36b25a000 rw-p 00021000 00:2a 32                         /lib/x86_64-linux-gnu/ld-2.19.so
2017-07-13T20:57:04.831575068Z 7fd36b25a000-7fd36b25b000 rw-p 00000000 00:00 0
2017-07-13T20:57:04.831586822Z 7ffc3d90f000-7ffc3d930000 rw-p 00000000 00:00 0                          [stack]
2017-07-13T20:57:04.831597882Z 7ffc3d9f6000-7ffc3d9f8000 r--p 00000000 00:00 0                          [vvar]
2017-07-13T20:57:04.831608865Z 7ffc3d9f8000-7ffc3d9fa000 r-xp 00000000 00:00 0                          [vdso]
2017-07-13T20:57:04.831619542Z ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
2017-07-13T20:57:04.831630165Z
2017-07-13T20:57:04.831639982Z VM Arguments:
2017-07-13T20:57:04.831650125Z jvm_args: -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch
2017-07-13T20:57:04.831670895Z java_command: org.elasticsearch.bootstrap.Elasticsearch
2017-07-13T20:57:04.831683935Z java_class_path (initial): /usr/share/elasticsearch/lib/elasticsearch-5.3.0.jar:/usr/share/elasticsearch/lib/java-version-checker-5.3.0.jar:/usr/share/elasticsearch/lib/lucene-suggest-6.4.1.jar:/usr/share/elasticsearch/lib/lucene-join-6.4.1.jar:/usr/share/elasticsearch/lib/HdrHistogram-2.1.6.jar:/usr/share/elasticsearch/lib/lucene-spatial-6.4.1.jar:/usr/share/elasticsearch/lib/jackson-dataformat-yaml-2.8.6.jar:/usr/share/elasticsearch/lib/lucene-misc-6.4.1.jar:/usr/share/elasticsearch/lib/lucene-spatial3d-6.4.1.jar:/usr/share/elasticsearch/lib/lucene-grouping-6.4.1.jar:/usr/share/elasticsearch/lib/jna-4.2.2.jar:/usr/share/elasticsearch/lib/joda-time-2.9.5.jar:/usr/share/elasticsearch/lib/hppc-0.7.1.jar:/usr/share/elasticsearch/lib/jopt-simple-5.0.2.jar:/usr/share/elasticsearch/lib/t-digest-3.0.jar:/usr/share/elasticsearch/lib/lucene-queryparser-6.4.1.jar:/usr/share/elasticsearch/lib/log4j-1.2-api-2.7.jar:/usr/share/elasticsearch/lib/log4j-core-2.7.jar:/usr/share/elasticsearch/lib/securesm-1.1.jar:/usr/share/elasticsearch/lib/lucene-sandbox-6.4.1.jar:/usr/share/elasticsearch/lib/jackson-dataformat-smile-2.8.6.jar:/usr/share/elasticsearch/lib/lucene-core-6.4.1.jar:/usr/share/elasticsearch/lib/spatial4j-0.6.jar:/usr/share/elasticsearch/lib/lucene-spatial-extras-6.4.1.jar:/usr/share/elasticsearch/lib/elasticsearch-5.3.0.jar:/usr/share/elasticsearch/lib/lucene-queries-6.4.1.jar:/usr/share/elasticsearch/lib/jackson-core-2.8.6.jar:/usr/share/elasticsearch/lib/log4j-api-2.7.jar:/usr/share/elasticsearch/lib/jackson-dataformat-cbor-2.8.6.jar:/usr/share/elasticsearch/lib/jts-1.13.jar:/usr/share/elasticsearch/lib/lucene-analyzers-common-6.4.1.jar:/usr/share/elasticsearch/lib/lucene-backward-codecs-6.4.1.jar:/usr/share/elasticsearch/lib/snakeyaml-1.15.jar:/usr/share/elasticsearch/lib/lucene-memory-6.4.1.jar:/usr/share/elasticsearch/lib/lucene-highlighter-6.4.1.jar
2017-07-13T20:57:04.831778935Z Launcher Type: SUN_STANDARD
2017-07-13T20:57:04.831791369Z
2017-07-13T20:57:04.831801819Z Environment Variables:
2017-07-13T20:57:04.831812169Z JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
2017-07-13T20:57:04.831822645Z PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2017-07-13T20:57:04.831844269Z
2017-07-13T20:57:04.831855045Z Signal Handlers:
2017-07-13T20:57:04.831865425Z SIGSEGV: [libjvm.so+0xa97af0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831876682Z SIGBUS: [libjvm.so+0xa97af0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831887799Z SIGFPE: [libjvm.so+0x8de430], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831898842Z SIGPIPE: [libjvm.so+0x8de430], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831909819Z SIGXFSZ: [libjvm.so+0x8de430], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831920729Z SIGILL: [libjvm.so+0x8de430], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831931652Z SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
2017-07-13T20:57:04.831942392Z SIGUSR2: [libjvm.so+0x8de2e0], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
2017-07-13T20:57:04.831953342Z SIGHUP: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
2017-07-13T20:57:04.831964039Z SIGINT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
2017-07-13T20:57:04.831975945Z SIGTERM: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
2017-07-13T20:57:04.831987155Z SIGQUIT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
2017-07-13T20:57:04.831997972Z
2017-07-13T20:57:04.832007862Z
2017-07-13T20:57:04.832017932Z ---------------  S Y S T E M  ---------------
2017-07-13T20:57:04.832028472Z
2017-07-13T20:57:04.832038342Z OS:PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
2017-07-13T20:57:04.832048899Z NAME="Debian GNU/Linux"
2017-07-13T20:57:04.832059409Z VERSION_ID="8"
2017-07-13T20:57:04.832069442Z VERSION="8 (jessie)"
2017-07-13T20:57:04.832080079Z ID=debian
2017-07-13T20:57:04.832090329Z HOME_URL="http://www.debian.org/"
2017-07-13T20:57:04.832100899Z SUPPORT_URL="http://www.debian.org/support"
2017-07-13T20:57:04.832111275Z BUG_REPORT_URL="https://bugs.debian.org/"
2017-07-13T20:57:04.832121645Z
2017-07-13T20:57:04.832131282Z uname:Linux 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64
2017-07-13T20:57:04.832141739Z libc:glibc 2.19 NPTL 2.19
2017-07-13T20:57:04.832151802Z rlimit: STACK 8192k, CORE infinity, NPROC infinity, NOFILE 1048576, AS infinity
2017-07-13T20:57:04.832162182Z load average:0.36 0.23 0.19
2017-07-13T20:57:04.832172065Z
2017-07-13T20:57:04.832181642Z /proc/meminfo:
2017-07-13T20:57:04.832191569Z MemTotal:         500064 kB
2017-07-13T20:57:04.832225722Z MemFree:            5772 kB
2017-07-13T20:57:04.832244209Z MemAvailable:     291780 kB
2017-07-13T20:57:04.832266465Z Buffers:           11264 kB
2017-07-13T20:57:04.832284315Z Cached:           269888 kB
2017-07-13T20:57:04.832301139Z SwapCached:            0 kB
2017-07-13T20:57:04.832321769Z Active:           320204 kB
2017-07-13T20:57:04.832341329Z Inactive:         110576 kB
2017-07-13T20:57:04.832360952Z Active(anon):     153804 kB
2017-07-13T20:57:04.832381295Z Inactive(anon):     1748 kB
2017-07-13T20:57:04.832401439Z Active(file):     166400 kB
2017-07-13T20:57:04.832421816Z Inactive(file):   108828 kB
2017-07-13T20:57:04.832442676Z Unevictable:        3656 kB
2017-07-13T20:57:04.832465559Z Mlocked:            3656 kB
2017-07-13T20:57:04.832485399Z SwapTotal:             0 kB
2017-07-13T20:57:04.832506632Z SwapFree:              0 kB
2017-07-13T20:57:04.832526062Z Dirty:               116 kB
2017-07-13T20:57:04.832544679Z Writeback:             0 kB
2017-07-13T20:57:04.832563019Z AnonPages:        153340 kB
2017-07-13T20:57:04.832582562Z Mapped:            81016 kB
2017-07-13T20:57:04.832604322Z Shmem:              3504 kB
2017-07-13T20:57:04.832626252Z Slab:              37904 kB
2017-07-13T20:57:04.832646749Z SReclaimable:      23332 kB
2017-07-13T20:57:04.832669162Z SUnreclaim:        14572 kB
2017-07-13T20:57:04.832687456Z KernelStack:        2640 kB
2017-07-13T20:57:04.832707422Z PageTables:         3512 kB
2017-07-13T20:57:04.832728849Z NFS_Unstable:          0 kB
2017-07-13T20:57:04.832750919Z Bounce:                0 kB
2017-07-13T20:57:04.832770276Z WritebackTmp:          0 kB
2017-07-13T20:57:04.832786886Z CommitLimit:      250032 kB
2017-07-13T20:57:04.832797449Z Committed_AS:     662856 kB
2017-07-13T20:57:04.832807479Z VmallocTotal:   34359738367 kB
2017-07-13T20:57:04.832817622Z VmallocUsed:           0 kB
2017-07-13T20:57:04.832827616Z VmallocChunk:          0 kB
2017-07-13T20:57:04.832837429Z HardwareCorrupted:     0 kB
2017-07-13T20:57:04.832847272Z AnonHugePages:         0 kB
2017-07-13T20:57:04.832857046Z CmaTotal:              0 kB
2017-07-13T20:57:04.832866819Z CmaFree:               0 kB
2017-07-13T20:57:04.832876586Z HugePages_Total:       0
2017-07-13T20:57:04.832886406Z HugePages_Free:        0
2017-07-13T20:57:04.832896209Z HugePages_Rsvd:        0
2017-07-13T20:57:04.832905982Z HugePages_Surp:        0
2017-07-13T20:57:04.832915812Z Hugepagesize:       2048 kB
2017-07-13T20:57:04.832939439Z DirectMap4k:       55276 kB
2017-07-13T20:57:04.832950689Z DirectMap2M:      468992 kB
2017-07-13T20:57:04.832960789Z DirectMap1G:           0 kB
2017-07-13T20:57:04.832970762Z
2017-07-13T20:57:04.832980572Z
2017-07-13T20:57:04.832994776Z CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 62 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, tsc
2017-07-13T20:57:04.833006892Z
2017-07-13T20:57:04.833016592Z /proc/cpuinfo:
2017-07-13T20:57:04.833026616Z processor    : 0
2017-07-13T20:57:04.833037259Z vendor_id    : GenuineIntel
2017-07-13T20:57:04.833047976Z cpu family   : 6
2017-07-13T20:57:04.833058199Z model        : 62
2017-07-13T20:57:04.833068899Z model name   : Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
2017-07-13T20:57:04.833079579Z stepping : 4
2017-07-13T20:57:04.833089796Z microcode    : 0x1
2017-07-13T20:57:04.833099869Z cpu MHz      : 2399.998
2017-07-13T20:57:04.833110086Z cache size   : 15360 KB
2017-07-13T20:57:04.833119972Z physical id  : 0
2017-07-13T20:57:04.833129882Z siblings : 1
2017-07-13T20:57:04.833139672Z core id      : 0
2017-07-13T20:57:04.833149582Z cpu cores    : 1
2017-07-13T20:57:04.833159452Z apicid       : 0
2017-07-13T20:57:04.833169489Z initial apicid   : 0
2017-07-13T20:57:04.833179376Z fpu      : yes
2017-07-13T20:57:04.833189469Z fpu_exception    : yes
2017-07-13T20:57:04.833199429Z cpuid level  : 13
2017-07-13T20:57:04.833209443Z wp       : yes
2017-07-13T20:57:04.833219663Z flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm vnmi ept fsgsbase tsc_adjust smep erms xsaveopt arat
2017-07-13T20:57:04.833233156Z bugs     :
2017-07-13T20:57:04.833243246Z bogomips : 4799.99
2017-07-13T20:57:04.833253649Z clflush size : 64
2017-07-13T20:57:04.833263893Z cache_alignment  : 64
2017-07-13T20:57:04.833274103Z address sizes    : 40 bits physical, 48 bits virtual
2017-07-13T20:57:04.833284626Z power management:
2017-07-13T20:57:04.833294609Z
2017-07-13T20:57:04.833304473Z
2017-07-13T20:57:04.833314089Z
2017-07-13T20:57:04.833323726Z Memory: 4k page, physical 500064k(5772k free), swap 0k(0k free)
2017-07-13T20:57:04.833333966Z
2017-07-13T20:57:04.833350836Z vm_info: OpenJDK 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-8u121-b13-1~bpo8+1-b13), built on Jan 24 2017 09:37:46 by "pbuilder" with gcc 4.9.2
2017-07-13T20:57:04.833363599Z
2017-07-13T20:57:04.833373576Z time: Thu Jul 13 20:57:04 2017
2017-07-13T20:57:04.833383613Z elapsed time: 0 seconds (0d 0h 0m 0s)
2017-07-13T20:57:04.833393926Z

Thoughts?

AlmightyOatmeal commented 7 years ago

I missed this:

2017-07-13T20:57:04.829726351Z #  Out of Memory Error (os_linux.cpp:2630), pid=1, tid=0x00007fd36b24c700

My bad.

AlmightyOatmeal commented 7 years ago

After upgrading the host to 2G of ram, I'm still getting:

2017-07-13T21:05:28.702447206Z OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)
2017-07-13T21:05:28.702597083Z #
2017-07-13T21:05:28.702608733Z # There is insufficient memory for the Java Runtime Environment to continue.
2017-07-13T21:05:28.702613883Z # Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.
2017-07-13T21:05:28.702618903Z # Can not save log file, dump to screen..
2017-07-13T21:05:28.702623436Z #
2017-07-13T21:05:28.702674430Z # There is insufficient memory for the Java Runtime Environment to continue.
2017-07-13T21:05:28.702679850Z # Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.
2017-07-13T21:05:28.702684595Z # Possible reasons:
2017-07-13T21:05:28.702689081Z #   The system is out of physical RAM or swap space
2017-07-13T21:05:28.702693410Z #   In 32 bit mode, the process size limit was hit
2017-07-13T21:05:28.702697710Z # Possible solutions:
2017-07-13T21:05:28.702701813Z #   Reduce memory load on the system
2017-07-13T21:05:28.702706255Z #   Increase physical memory or swap space
2017-07-13T21:05:28.702710623Z #   Check if swap backing store is full
2017-07-13T21:05:28.702715011Z #   Use 64 bit Java on a 64 bit OS
2017-07-13T21:05:28.702719305Z #   Decrease Java heap size (-Xmx/-Xms)
2017-07-13T21:05:28.702723623Z #   Decrease number of Java threads
2017-07-13T21:05:28.702727793Z #   Decrease Java thread stack sizes (-Xss)
2017-07-13T21:05:28.702732043Z #   Set larger code cache with -XX:ReservedCodeCacheSize=
2017-07-13T21:05:28.702736248Z # This output file may be truncated or incomplete.
2017-07-13T21:05:28.702740550Z #
2017-07-13T21:05:28.702744583Z #  Out of Memory Error (os_linux.cpp:2630), pid=1, tid=0x00007fdbc7c7e700
2017-07-13T21:05:28.702748983Z #
2017-07-13T21:05:28.702752973Z # JRE version:  (8.0_121-b13) (build )
2017-07-13T21:05:28.702757186Z # Java VM: OpenJDK 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops)
2017-07-13T21:05:28.702761608Z # Core dump written. Default location: /usr/share/elasticsearch/core or core.1
2017-07-13T21:05:28.702795093Z #

Do you have advice on configuring the JVM memory utilization arguments?

josegonzalez commented 7 years ago

Do you have swap enabled, and is anything else using the memory on that box?

Seems its trying to use all your ram...

AlmightyOatmeal commented 7 years ago

@josegonzalez,

I do not have swap enabled.

This is a brand new Dokku droplet running on Digital Ocean and I've resized twice now to give it more resources. I'm not sure how I can use this plugin to pass in the ES_JAVA_OPTS environmental variable because this didn't work for me:

# export ELASTICSEARCH_IMAGE="elasticsearch"
# export ELASTICSEARCH_IMAGE_VERSION="5.3.0"
# export ELASTICSEARCH_CUSTOM_ENV='ES_JAVA_OPTS="-Xms512m -Xmx512m"'
# dokku elasticsearch:create vonavi-dokku-01

Because I still get:

2017-07-13T21:20:05.709147745Z OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)

So the JVM is trying to allocate more than is available and not the amount specified in ES_JAVA_OPTS.

aaronshim commented 7 years ago

@AlmightyOatmeal @josegonzalez This is also happening for me, but on Elasticsearch 5.4.3, also running on a clean 2GB Digital Ocean droplet. Were you guys ever able to find a way to limit the ES_JAVA_OPTS? Thank you for your help!

haggen commented 7 years ago

Mine is doing the same thing (restarting over and over) but here the logs keep repeating this:

Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ElasticsearchParseException[duplicate settings key [network.host] found at line number [96], column number [15], previous value [0.0.0.0], current value [0.0.0.0]];
Likely root cause: ElasticsearchParseException[duplicate settings key [network.host] found at line number [96], column number [15], previous value [0.0.0.0], current value [0.0.0.0]]
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeValue(XContentSettingsLoader.java:151)
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:109)
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:67)
    at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
    at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
    at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1080)
    at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1067)
    at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88)
    at org.elasticsearch.common.cli.CliTool.<init>(CliTool.java:107)
    at org.elasticsearch.common.cli.CliTool.<init>(CliTool.java:100)
    at org.elasticsearch.bootstrap.BootstrapCLIParser.<init>(BootstrapCLIParser.java:48)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:226)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
rabbagliettiandrea commented 7 years ago

Same here (restarting and counting..) but with a different error:

=====> Copying config files into place
       Container command retried 100 time(s): cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/
Failed to run command: cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/
josegonzalez commented 7 years ago

We don't yet support 5.x. If someone would like to sponsor my work to implement that, please reach out to me.

pnikrat commented 6 years ago

The problem with container stuck at restarting can be solved by changing the vm.max_map_count variable as hinted here: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode Of course you should remove the container that is stuck and recreate it after the vm.max_map_count change:

# export ELASTICSEARCH_IMAGE_VERSION="5.6.5"
# dokku elasticsearch:create somename
EvgenOleynikov commented 6 years ago

@pnikrat tnx! Work for me

archy-bold commented 6 years ago

I managed to solve the memory issue by updating the options in the jvm.options file in the configuration folder for the service. You can find that by running the following command:

dokku elasticsearch:info SERVICE_NAME --config-dir

Then just update the -Xmx and -Xms settings from:

-Xms2g
-Xmx2g

to

-Xms512m
-Xmx512m

Note: while you can set the environment variable for ES_JAVA_OPTS as @AlmightyOatmeal suggested, the quotes are added to the command, which causes a different error. Updating the options file will mean you don't need to set the environment variable every time.

As for @haggen's error about a duplicate settings key [network.host]. I think on starting the service, the plugin must write the network.host setting to the elasticsearch.yml config file in the same directory as jvm.options. You just need to remove the lines network.host: 0.0.0.0 from the bottom of the file and restart, that should allow it to start up. I think that must be a bug.

josegonzalez commented 6 years ago

Ah they fixed it so that it listens on 0.0.0.0 now?

archy-bold commented 6 years ago

@josegonzalez I'm not sure, I just did the above to get version 5.3.2 working on my instance.

imWildCat commented 6 years ago

@archy-bold In my occasion, it caused Error: Could not find or load main class "-Xms256m after editing the jvm.options file. Any suggestions?

archy-bold commented 6 years ago

@imWildCat Did you also run the following command?

export ELASTICSEARCH_CUSTOM_ENV='ES_JAVA_OPTS="-Xms256m -Xmx256m"'

As that will also add the options to the start service command. Just restart your ssh session on the machine or run the following to unset the env variable.

unset ELASTICSEARCH_CUSTOM_ENV

If you haven't done that, post up the top section of your jvm.options file and I'll take a look.

imWildCat commented 6 years ago

@archy-bold Thank you for your prompt reply!

I am sure that I have unset ELASTICSEARCH_CUSTOM_ENV, but it still does not work:

$ docker logs e036facc5608
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid1.log
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
echo $ELASTICSEARCH_CUSTOM_ENV

[empty]

As for my jvm.options:

## JVM configuration

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms128m
-Xmx512m

################################################################
## Expert settings
################################################################
##
## All settings below this section are considered
## expert settings. Don't tamper with them unless
## you understand what you are doing
##
################################################################

## GC configuration
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly

## optimizations

# pre-touch memory pages used by the JVM during initialization
-XX:+AlwaysPreTouch

## basic

# force the server VM (remove on 32-bit client JVMs)
-server

# explicitly set the stack size (reduce to 320k on 32-bit client JVMs)
-Xss1m

# set to headless, just in case
-Djava.awt.headless=true

# ensure UTF-8 encoding by default (e.g. filenames)
-Dfile.encoding=UTF-8

# use our provided JNA always versus the system one
-Djna.nosys=true

# use old-style file permissions on JDK9
-Djdk.io.permissionsUseCanonicalPath=true

# flags to configure Netty
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0

# log4j 2
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true

## heap dumps

# generate a heap dump when an allocation from the Java heap fails
# heap dumps are created in the working directory of the JVM
-XX:+HeapDumpOnOutOfMemoryError

# specify an alternative path for heap dumps
# ensure the directory exists and has sufficient space
#-XX:HeapDumpPath=${heap.dump.path}

## GC logging

#-XX:+PrintGCDetails
#-XX:+PrintGCTimeStamps
#-XX:+PrintGCDateStamps
#-XX:+PrintClassHistogram
#-XX:+PrintTenuringDistribution
#-XX:+PrintGCApplicationStoppedTime

# log GC status to a file with time stamps
# ensure the directory exists
#-Xloggc:${loggc}

# By default, the GC log file will not rotate.
# By uncommenting the lines below, the GC log file
# will be rotated every 128MB at most 32 times.
#-XX:+UseGCLogFileRotation
#-XX:NumberOfGCLogFiles=32
#-XX:GCLogFileSize=128M

# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
# If documents were already indexed with unquoted fields in a previous version
# of Elasticsearch, some operations may throw errors.
#
# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
# only for migration purposes.
#-Delasticsearch.json.allow_unquoted_field_names=true
archy-bold commented 6 years ago

@imWildCat Have you restarted the container? Set $ELASTICSEARCH_NAME to the name of your dokku-elasticsearch service.

ELASTICSEARCH_NAME=elastic-serivce-name-here
docker stop $(docker ps -aqf "name=$ELASTICSEARCH_NAME")
docker rm $(docker ps -aqf "name=$ELASTICSEARCH_NAME")
dokku elasticsearch:restart $ELASTICSEARCH_NAME
imWildCat commented 6 years ago

@archy-bold

Same issue. It's wired. Not matter its version is 5.6.7 or 5.3.2:

~ ⌚ 16:23:16
$ ELASTICSEARCH_NAME=es-5-01
docker stop $(docker ps -aqf "name=$ELASTICSEARCH_NAME")
docker rm $(docker ps -aqf "name=$ELASTICSEARCH_NAME")
dokku elasticsearch:restart $ELASTICSEARCH_NAME
cac435693ef3
cac435693ef3
 !     Service is already stopped
-----> Starting container
=====> Copying config files into place
       Waiting for container to be ready
  ERROR: unable to connect
~ ⌚ 16:24:30
$ docker logs dokku.elasticsearch.es-5-01
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m
Error: Could not find or load main class "-Xms256m

ENVS:

~ ⌚ 16:24:55
$ env | grep ELASTICSEARCH
ELASTICSEARCH_IMAGE_VERSION=5.6.7

And jvm config:

## JVM configuration

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms128m
-Xmx512m

################################################################
## Expert settings
################################################################
##
## All settings below this section are considered
## expert settings. Don't tamper with them unless
## you understand what you are doing
##
################################################################

## GC configuration
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly

## optimizations

# pre-touch memory pages used by the JVM during initialization
-XX:+AlwaysPreTouch

## basic

# force the server VM (remove on 32-bit client JVMs)
-server

# explicitly set the stack size (reduce to 320k on 32-bit client JVMs)
-Xss1m

# set to headless, just in case
-Djava.awt.headless=true

# ensure UTF-8 encoding by default (e.g. filenames)
-Dfile.encoding=UTF-8

# use our provided JNA always versus the system one
-Djna.nosys=true

# use old-style file permissions on JDK9
-Djdk.io.permissionsUseCanonicalPath=true

# flags to configure Netty
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0

# log4j 2
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true

## heap dumps

# generate a heap dump when an allocation from the Java heap fails
# heap dumps are created in the working directory of the JVM
-XX:+HeapDumpOnOutOfMemoryError

# specify an alternative path for heap dumps
# ensure the directory exists and has sufficient space
#-XX:HeapDumpPath=${heap.dump.path}

## GC logging

#-XX:+PrintGCDetails
#-XX:+PrintGCTimeStamps
#-XX:+PrintGCDateStamps
#-XX:+PrintClassHistogram
#-XX:+PrintTenuringDistribution
#-XX:+PrintGCApplicationStoppedTime

# log GC status to a file with time stamps
# ensure the directory exists
#-Xloggc:${loggc}

# By default, the GC log file will not rotate.
# By uncommenting the lines below, the GC log file
# will be rotated every 128MB at most 32 times.
#-XX:+UseGCLogFileRotation
#-XX:NumberOfGCLogFiles=32
#-XX:GCLogFileSize=128M

# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
# If documents were already indexed with unquoted fields in a previous version
# of Elasticsearch, some operations may throw errors.
#
# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
# only for migration purposes.
#-Delasticsearch.json.allow_unquoted_field_names=true
archy-bold commented 6 years ago

@imWildCat The only way you'll get that error is if ES_JAVA_OPTS is being set from somewhere. I'd check your container's environment variables, the configuration, etc. But I'm afraid I'm stumped.

The error appears to be coming from the script that starts elasticsearch and that script sets ES_JAVA_OPTS from jvm.options and the variable only. If you get the same error every time you create a new instance, it suggests it's getting the variable from somewhere in your machine. If you can't find it to clear it, I'd suggest uninstalling the plugin and trying again. Then, if you can, on another machine.

imWildCat commented 6 years ago

@archy-bold Many thanks for your kindness!

I tried on a VPS with even larger memory (8G). It started successfully at the first time with the default config. However, it failed to restart after changing the config file. I decided not to waste time on this beta quality plugin. Instead, I plan to just install ElasticSearch on the host and find some way to export the local port to a container. Or just call the public IP from the containers.

ariejan commented 6 years ago

All right, just a quick recap on this issue for people looking to setup Elasticsearch 5.x. There's a workable solution in the above comments, but was a bit of trial an error. Hope this speeds things up for others:

  1. Edit /etc/sysctl.conf, add vm.max_map_count = 262144 at the bottom. Then run sysctl -p to load the changes.

  2. Create a new Elasticsearch instance with dokku, per manual. I've only tested this with the latest 5.x release.

export ELASTICSEARCH_IMAGE="elasticsearch"
export ELASTICSEARCH_IMAGE_VERSION="5.6.12"
dokku elasticsearch:create lollipop

This will result in the "unable to connect" error. But now worries.

  1. Edit /var/lib/dokku/services/elasticsearch/lollipop/config/jvm.options

Change the 2g values for -Xms and -Xmx to 512m:

-Xms2g -> -Xms512m
-Xmx2g -> -Xmx512m
  1. Edit /var/lib/dokku/services/elasticsearch/lollipop/config/elasticsearch.yml

Double check there is only one network.host: 0.0.0.0 at the bottom of the file. (For reasons unknown to me, it was there twice, making Elasticsearch barf on boot up.)

  1. Wait for the Elasticsearch container to restart itself, it will retry about every minute. You can check the logs with docker logs <container_id>. You can get the container_id by looking at docker ps.
josegonzalez commented 6 years ago

Is the sysctl change necessary?

haggen commented 6 years ago

@josegonzalez I'm no expert but it seems so https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

josegonzalez commented 6 years ago

Doesn't sound like something we can automate with the plugin, but maybe alert on? If you miss that, what happens @ariejan?

ariejan commented 6 years ago

@josegonzalez @haggen yes, it's necessary. Elasticsearch fails to start with a message indicating the default vm.max_map_count needs to be increased.

It's also covered in Elasticsearch's documentation

That same documentation referes to something called maximum size virtual memory check. I've not made any changes for this and (with 17 million records indexed) does not seem to be a problem.

josegonzalez commented 6 years ago

What do you think we should do to upgrade the plugin? Seems like requiring us to set a sysctl setting on the host is pretty awful. Is that something we can do as a docker argument?

ariejan commented 6 years ago

It's not docker related, as the change needs to be made on the host system.

People are going to run into this one way or another when running Elasticsearch. I think it's fair to ask users to make this change to their system. I don't think it's a change this plugin should make on its own, though.

There are two places where I'd expect a message or alert (if I were unaware of this issue and installed the elasticsearch plugin).

First I would expect instructions in the README / installation instructions. That way 80% of the users of this plugin will make the change and not run into any trouble.

Second, when running elasticsearch:create it would be possible (and quite easy) to check the value of vm.max_map_count (use sysctl -n vm.max_map_count) to be at least 262144 and show a warning. Better yet, prevent a new container from being created because it will fail with Elasticsearch 5+.

I haven't checked where the jvm.options come from, but we should be able to fix memory allocation variables easily enough to not cause trouble by default. If more memory needs to be made available, let's include those instructions in the README.

The network.host = 0.0.0.0 does come from the plugin, but it's reasonable to think it was a user (e.g. my) error that it ended up in the elasticsearch.yml twice.

So, to summarize:

I can easily take care of the README. I'm new to dokku plugins, but I'll take a stab at making the two other changes as well.

ariejan commented 6 years ago

@josegonzalez I'd appreciate your feedback on #63, especially on how to add a proper test for creating a 5.x container.

josegonzalez commented 5 years ago

I'm going to close this as we now install 6.7.1 by default, which appears to work in unit testing on travis.