Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95BA018721 for ; Sat, 4 Jul 2015 06:19:22 +0000 (UTC) Received: (qmail 64897 invoked by uid 500); 4 Jul 2015 06:19:17 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 64825 invoked by uid 500); 4 Jul 2015 06:19:17 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 64813 invoked by uid 99); 4 Jul 2015 06:19:17 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2015 06:19:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B35EB1A6610 for ; Sat, 4 Jul 2015 06:19:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.011 X-Spam-Level: X-Spam-Status: No, score=-0.011 tagged_above=-999 required=6.31 tests=[SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FaVaYQ3FZWKT for ; Sat, 4 Jul 2015 06:19:06 +0000 (UTC) Received: from 256bit.org (256bit.org [144.76.87.176]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 18A9A2095C for ; Sat, 4 Jul 2015 06:19:05 +0000 (UTC) Received: from [2a02:8070:24aa:4d00:e11d:3ed3:8a:916d] by 256bit.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZBGmu-0003ip-DS for dev@activemq.apache.org; Sat, 04 Jul 2015 08:18:58 +0200 Message-ID: <55977ACE.2080301@256bit.org> Date: Sat, 04 Jul 2015 08:18:54 +0200 From: =?UTF-8?B?TWFyYyBTY2jDtmNobGlu?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@activemq.apache.org References: <5591B84C.6000205@256bit.org> <55923F7F.4010801@256bit.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oJgBn9VreDPEb0HPjLAi2fepg6FavONKh" X-SA-Exim-Connect-IP: 2a02:8070:24aa:4d00:e11d:3ed3:8a:916d X-SA-Exim-Mail-From: ms@256bit.org Subject: Re: Please review: Unix Init Script Improvements - strange options "export" and "create" X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on 256bit.org) --oJgBn9VreDPEb0HPjLAi2fepg6FavONKh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Dejan, Am 02.07.2015 um 13:14 schrieb Dejan Bosanac: > Hi Marc, > > these commands are not deprecated, they are documented (partially) here= > http://activemq.apache.org/unix-shell-script.html > > As far as I can see, export is still work in progress, it should work l= ike > > bin/activemq export --file=3Darchive.tgz What is the usecase for this feature? Is there als a "import" Works not on my machine: $ ./activemq export --file=3Darchive.tgz INFO: Loading '/home/mschoechlin/myroot/apache-activemq-5.11.1//bin/env' INFO: Using java '/home/mschoechlin/myroot/java8/bin/java' Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar Java Runtime: Oracle Corporation 1.8.0_45 /home/mschoechlin/myroot/jdk1.8.0_45/jre Heap sizes: current=3D62976k free=3D60999k max=3D932352k JVM args: -javaagent:/usr/share/java/jayatanaag.jar -Xms64M -Xmx1G -Djava.util.logging.config.file=3Dlogging.properties -Djava.security.auth.login.config=3D/home/mschoechlin/myroot/apache-activ= emq-5.11.1//conf/login.config -Dactivemq.classpath=3D/home/mschoechlin/myroot/apache-activemq-5.11.1//c= onf:/home/mschoechlin/myroot/apache-activemq-5.11.1//../lib/ -Dactivemq.home=3D/home/mschoechlin/myroot/apache-activemq-5.11.1/ -Dactivemq.base=3D/home/mschoechlin/myroot/apache-activemq-5.11.1/ -Dactivemq.conf=3D/home/mschoechlin/myroot/apache-activemq-5.11.1//conf -Dactivemq.data=3D/home/mschoechlin/myroot/apache-activemq-5.11.1//data Extensions classpath: =20 [/home/mschoechlin/myroot/apache-activemq-5.11.1/lib,/home/mschoechlin/my= root/apache-activemq-5.11.1/lib/camel,/home/mschoechlin/myroot/apache-act= ivemq-5.11.1/lib/optional,/home/mschoechlin/myroot/apache-activemq-5.11.1= /lib/web,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/extra] ACTIVEMQ_HOME: /home/mschoechlin/myroot/apache-activemq-5.11.1 ACTIVEMQ_BASE: /home/mschoechlin/myroot/apache-activemq-5.11.1 ACTIVEMQ_CONF: /home/mschoechlin/myroot/apache-activemq-5.11.1/conf ACTIVEMQ_DATA: /home/mschoechlin/myroot/apache-activemq-5.11.1/data ERROR | Could not set property file on org.apache.activemq.console.command.store.StoreExporter@18bf3d14 java.lang.IllegalArgumentException: Cannot convert from class java.lang.String to class java.io.File with value archive.tgz at org.apache.activemq.util.IntrospectionSupport.convert(IntrospectionSuppor= t.java:219)[activemq-client-5.11.1.jar:5.11.1] at org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSu= pport.java:178)[activemq-client-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.store.amq.CommandLineSupport.setOptio= ns(CommandLineSupport.java:81)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.StoreExportCommand.execute(StoreExpor= tCommand.java:51)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.jav= a:150)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57)[activemq-console-5.11.1.jar:5.11.1] at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:1= 04)[activemq-console-5.11.1.jar:5.11.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :62)[:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:43)[:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45] at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar= :5.11.1] at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.11.1]= ERROR: java.lang.Exception: Unexpected arguments: [--file=3Darchive.tgz] java.lang.Exception: Unexpected arguments: [--file=3Darchive.tgz] at org.apache.activemq.console.command.StoreExportCommand.execute(StoreExpor= tCommand.java:53) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.jav= a:150) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractComma= nd.java:57) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:1= 04) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) > Create command is often used and it can be used like > > bin/activemq create test-brokeres=20 Ah ok. What are the known usecases? The activemq init script provides also the functionality to create and run multiple instances on the same machine. This mechanism also provides a independent script environment configurati= on. https://cwiki.apache.org/confluence/display/ACTIVEMQ/Unix+Shell+Script#Un= ixShellScript-Runningmultipleinstances > > BTW. While you at it, you might wanna take a peak at this PR > https://github.com/apache/activemq/pull/109 and maybe close your origin= al > PR for improvements. > The described problem happens because the file "env" has exec permissions and the activemq bin folder is part of the PATH variable? The "env" file does not need exec permissions, but this might be a typical problem. Probably we should move the "env" script to conf/env (i hate changing file locations, because creates problems for the users). We should also rename the script "diag" to "activemq-diag" or we should add this functionality to the init script. I think the second possibility might be better - because this also allows access to the script configuration. I also want to drop the "activemq-admin" script, because the functionality of this script is redundant to the "activemq" script. What do you think? Best regards, Marc Schoechlin =20 --=20 GPG encryption available: 0x670DCBEC/pool.sks-keyservers.net (https://www.256bit.org/keys/mschoechlin.pub.asc) --oJgBn9VreDPEb0HPjLAi2fepg6FavONKh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVl3rOAAoJEKM5z7FnDcvs/84IAMemLi189nivj/Vm5zfOjblS ZvCXjZ7/OeSdJpbl8rNdYpOS8VkJ1e/D6kL/pUv5eMDRQoZBaFbndxq3ebVhAMMP 2CXKe1stfcVTKUMiv5zK32zMBN6hablHgKWVSMvgV7gkqvi0+J7hHPjEPy+LYFT6 OOatlO9g77eXN7WjrUseDD8rfHgtIdOArUvuMKPI9zGZJg5qbp6QRA8RgyQMw3O/ JfBaSumnxPklZpNbLSF92lJAmi0LhgXf7EfL1PFOQoBnHkBGSYQk9lI9iLtAv3JG nKDGOPjPAIrWpEWLn2GrPicatFvuwajryNa126GRt7rib5tjGykaE3Bi2h7/mV0= =IuqV -----END PGP SIGNATURE----- --oJgBn9VreDPEb0HPjLAi2fepg6FavONKh--