Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 70459200BEC for ; Thu, 15 Dec 2016 03:41:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6A3EA160B2E; Thu, 15 Dec 2016 02:41:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8DC25160B19 for ; Thu, 15 Dec 2016 03:41:43 +0100 (CET) Received: (qmail 54906 invoked by uid 500); 15 Dec 2016 02:41:42 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Received: (qmail 54894 invoked by uid 99); 15 Dec 2016 02:41:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 02:41:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DC784C0118 for ; Thu, 15 Dec 2016 02:41:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.82 X-Spam-Level: X-Spam-Status: No, score=-0.82 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 95cak9gVF-0a for ; Thu, 15 Dec 2016 02:41:40 +0000 (UTC) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id AB9445F19B for ; Thu, 15 Dec 2016 02:41:39 +0000 (UTC) Received: by mail-it0-f50.google.com with SMTP id c20so867947itb.0 for ; Wed, 14 Dec 2016 18:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=/NYYwqQnC2LKJIxccCGEDeNRewPU4AyN6a+R8tPsKN0=; b=r/Fw70nqqDdvBvtnLVVA/PTEax5uIRpniyz06pAzBgDsRmBPng3K6k5Ys86W8EjsBo 82TbQq5XktW5aauAVj2jpP8fCJ1CWNPM8bS6VIuW9kBByvuyGMSY7LFL0sRONsBSdd41 K7JTJnXa3cHRTewJylXUczl5wgHj7tDF4cMpx6K5jrJ01pJGtfnAUIVVEO5ATTfzL9F+ rZP5aoUN0erpct9LdybDq2VyXNzFbpBtncUP3bkrjsFiY9lt4V55Aw5AbUw1sFln2YAr BKJHsWXNh12L0mMk3PXC1AoAJUK8lGXxdwb/SrUWZZkfJf61XR/Iu9tl+Ge6PGX7smnH eCFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=/NYYwqQnC2LKJIxccCGEDeNRewPU4AyN6a+R8tPsKN0=; b=SsPKLqoAiAaIsMmCRjsgNbiS0cTR0MENy2VpupUrOnVAgxHFIwalbzOEcbWq8WMWLU AYWMZLN753JcPqiO/XtXXg8rDWERlYEhc04TrUWNIzUC5N+kGY12N8lmUOGyVA2CTn9Z KHuLR82AEPftfylbjb9mk4oFtliPYD9TVM5lmtpuvP0lQX1h8BYBZTakmKX8pZMDDZwC hD1lzlj6uf8HtmLmx/y0YaJTXmmk6P1M3Qx1JzLnKfVkcQoUlR5m+N5Kj48TseOY4kQi 39iwoNfcCfur8VNHAwH19ohPPdkyXenwIF2MkzIaHBi289X8s4anN8EYnxXCW/os3Pne 3vMQ== X-Gm-Message-State: AKaTC01anb+pemb8wYkqraNQ+V3/KaqFcMQop1pu4F3Ld3qU9kfSGxW+Q/W6Ow9glJ69H+DdfvRuuIBXXRUA+A== X-Received: by 10.36.192.84 with SMTP id u81mr404410itf.51.1481769688799; Wed, 14 Dec 2016 18:41:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.26.196 with HTTP; Wed, 14 Dec 2016 18:41:28 -0800 (PST) In-Reply-To: References: <585189F5.2090102@windofkeltia.com> From: Joe Witt Date: Wed, 14 Dec 2016 21:41:28 -0500 Message-ID: Subject: Re: Adding JVM arguments when running NiFi... To: dev@nifi.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Thu, 15 Dec 2016 02:41:44 -0000 The way you set it up initially is what I'd thought would have done the trick. Perhaps we're not ordering the arguments in the same manner supplied. Will need to look into that. Thanks Joe On Wed, Dec 14, 2016 at 9:00 PM, Russell Bateman wr= ote: > Of course, as many have done, I've run Java applications with JFR enabled > using these options against this very JVM (jdk1.8.0_112). So, it isn't a > problem for the JVM I'm using. I haven't finished digging down into > ProcessBuilder, or deeper, to figure out why these options are not gettin= g > love. I'll get back at it tomorrow and report back. > > > On 12/14/2016 11:05 AM, Russell Bateman wrote: >> >> >> I've doctored /conf/bootstrap.conf/ to contain these additional lines: >> >> java.arg.15=3D-XX:+UnlockCommercialFeatures >> java.arg.16=3D-XX:+FlightRecorder >> >> java.arg.17=3D-XX:StartFlightRecording=3Dduration=3D120m,filename=3Dreco= rding.jfr >> >> >> In the end, NiFi's grumpy about this and won't start (from >> /logs/nifi-bootstrap.log/): >> >> 2016-12-14 10:39:36,489 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: *To use 'FlightRecorder', first unlock usi= ng >> -XX:+UnlockCommercialFeatures.* >> 2016-12-14 10:39:36,489 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: Could not create the Java Virtual Machine. >> 2016-12-14 10:39:36,489 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: A fatal exception has occurred. Program wi= ll >> exit. >> 2016-12-14 10:39:36,507 INFO [main] org.apache.nifi.bootstrap.RunNiFi Ni= Fi >> never started. Will not restart NiFi >> >> I tried using all options as one (in case the order is disturbed, which = it >> was): >> >> >> java.arg.15=3D-XX:+UnlockCommercialFeatures-XX:+FlightRecorder-XX:StartF= lightRecording=3Dduration=3D120m,filename=3Drecording.jfr >> >> >> and then I get: >> >> *2016-12-14 10:50:07,574 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Unrecognized VM option 'UnlockCommercialFeatures >> -XX:+FlightRecorder >> -XX:StartFlightRecording=3Dduration=3D120m,filename=3Drecording.jfr'* >> 2016-12-14 10:50:07,574 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: Could not create the Java Virtual Machine. >> 2016-12-14 10:50:07,574 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: A fatal exception has occurred. Program wi= ll >> exit. >> 2016-12-14 10:50:07,598 INFO [main] org.apache.nifi.bootstrap.RunNiFi Ni= Fi >> never started. Will not restart NiFi >> >> Here's the second command line from /logs/nifi-bootstrap.log/, which I'v= e >> wrapped for convenience in reading (see JVM version here too): >> >> 2016-12-14 10:56:40,526 INFO [main] org.apache.nifi.bootstrap.Command >> Working Directory: /home/russ/dev/nifi/nifi-1.1.0 >> 2016-12-14 10:56:40,526 INFO [main] org.apache.nifi.bootstrap.Command >> Command: */home/russ/dev/jdk1.8.0_112/bin/java* >> -classpath >> /home/russ/dev/nifi/nifi-1.1.0/./conf:/home/russ/dev/nifi/nifi-1.1.0/./l= ib/jcl-over-slf4j-1.7.12.jar:/home/russ/dev/nifi/nifi-1.1.0/./lib/logback-c= ore-1.1.3.jar:/home/russ/dev/nifi/nifi-1.1.0/./lib/nifi-documentation-1.1.0= .jar:/home/russ/dev/nifi/nifi-1.1.0/./lib/nifi-nar-utils-1.1.0.jar:/home/ru= ss/dev/nifi/nifi-1.1.0/./lib/logback-classic-1.1.3.jar:/home/russ/dev/nifi/= nifi-1.1.0/./lib/jul-to-slf4j-1.7.12.jar:/home/russ/dev/nifi/nifi-1.1.0/./l= ib/nifi-runtime-1.1.0.jar:/home/russ/dev/nifi/nifi-1.1.0/./lib/slf4j-api-1.= 7.12.jar:/home/russ/dev/nifi/nifi-1.1.0/./lib/nifi-api-1.1.0.jar:/home/russ= /dev/nifi/nifi-1.1.0/./lib/nifi-framework-api-1.1.0.jar:/home/russ/dev/nifi= /nifi-1.1.0/./lib/log4j-over-slf4j-1.7.12.jar:/home/russ/dev/nifi/nifi-1.1.= 0/./lib/nifi-properties-1.1.0.jar >> -Dorg.apache.jasper.compiler.disablejsr199=3Dtrue >> -Xmx512m >> -Xms512m >> -agentlib:jdwp=3Dtransport=3Ddt_socket,server=3Dy,suspend=3Dn,address=3D= 9191 >> *-XX:+UnlockCommercialFeatures >> -XX:+FlightRecorder >> -XX:StartFlightRecording=3Dduration=3D120m,filename=3Drecording.jfr* >> -Dsun.net.http.allowRestrictedHeaders=3Dtrue >> -Djava.net.preferIPv4Stack=3Dtrue >> -Djava.awt.headless=3Dtrue >> -XX:+UseG1GC >> -Djava.protocol.handler.pkgs=3Dsun.net.www.protocol >> >> -Dnifi.properties.file.path=3D/home/russ/dev/nifi/nifi-1.1.0/./conf/nifi= .properties >> -Dnifi.bootstrap.listen.port=3D41736 >> -Dapp=3DNiFi >> >> -Dorg.apache.nifi.bootstrap.config.log.dir=3D/home/russ/dev/nifi/nifi-1.= 1.0/logs >> org.apache.nifi.NiFi >> >> Last, I frantically tried this: >> >> java.arg.15=3D"-XX:+UnlockCommercialFeatures -XX:+FlightRecorder >> -XX:StartFlightRecording=3Dduration=3D120m,filename=3Drecording.jfr" >> >> >> and then got: >> >> *2016-12-14 11:01:36,659 ERROR [NiFi logging handler] >> org.apache.nifi.StdErr Error: Could not find or load main class >> "-XX:+UnlockCommercialFeatures -XX:+FlightRecorder >> -XX:StartFlightRecording=3Dduration=3D120m,filename=3Drecording.jfr"* >> >> >> What's the canonical way of adding/inserting my own JVM commands? >> Alternatively, is NiFi analyzing and blocking -XX:arguments to the JVM a= s >> illegal or unrecognized? >> >> Thanks, >> >> Russ > >