You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Ryan Ferraro (JIRA)" <ji...@apache.org> on 2016/03/14 19:16:33 UTC

[jira] [Commented] (AMQ-6213) Unable to use default login config in "activemq*.bat" files if ActiveMQ is installed in a path with spaces.

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

Ryan Ferraro commented on AMQ-6213:
-----------------------------------

>From 3c9433439d28d5050e89d77df660c78c516c02b1 Mon Sep 17 00:00:00 2001
From: Ryan Ferraro <ry...@tideworks.com>
Date: Mon, 14 Mar 2016 10:42:10 -0700
Subject: [PATCH] Enclose java.security.auth.login.config parameter with
 quotes, so %ACTIVEMQ_CONF%\login.config is passed with spaces in file path.

---
 assembly/src/release/bin/activemq-admin.bat | 2 +-
 assembly/src/release/bin/activemq.bat       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/assembly/src/release/bin/activemq-admin.bat b/assembly/src/release/bin/activemq-admin.bat
index 35a5ffb..46e0627 100644
--- a/assembly/src/release/bin/activemq-admin.bat
+++ b/assembly/src/release/bin/activemq-admin.bat
@@ -80,7 +80,7 @@ if "%ACTIVEMQ_TMP%" == "" set ACTIVEMQ_TMP=%ACTIVEMQ_DATA%\tmp
 if /i not "%1" == "start" goto debugOpts
 
 
-if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx1G -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=%ACTIVEMQ_CONF%\login.config
+if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx1G -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config="%ACTIVEMQ_CONF%\login.config"
 
 if "%ACTIVEMQ_SUNJMX_START%" == "" set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote
 REM set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
diff --git a/assembly/src/release/bin/activemq.bat b/assembly/src/release/bin/activemq.bat
index 22e1f9d..c532c43 100755
--- a/assembly/src/release/bin/activemq.bat
+++ b/assembly/src/release/bin/activemq.bat
@@ -77,7 +77,7 @@ if "%ACTIVEMQ_DATA%" == "" set ACTIVEMQ_DATA=%ACTIVEMQ_HOME%\data
 
 if "%ACTIVEMQ_TMP%" == "" set ACTIVEMQ_TMP=%ACTIVEMQ_DATA%\tmp
 
-if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=%ACTIVEMQ_CONF%\login.config
+if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config="%ACTIVEMQ_CONF%\login.config"
 
 if "%ACTIVEMQ_SUNJMX_START%" == "" set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote
 REM set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-- 
2.7.2.windows.1


> Unable to use default login config in "activemq*.bat" files if ActiveMQ is installed in a path with spaces.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-6213
>                 URL: https://issues.apache.org/jira/browse/AMQ-6213
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Distribution
>    Affects Versions: 5.13.2
>         Environment: Windows 7 Enterprise x64
>            Reporter: Ryan Ferraro
>            Priority: Minor
>              Labels: newbie, patch
>             Fix For: 5.x
>
>
> If ActiveMQ is installed in a path with spaces (like: "C:\Program Files\AMQ"), the batch files activemq.bat and activemq-admin.bat cannot start the service. 
> The source of the issue appears to be that the -Djava.security.auth.login.config command line option is getting passed a raw path value that is not properly encoded for spaces in the path. I have a patch available that surrounds this parameter value with quotations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)