Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot create /run/activemq.pid: Permission denied

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')
like image 868
Devendra Avatar asked Nov 15 '25 20:11

Devendra


1 Answers

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.

like image 137
Justin Bertram Avatar answered Nov 17 '25 10:11

Justin Bertram