activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Please review: Unix Init Script Improvements - strange options "export" and "create"
Date Thu, 02 Jul 2015 11:14:29 GMT
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 like

bin/activemq export --file=archive.tgz

Create command is often used and it can be used like

bin/activemq create test-broker

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 original
PR for improvements.



Regards
--
Dejan Bosanac
about.me/dejanb

On Tue, Jun 30, 2015 at 9:04 AM, Marc Schöchlin <ms@256bit.org> wrote:

>  Hi,
>
> i had a look for the "export" feature of activemq.
>
> The documentation and the wiki search does not provide information about
> usage of this feature - the only information is : "Exports a stopped
> brokers data files to an archive file".
> Invoking this functionality raised strage error messages:
>
> $ ./activemq export
> 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=62976k  free=60999k  max=932352k
>     JVM args: -javaagent:/usr/share/java/jayatanaag.jar -Xms64M -Xmx1G
> -Djava.util.logging.config.file=logging.properties
> -Djava.security.auth.login.config=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf/login.config
> -Dactivemq.classpath=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf:/home/mschoechlin/myroot/apache-activemq-5.11.1//../lib/
> -Dactivemq.home=/home/mschoechlin/myroot/apache-activemq-5.11.1/
> -Dactivemq.base=/home/mschoechlin/myroot/apache-activemq-5.11.1/
> -Dactivemq.conf=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf
> -Dactivemq.data=/home/mschoechlin/myroot/apache-activemq-5.11.1//data
> Extensions classpath:
>
> [/home/mschoechlin/myroot/apache-activemq-5.11.1/lib,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/camel,/home/mschoechlin/myroot/apache-activemq-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: java.lang.Exception: *required --file option missing*
> java.lang.Exception: required --file option missing
>     at
> org.apache.activemq.console.command.store.StoreExporter.execute(StoreExporter.java:80)
>     at
> org.apache.activemq.console.command.StoreExportCommand.execute(StoreExportCommand.java:55)
>     at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
>     at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>     at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
>
> $ ./activemq export *--file /tmp/foobar*
> 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=62976k  free=60999k  max=932352k
>     JVM args: -javaagent:/usr/share/java/jayatanaag.jar -Xms64M -Xmx1G
> -Djava.util.logging.config.file=logging.properties
> -Djava.security.auth.login.config=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf/login.config
> -Dactivemq.classpath=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf:/home/mschoechlin/myroot/apache-activemq-5.11.1//../lib/
> -Dactivemq.home=/home/mschoechlin/myroot/apache-activemq-5.11.1/
> -Dactivemq.base=/home/mschoechlin/myroot/apache-activemq-5.11.1/
> -Dactivemq.conf=/home/mschoechlin/myroot/apache-activemq-5.11.1//conf
> -Dactivemq.data=/home/mschoechlin/myroot/apache-activemq-5.11.1//data
> Extensions classpath:
>
> [/home/mschoechlin/myroot/apache-activemq-5.11.1/lib,/home/mschoechlin/myroot/apache-activemq-5.11.1/lib/camel,/home/mschoechlin/myroot/apache-activemq-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 true
>     at
> org.apache.activemq.util.IntrospectionSupport.convert(IntrospectionSupport.java:219)[activemq-client-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:178)[activemq-client-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.console.command.store.amq.CommandLineSupport.setOptions(CommandLineSupport.java:81)[activemq-console-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.console.command.StoreExportCommand.execute(StoreExportCommand.java:51)[activemq-console-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1]
>     at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[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(DelegatingMethodAccessorImpl.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, /tmp/foobar]
> java.lang.Exception: Unexpected arguments: [--file, /tmp/foobar]
>     at
> org.apache.activemq.console.command.StoreExportCommand.execute(StoreExportCommand.java:53)
>     at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
>     at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>     at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
>
>
> What is the detailed usage scenario for this feature and how can i use it?
> How can i import the file?
>
> Same thing also for the "create" option.
>
> Are these functions deprecated and should be removed?
>
> Best regards,
> Marc Schoechlin
>
> Am 29.06.2015 um 23:27 schrieb Marc Schöchlin:
>
> Hello developers,
>
> i improved the documentation and the implementation of the unix init
> script.
>
> *Documentation:*
> (solves https://issues.apache.org/jira/browse/AMQ-5448)
> https://cwiki.apache.org/confluence/display/ACTIVEMQ/Unix+Shell+Script
>
> http://activemq.apache.org/getting-started.html#GettingStarted-UnixBinaryInstallation
>
> *Shell script improvements:*
> (solves https://issues.apache.org/jira/browse/AMQ-5378)
>
> The script should now run on various unix platforms (linux, solaris,
> macos) without problems.
> I added a small testsuite which helps to find problems on unix platforms.
> See:
> https://cwiki.apache.org/confluence/display/ACTIVEMQ/Unix+Shell+Script
>
> The changes were committed on the master branch.
> Feedback, bug reports and improvement ideas are very welcome :-)
>
> Regards
> Marc
>
> ------------------------------
>
> commit 06202097a28b21efb9864d4d75a40cab7675bf98
> Merge: 3870aa9 f3fc589
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Mon Jun 29 22:01:14 2015 +0200
>
>     Merge branch 'master' of
> https://git-wip-us.apache.org/repos/asf/activemq
>
> commit 3870aa94473b2253e7a38e5897187d1049d60059
> Merge: aeb93e4 002ade7
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Mon Jun 29 08:34:50 2015 +0200
>
>     Resolved merge conflict
>
> commit aeb93e4a2455dff169da302fb19f7fa55d21a0c0
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sat Jun 6 17:02:31 2015 +0200
>
>     improve stability
>
>     - added more reliable quoting
>     - improved reliability of stopping
>     - improved management of concurrent stop processes
>     - added a "kill" option which terminates the daemon in a rude way
>
> commit a767bda603119387af8e8ce06af268470fe33c3a
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:16:25 2015 +0100
>
>     Memory configuration
>
>     Reduce the default memory minimal overhead of activemq from 1G to 64M
> to
>     ensure that activemq does not revoke to work in small environments.
>     If a larger process heap than 64M is needed the jvm grows up to 1GB.
>
>     Conflicts:
>         assembly/src/release/bin/env
>
> commit 07920b25343f6e66aeb9d46bcbd9be6a73ba5f8e
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:21:44 2015 +0100
>
>     minor stabilisation patches
>
>     This commit adds:
>     - some quoting of variables to prevent problems with unusual paths
>     - sets some default variables to prevent problems
>     - adds some function and helptext documentation
>
> commit 250bc9ea95d35307532332bd051e9c44191bea70
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:41:34 2015 +0100
>
>     stop behavior
>
>     fix bug caused by a uncomplete change which renames the pidfile for a
>     running shutdown task
>
> commit 0eb45b434d943e274b8a8dabc1e9b9247f18a1bb
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:44:07 2015 +0100
>
>     create a pidfile for a console run
>
>     this adds a pidfile which contains the pid of the running shellscript
> if
>     activemq is run by "console". This prevents problems if someone tries
> to
>     to use i.e. the start/stop options while some is debugging activemq in
>     foreground mode.
>
> commit 02a94143dbda9cd2413d972d21f28a0f4024c15c
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:50:32 2015 +0100
>
>     check status of running status
>
>     This adds a better output for some tasks if the broker is not running.
>     The user gets the information that the broker is currently not running.
>     Users are confused if they see a java stacktrace on invoking commands -
>     often they do not read error output in detail.
>     This change respects that the script can also be used to contact remote
>     brokers - if ACTIVEMQ_QUEUEMANAGERURL is defined you get the regular
>     stacktrace, because the script cannot know about the state if a remote
>     broker.
>     In >98% of all cases this script controls local instances - we should
>     help the common user!
>
> commit dd647f98a50b30427ca8160245fcff437cbd0080
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Jan 4 12:59:31 2015 +0100
>
>     provide the real exitcodes
>
>     provide the exitcode of the task to the user
>
> commit ea5f4de399c56c9aed3bb39ba9fe63b8ab856122
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Sun Feb 15 13:04:27 2015 +0100
>
>     Minor improvment
>
>     Conflicts:
>         assembly/src/test/scripts/init-script-testsuite
>
> commit ce3939b11fa4639f65518e1bc2ded26583d2651b
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Mon Feb 23 17:49:04 2015 +0100
>
>     Added help text to give the user a hint how to configure activemq
>
>     Conflicts:
>         assembly/src/release/bin/env
>
> commit e52b7dc368572895cbd7b2b48eb8c3573e767c04
> Author: Marc Schoechlin <marc.schoechlin@breuninger.de>
> <marc.schoechlin@breuninger.de>
> Date:   Tue Apr 21 05:58:31 2015 +0200
>
>     AMQ-5733: return exitcode 0 if stop was sucessful
>
>     according to
> http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
>     the exitcode should be 0, although this is a abnormal termination way
>
>
>
>
> --
> GPG encryption available: 0x670DCBEC/pool.sks-keyservers.net
> (https://www.256bit.org/keys/mschoechlin.pub.asc)
>
>
> --
> GPG encryption available: 0x670DCBEC/pool.sks-keyservers.net
> (https://www.256bit.org/keys/mschoechlin.pub.asc)
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message