I'm trying to run ActiveMQ on Ubuntu 16.04. To start ActiveMQ I run this command.
/opt/apache-activemq-5.15.10/bin/linux-x86-64$ sudo activemq start
It results in this error:
INFO: Loading '/usr/share/activemq/activemq-options'
INFO: Using java '/usr/lib/jvm/default-java//bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: changing to user 'activemq' to invoke java
-su: 3: cannot create /run/activemq.pid: Permission denied
INFO: pidfile created : '/run/activemq.pid' (pid '23718')
As noted in the output, the script changes to the activemq user:
INFO: changing to user 'activemq' to invoke java
However, the user activemq doesn't have permission to create the file activemq.pid in the /run directory.
You should either grant the user activemq permission to create the file activemq.pid in the /run directory or use the ACTIVEMQ_USER environment variable to specify a user which does have permission to create the file activemq.pid in the /run directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With