Hello, I see your VM arguments contain 2 "-Xms" and 0 "-Xmx" arguments: -Xms2048m -Xms2048m
Please check your nifi/conf/bootstrap.conf file to make sure the JVM memory settings show -Xms2048m -Xmx2048m Regards, -- Mike On Fri, Jan 19, 2018 at 6:25 AM, 尹文才 <[email protected]> wrote: > Hi guys, one of my colleagues was working on a remote deploy tool trying to > start NiFi remotely on a windows system(NiFi package is on the windows > system). > I don't know how exactly the deployment tool works, but the basic flow is > to launch Ansible locally which uses winrm to remotely > launch NiFi through powershell. Unfortunately NiFi couldn't be started. But > when he remotely logged into the windows system > and manually ran NiFi on the system(through double clicking the > run-nifi.bat file), NiFi started without any problem. I checked the logs > written by NiFi about the start failure and it appears to me to be a memory > problem, but I'm not sure if it is the root cause and don't know > how to solve the problem. Could anyone help me out of this problem? Thanks. > The 2 created logs are as below: > > 1. nifi-bootstrap.log: > 2018-01-19 17:12:48,657 INFO [main] o.a.n.b.NotificationServiceManager > Successfully loaded the following 0 services: [] > 2018-01-19 17:12:48,673 INFO [main] org.apache.nifi.bootstrap.RunNiFi > Registered no Notification Services for Notification Type NIFI_STARTED > 2018-01-19 17:12:48,673 INFO [main] org.apache.nifi.bootstrap.RunNiFi > Registered no Notification Services for Notification Type NIFI_STOPPED > 2018-01-19 17:12:48,673 INFO [main] org.apache.nifi.bootstrap.RunNiFi > Registered no Notification Services for Notification Type NIFI_DIED > 2018-01-19 17:12:48,688 INFO [main] org.apache.nifi.bootstrap.Command > Starting Apache NiFi... > 2018-01-19 17:12:48,688 INFO [main] org.apache.nifi.bootstrap.Command > Working Directory: C:\ETL\Nifi\NIFI-1~1.0 > 2018-01-19 17:12:48,688 INFO [main] org.apache.nifi.bootstrap.Command > Command: C:\Program Files\Java\jdk1.8.0_152\bin\java.exe -classpath > C:\ETL\Nifi\NIFI-1~1.0\.\conf;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > javax.servlet-api-3.1.0.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > jcl-over-slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > jetty-schemas-3.1.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\jul-to- > slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\log4j-over- > slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\logback- > classic-1.2.3.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\logback-core- > 1.2.3.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-api-1.4.0.jar; > C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-framework-api-1.4.0.jar; > C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-nar-utils-1.4.0.jar;C:\ > ETL\Nifi\NIFI-1~1.0\.\lib\nifi-properties-1.4.0.jar;C:\ > ETL\Nifi\NIFI-1~1.0\.\lib\nifi-runtime-1.4.0.jar;C:\ETL\ > Nifi\NIFI-1~1.0\.\lib\slf4j-api-1.7.25.jar > -Dorg.apache.jasper.compiler.disablejsr199=true -Xms2048m -Xms2048m > -Djava.security.egd=file:/dev/urandom > -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true > -Djava.awt.headless=true -XX:+UseG1GC > -Djava.protocol.handler.pkgs=sun.net.www.protocol > -Dnifi.properties.file.path=C:\ETL\Nifi\NIFI-1~1.0\.\conf\nifi.properties > -Dnifi.bootstrap.listen.port=49572 -Dapp=NiFi > -Dorg.apache.nifi.bootstrap.config.log.dir=C:\ETL\Nifi\ > NIFI-1~1.0\bin\..\\..\logs > org.apache.nifi.NiFi > 2018-01-19 17:12:49,657 INFO [NiFi logging handler] org.apache.nifi.StdOut > # > 2018-01-19 17:12:49,657 INFO [NiFi logging handler] org.apache.nifi.StdOut > # There is insufficient memory for the Java Runtime Environment to > continue. > 2018-01-19 17:12:49,657 INFO [NiFi logging handler] org.apache.nifi.StdOut > # Native memory allocation (mmap) failed to map 2147483648 bytes for Failed > to commit area from 0x00000006c0000000 to 0x0000000740000000 of length > 2147483648. > 2018-01-19 17:12:49,657 INFO [NiFi logging handler] org.apache.nifi.StdOut > # An error report file with more information is saved as: > 2018-01-19 17:12:49,657 INFO [NiFi logging handler] org.apache.nifi.StdOut > # C:\ETL\Nifi\NIFI-1~1.0\hs_err_pid3448.log > 2018-01-19 17:12:49,657 ERROR [NiFi logging handler] org.apache.nifi.StdErr > Picked up JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8" > 2018-01-19 17:12:49,657 ERROR [NiFi logging handler] org.apache.nifi.StdErr > Java HotSpot(TM) 64-Bit Server VM warning: INFO: > os::commit_memory(0x00000006c0000000, 2147483648, 0) failed; > error='ҳ���ļ�̫С������ɲ�����' (DOS error/errno=1455) > 2018-01-19 17:12:50,876 WARN [main] org.apache.nifi.bootstrap.Command > Failed to set permissions so that only the owner can read pid file > C:\ETL\Nifi\NIFI-1~1.0\bin\..\run\nifi.pid; this may allows others to have > access to the key needed to communicate with NiFi. Permissions should be > changed so that only the owner can read this file > 2018-01-19 17:12:53,816 WARN [main] org.apache.nifi.bootstrap.Command > Failed to set permissions so that only the owner can read status file > C:\ETL\Nifi\NIFI-1~1.0\bin\..\run\nifi.status; this may allows others to > have access to the key needed to communicate with NiFi. Permissions should > be changed so that only the owner can read this file > 2018-01-19 17:12:55,798 INFO [main] org.apache.nifi.bootstrap.Command > Launched Apache NiFi with Process ID 3448 > 2018-01-19 17:12:55,798 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi > never started. Will not restart NiFi > > > 2. hs_err_pid3448.log: > > # > # There is insufficient memory for the Java Runtime Environment to > continue. > # Native memory allocation (mmap) failed to map 2147483648 bytes for Failed > to commit area from 0x00000006c0000000 to 0x0000000740000000 of length > 2147483648. > # Possible reasons: > # The system is out of physical RAM or swap space > # In 32 bit mode, the process size limit was hit > # Possible solutions: > # Reduce memory load on the system > # Increase physical memory or swap space > # Check if swap backing store is full > # Use 64 bit Java on a 64 bit OS > # Decrease Java heap size (-Xmx/-Xms) > # Decrease number of Java threads > # Decrease Java thread stack sizes (-Xss) > # Set larger code cache with -XX:ReservedCodeCacheSize= > # This output file may be truncated or incomplete. > # > # Out of Memory Error (os_windows.cpp:3331), pid=3448, > tid=0x00000000000004e8 > # > # JRE version: (8.0_152-b16) (build ) > # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.152-b16 mixed mode > windows-amd64 compressed oops) > # Core dump written. Default location: > C:\ETL\Nifi\NIFI-1~1.0\hs_err_pid3448.mdmp > # > > --------------- T H R E A D --------------- > > Current thread (0x0000000001354000): JavaThread "Unknown thread" > [_thread_in_vm, id=1256, stack(0x0000000001230000,0x0000000001330000)] > > Stack: [0x0000000001230000,0x0000000001330000] > [error occurred during error reporting (printing stack bounds), id > 0xc0000005] > > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native > code) > > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > > Other Threads: > > =>0x0000000001354000 (exited) JavaThread "Unknown thread" [_thread_in_vm, > id=1256, stack(0x0000000001230000,0x0000000001330000)] > > VM state:not at safepoint (not fully initialized) > > VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) > [0x00000000013522e0] Heap_lock - owner thread: 0x0000000001354000 > > GC Heap History (0 events): > No events > > Deoptimization events (0 events): > No events > > Classes redefined (0 events): > No events > > Internal exceptions (0 events): > No events > > Events (0 events): > No events > > > Dynamic libraries: > 0x00007ff62eba0000 - 0x00007ff62ebd7000 C:\Program > Files\Java\jdk1.8.0_152\bin\java.exe > 0x00007ffb6e1b0000 - 0x00007ffb6e359000 C:\Windows\SYSTEM32\ntdll.dll > 0x00007ffb6bcd0000 - 0x00007ffb6be09000 C:\Windows\system32\KERNEL32.DLL > 0x00007ffb6b700000 - 0x00007ffb6b80e000 C:\Windows\system32\KERNELBASE.dll > 0x00007ffb6a1c0000 - 0x00007ffb6a24b000 C:\Windows\system32\apphelp.dll > 0x00007ffb66160000 - 0x00007ffb661ac000 > C:\Windows\AppPatch\AppPatch64\AcGenral.DLL > 0x00007ffb6ba40000 - 0x00007ffb6bae7000 C:\Windows\system32\msvcrt.dll > 0x00007ffb6b310000 - 0x00007ffb6b33b000 C:\Windows\SYSTEM32\SspiCli.dll > 0x00007ffb6c040000 - 0x00007ffb6c091000 C:\Windows\system32\SHLWAPI.dll > 0x00007ffb6db10000 - 0x00007ffb6dc81000 C:\Windows\system32\USER32.dll > 0x00007ffb6bb50000 - 0x00007ffb6bcc6000 C:\Windows\system32\ole32.dll > 0x00007ffb6c0b0000 - 0x00007ffb6d4bf000 C:\Windows\system32\SHELL32.dll > 0x00007ffb6ab40000 - 0x00007ffb6ab5f000 C:\Windows\SYSTEM32\USERENV.dll > 0x00007ffb6bf50000 - 0x00007ffb6bff5000 C:\Windows\system32\ADVAPI32.dll > 0x00007ffb661d0000 - 0x00007ffb661eb000 C:\Windows\SYSTEM32\MPR.dll > 0x00007ffb6be10000 - 0x00007ffb6bf46000 C:\Windows\system32\RPCRT4.dll > 0x00007ffb6de20000 - 0x00007ffb6de77000 C:\Windows\SYSTEM32\sechost.dll > 0x00007ffb6d920000 - 0x00007ffb6daf7000 C:\Windows\SYSTEM32\combase.dll > 0x00007ffb6d590000 - 0x00007ffb6d6d5000 C:\Windows\system32\GDI32.dll > 0x00007ffb6b530000 - 0x00007ffb6b544000 C:\Windows\SYSTEM32\profapi.dll > 0x00007ffb69c40000 - 0x00007ffb69ce1000 C:\Windows\SYSTEM32\SHCORE.dll > 0x00007ffb68f80000 - 0x00007ffb691da000 > C:\Windows\WinSxS\amd64_microsoft.windows.common- > controls_6595b64144ccf1df_6.0.9600.16384_none_ > 62475f7becb72503\COMCTL32.dll > 0x000000006f7d0000 - 0x000000006f8a2000 C:\Program > Files\Java\jdk1.8.0_152\jre\bin\msvcr100.dll > 0x000000006ef30000 - 0x000000006f7d0000 C:\Program > Files\Java\jdk1.8.0_152\jre\bin\server\jvm.dll > 0x00007ffb65960000 - 0x00007ffb65969000 C:\Windows\SYSTEM32\WSOCK32.dll > 0x00007ffb65940000 - 0x00007ffb6595f000 C:\Windows\SYSTEM32\WINMM.dll > 0x00007ffb65930000 - 0x00007ffb6593a000 C:\Windows\SYSTEM32\VERSION.dll > 0x00007ffb6d580000 - 0x00007ffb6d587000 C:\Windows\system32\PSAPI.DLL > 0x00007ffb6baf0000 - 0x00007ffb6bb48000 C:\Windows\system32\WS2_32.dll > 0x00007ffb65900000 - 0x00007ffb6592a000 C:\Windows\SYSTEM32\WINMMBASE.dll > 0x00007ffb6db00000 - 0x00007ffb6db09000 C:\Windows\system32\NSI.dll > 0x00007ffb6b600000 - 0x00007ffb6b64a000 C:\Windows\SYSTEM32\cfgmgr32.dll > 0x00007ffb6a440000 - 0x00007ffb6a466000 C:\Windows\SYSTEM32\DEVOBJ.dll > 0x000000006ef20000 - 0x000000006ef2f000 C:\Program > Files\Java\jdk1.8.0_152\jre\bin\verify.dll > 0x000000006eef0000 - 0x000000006ef19000 C:\Program > Files\Java\jdk1.8.0_152\jre\bin\java.dll > 0x000000006eed0000 - 0x000000006eee6000 C:\Program > Files\Java\jdk1.8.0_152\jre\bin\zip.dll > 0x00007ffb4e220000 - 0x00007ffb4e3a8000 C:\Windows\system32\DBGHELP.DLL > > VM Arguments: > jvm_args: -Dfile.encoding=UTF8 > -Dorg.apache.jasper.compiler.disablejsr199=true -Xms2048m -Xms2048m > -Djava.security.egd=file:/dev/urandom > -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true > -Djava.awt.headless=true -XX:+UseG1GC > -Djava.protocol.handler.pkgs=sun.net.www.protocol > -Dnifi.properties.file.path=C:\ETL\Nifi\NIFI-1~1.0\.\conf\nifi.properties > -Dnifi.bootstrap.listen.port=49572 -Dapp=NiFi > -Dorg.apache.nifi.bootstrap.config.log.dir=C:\ETL\Nifi\ > NIFI-1~1.0\bin\..\\..\logs > java_command: org.apache.nifi.NiFi > java_class_path (initial): > C:\ETL\Nifi\NIFI-1~1.0\.\conf;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > javax.servlet-api-3.1.0.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > jcl-over-slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\ > jetty-schemas-3.1.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\jul-to- > slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\log4j-over- > slf4j-1.7.25.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\logback- > classic-1.2.3.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\logback-core- > 1.2.3.jar;C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-api-1.4.0.jar; > C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-framework-api-1.4.0.jar; > C:\ETL\Nifi\NIFI-1~1.0\.\lib\nifi-nar-utils-1.4.0.jar;C:\ > ETL\Nifi\NIFI-1~1.0\.\lib\nifi-properties-1.4.0.jar;C:\ > ETL\Nifi\NIFI-1~1.0\.\lib\nifi-runtime-1.4.0.jar;C:\ETL\ > Nifi\NIFI-1~1.0\.\lib\slf4j-api-1.7.25.jar > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152 > JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" > PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\ > Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%JAVA_ > HOME%\bin;C:\RTService\RtInstallFiles\nssm-2.24\win64\;C:\Program > Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\ > USERNAME=Administrator > OS=Windows_NT > PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 1, GenuineIntel > > > > --------------- S Y S T E M --------------- > > OS: Windows Server 2012 R2 , 64 bit Build 9600 (6.3.9600.16441) > > CPU:total 4 (initial active 4) (1 cores per cpu, 1 threads per core) family > 6 model 60 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, > sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, > tsc, bmi1, bmi2 > > Memory: 4k page, physical 16776812k(12659308k free), swap > 19267180k(14916984k free) > > vm_info: Java HotSpot(TM) 64-Bit Server VM (25.152-b16) for windows-amd64 > JRE (1.8.0_152-b16), built on Sep 14 2017 02:29:36 by "java_re" with MS > VC++ 10.0 (VS2010) > > time: Fri Jan 19 17:12:49 2018 > elapsed time: 0 seconds (0d 0h 0m 0s) >
