Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-10017

TLS-Toolkit standalone gives "Java heap space" error

    XMLWordPrintableJSON

Details

    Description

      When I invoked tls-toolkit during installation of a new (1.16.1) NiFi instance on server I got following error from toolkit.

      nifi-toolkit-1.16.1/bin/tls-toolkit.sh standalone \
      -C "..." \
      -K "..." \
      -S "..." \
      -P "..." \
      -f "/disk1/nifi/prod/nifi-1.16.1/conf/nifi.properties" \
      -o ./certificate \
      -n "..." \
      -O
      
      [main] INFO org.apache.nifi.toolkit.tls.standalone.TlsToolkitStandaloneCommandLine - Using /disk1/nifi/prod/nifi-1.16.1/conf/nifi.properties as template.
      Service standalone error: Java heap space

      Upon reading the script I noticed a small problem on line 114 of the "tls-toolkit.sh" file:

      exec "${JAVA}" -cp "${CLASSPATH}" ${JAVA_OPTS:--Xms12m -Xmx24m} org.apache.nifi.toolkit.tls.TlsToolkitMain "$@"
      

      If you look at the JAVA_OPTS it assigns only 12 and 24 Mb as min and max heap size available to the java process it executes. I think this causes the java process to run out of heap space, when I increased it to 128 and 256 Mb like in "encrypt-config.sh" then it worked alright.

      Attachments

        Issue Links

          Activity

            People

              kdoran Kevin Doran
              daniel.salwerowicz Daniel Salwerowicz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m