You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Peri Stracchino <pe...@york.ac.uk> on 2014/09/18 10:16:49 UTC

changing user fails when running activemq from init.d

Hi

I'm trying to get an existing (and working) apachemq installation running
as a specific user under init.d.
I have it working if I dont specify the user and allow it to run as root.
However if I change the user in the /etc/default/activemq file to the
required user I get the following output, and  of course it doesnt start
Ambiguous output redirect.
RET=1: Command not found.
APID=: Command not found.
APID: Undefined variable.
APID: Undefined variable.

obviously what it needs is a path or permissions to the missing command and
variables - but how can I find out from this output which these are?

I have it set up with the activemq file in etc/init.d as a sym link to the
activemq file in the activemq home directory.
I obtained the /etc/default/conf file by running running the command
"./bin/activemq setup filename" from the existing installation, then
placing this under /etc/default. works under root but not my local user! I
have  tried copying the local environmental variables for the required user
into the start of the /default/activemq script, but this makes no
difference at all to the output. activemq doesnt start up at all, so there
isnt any logging to get further clues from.

Cheers
Peri (x4082)

Re: changing user fails when running activemq from init.d

Posted by Tim Bain <tb...@alumni.duke.edu>.
Awesome, thanks for helping out.

On Sep 30, 2016 1:15 AM, "rkrell" <re...@gmail.com> wrote:

> Sure, here you are: https://issues.apache.org/jira/browse/AMQ-6447.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/changing-user-fails-when-running-activemq-
> from-init-d-tp4685689p4717281.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: changing user fails when running activemq from init.d

Posted by rkrell <re...@gmail.com>.
Sure, here you are: https://issues.apache.org/jira/browse/AMQ-6447.



--
View this message in context: http://activemq.2283324.n4.nabble.com/changing-user-fails-when-running-activemq-from-init-d-tp4685689p4717281.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: changing user fails when running activemq from init.d

Posted by Tim Bain <tb...@alumni.duke.edu>.
Can you please submit a bug report in JIRA for this?

On Sep 29, 2016 5:34 AM, "rkrell" <re...@gmail.com> wrote:

> I've been faced with exactly the same problem and found out the problem to
> be
> a small inaccuracy in the bin/activemq script (version 5.10.0), when the
> ACTIVEMQ_USER variable is set to a dedicated system user AND this system
> user does have /bin/csh in /etc/passwd defined as default shell instead of
> /bin/sh (bash).
>
> The fix is quite simple: In bin/activemq, find the (two) calls of 'su -c
> ...' and replace them by 'su -s /bin/sh -c ...'.
>
> That's all.
>
> This should get probably fixed in the ActiveMQ start scripts itself.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/changing-user-fails-when-running-activemq-
> from-init-d-tp4685689p4717204.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: changing user fails when running activemq from init.d

Posted by rkrell <re...@gmail.com>.
I've been faced with exactly the same problem and found out the problem to be
a small inaccuracy in the bin/activemq script (version 5.10.0), when the
ACTIVEMQ_USER variable is set to a dedicated system user AND this system
user does have /bin/csh in /etc/passwd defined as default shell instead of
/bin/sh (bash).

The fix is quite simple: In bin/activemq, find the (two) calls of 'su -c
...' and replace them by 'su -s /bin/sh -c ...'.

That's all.

This should get probably fixed in the ActiveMQ start scripts itself.



--
View this message in context: http://activemq.2283324.n4.nabble.com/changing-user-fails-when-running-activemq-from-init-d-tp4685689p4717204.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.