You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "lars geidel (JIRA)" <ji...@apache.org> on 2011/08/09 14:45:27 UTC

[jira] [Commented] (AMQ-3101) Issues in password encryption

    [ https://issues.apache.org/jira/browse/AMQ-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081597#comment-13081597 ] 

lars geidel commented on AMQ-3101:
----------------------------------

had the same problem and found the solution (it's a windows-only problem with the activemq.bat):

the following line in the activemq.bat adds "start" as the first argument:
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" start %*

so "activemq.bat encrypt --password xxx --input yyy" becomes "activemq.bat start encrypt --password xxx --input yyy", which calls the StartCommand.class instead of the intended EncryptCommand.class. the StartCommand.class then tries to load a broker from the uri "encrypt" ...

long story short: simple remove the "start" from there (you'll have to start activemq with "activemq start" then)

> Issues in password encryption
> -----------------------------
>
>                 Key: AMQ-3101
>                 URL: https://issues.apache.org/jira/browse/AMQ-3101
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: Win XP
>            Reporter: Chaitanya Gupta
>
> I am trying to use security features provided in activemq 5.4.2, I downloaded and extractd the zip file. I am trying the below command to encrypt the password but getting few errors, below are the details ...
> H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2>bin\activemq encrypt --passwo
> rd activemq --input mypassword
> Java Runtime: IBM Corporation 1.6.0 G:\IBM\IBM-JDK\ibm_sdk60\ibm_sdk60\jre
>   Heap sizes: current=4096k  free=2789k  max=524288k
>     JVM args: -Xjcl:jclscar_24 -Dcom.ibm.oti.vm.bootstrap.library.path=G:\IBM\IB
> M-JDK\ibm_sdk60\ibm_sdk60\jre\bin -Dsun.boot.library.path=G:\IBM\IBM-JDK\ibm_sdk
> 60\ibm_sdk60\jre\bin -Djava.library.path=G:\IBM\IBM-JDK\ibm_sdk60\ibm_sdk60\jre\
> bin;.;C:\Perl\bin;C:\Program Files\Common Files\NetSarang;C:\WINDOWS\system32;C:
> \WINDOWS;C:\WINDOWS\System32\Wbem;G:\IBM\IBM-JDK\ibm_sdk60\ibm_sdk60\bin;H:\Java
> \apache-ant-1.7.0-bin\apache-ant-1.7.0\bin;C:\Program Files\Windows Imaging\ -Dj
> ava.home=G:\IBM\IBM-JDK\ibm_sdk60\ibm_sdk60\jre -Djava.ext.dirs=G:\IBM\IBM-JDK\i
> bm_sdk60\ibm_sdk60\jre\lib\ext -Duser.dir=H:\apache-activemq-5.4.2-bin\apache-ac
> tivemq-5.4.2 _j2se_j9=71168 -Xdump -Dconsole.encoding=Cp437 -Djava.class.path=.
> -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRu
> nner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpat
> h=H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2/conf;H:\apache-activemq-5.4
> .2-bin\apache-activemq-5.4.2/conf; -Dactivemq.home=H:\apache-activemq-5.4.2-bin\
> apache-activemq-5.4.2 -Dactivemq.base=H:\apache-activemq-5.4.2-bin\apache-active
> mq-5.4.2 -Djava.class.path=H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2/bi
> n/run.jar -Dsun.java.command=H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2/
> bin/run.jar start encrypt --password activemq --input mypassword -Dsun.java.laun
> cher=SUN_STANDARD _port_library
> ACTIVEMQ_HOME: H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2
> ACTIVEMQ_BASE: H:\apache-activemq-5.4.2-bin\apache-activemq-5.4.2
> Loading message broker from: encrypt
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: java.la
> ng.IllegalArgumentException: Invalid broker URI, no scheme specified: encrypt
> java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.Ille
> galArgumentException: Invalid broker URI, no scheme specified: encrypt
>         at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
> .java:98)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
> ommand.java:57)
>         at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
> .java:143)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
> ommand.java:57)
>         at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
> va:85)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:59)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:39)
>         at java.lang.reflect.Method.invoke(Method.java:612)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
>         at org.apache.activemq.console.Main.main(Main.java:107)
> Caused by: java.lang.IllegalArgumentException: Invalid broker URI, no scheme spe
> cified: encrypt

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira