cannot create /run/activemq.pid: Permission denied - activemq

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.

Related

Apache Guacamole Home Directory Issue

As part of the Apache Guacamole setup you create a GUACAMOLE_HOME directory for the extension/configuration files etc
I used /etc/guacamole
Then I exported it export GUACAMOLE_HOME=/etc/guacamole
And chmod 0777 /etc/guacamole -R
the printenv command shows the variable GUACAMOLE_HOME=/etc/guacamole
But, when I start the Tomcat7 service, it ignores my guacamole.properties file which is in the GUACAMOLE_HOME:
16:33:56.389 [localhost-startStop-1] INFO
o.a.g.environment.LocalEnvironment - No guacamole.properties file
found within GUACAMOLE_HOME or the classpath. Using defaults.
16:33:57.013 [localhost-startStop-1] INFO
o.a.g.environment.LocalEnvironment - No guacamole.properties file
found within GUACAMOLE_HOME or the classpath. Using defaults.
The service seems to start, but Guacamole is running with defaults...
What is the missing step here??
Guacamole is running under tomcat, and the tomcat server is probably starting under tomcat user. It might be the case that you have defined GUACAMOLE_HOME in your shell, but this is not visible by tomcat user.
I prefer to store guacamole.properties file under .guacamole directory, the 3rd option in the manual:
The directory .guacamole, located within the home directory of the user running the servlet container.
On ubuntu-like systems, default tomcat installation is started under tomcat7 or tomcat8 user, depending on the version. You may do the following:
cd ~tomcat7
sudo ln -s /etc/guacamole .guacamole
This will make a .guacamole link to your configuration directory, in the home directory of the user running the servlet container, as described in the manual.

Cannot connect Impala-Kudu to Apache Kudu (without Cloudera Manager): Get TTransportException Error

I have successfully installed kudu on Ubuntu (Trusty) as per the official kudu documentations (see http://kudu.apache.org/docs/installation.html ). The setup has one node running master and tablet server and another node running the tablet server only. I am having issues installing impala-kudu without Cloudera Manager on the node running kudu master. I have followed CDH installation instructions on this (see http://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_cdh5_install.html ) page until Step 3. I have avoided installing CDH with YARN and MRv1 as I don’t need to run any mapreduce jobs and will not be using hadoop. Impala-kudu and impala-kudu-shell installed without errors. When I launch the impala-shell it returns:
Starting Impala Shell without Kerberos authentication
Error connecting: TTransportException, Could not connect to kudu_test:21000
***********************************************************************************
Welcome to the Impala shell. Copyright (c) 2015 Cloudera, Inc. All rights reserved.
(Impala Shell v2.7.0-cdh5-IMPALA_KUDU-cdh5 (48f1ad3) built on Thu Aug 18 12:15:44 PDT 2016)Want to know what version of Impala you're connected to? Run the VERSION command to
find out!
***********************************************************************************
[Not connected] >
I have tried to use the CONNECT option to connect to the kudu-master node without success. Both imapala-kudu and kudu are running on the same machine. Are there additional configuration settings which need to be changed or is hadoop and YARN a strict requirement to make impala-kudu work?
After running ps -ef | grep -i impalad I can confirm the impala daemon is not running. After navigating to the impala logs at ~/var/log/impala I find a few errors and warning files. Here is the output of impalad.ERROR:
Log file created at: 2016/09/13 13:26:24
Running on machine: kudu_test
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0913 13:26:24.084389 3021 logging.cc:118] stderr will be logged to this file.
E0913 13:26:25.406966 3021 impala-server.cc:249] Currently configured default filesystem: LocalFileSystem. fs.defaultFS (file:///) is not supported.ERROR: block location tracking is not properly enabled because
- dfs.datanode.hdfs-blocks-metadata.enabled is not enabled.
- dfs.client.file-block-storage-locations.timeout.millis is too low. It should be at least 10 seconds.
E0913 13:26:25.406990 3021 impala-server.cc:252] Aborting Impala Server startup due to improper configuration. Impalad exiting.
Maybe I need to revisit HDFS and the Hive Metastore to ensure I have these services configured properly?
According to the log, impalad quits because the default filesystem is configured to be LocalFileSystem, which is not supported. You have to set a distributed filesystem, such as HDFS as the default.
Although Kudu is a separate storage system and does not rely on HDFS, Impala still seems to require a non-local default FS even when using with Kudu. The Impala_Kudu documentation explicitly lists the following requirement:
Before installing Impala_Kudu, you must have already installed and configured services for HDFS (though it is not used by Kudu), the Hive Metastore (where Impala stores its metadata), and Kudu.
I can even imagine that HDFS may not really be needed for any other reason than to make Impala happy, but this is just speculation from my side. Update: Found IMPALA-1850 which confirms my suspicion that HDFS should not be needed for Impala any more, but it's not just a single check that has to be removed.

Startup error writing to to /var/log/rabbitmq/rabbit#rab04.log

Rabbitmq with erlang-base-hipe installed on Ubuntu 14.04 starts fine, but logs several of these messages in the /var/log/rabbitmq/startup_log file
Error: function_clause
Stack trace: [{error_logger_file_h,write_event,
[{<0.4819.0>,"/var/log/rabbitmq/rabbit#rab04.log",[]},
{info_msg,<0.31.0>,
{<0.2.0>,"HiPE in use: compiled ~B modules in ~Bs.~n",
"9\e"}}],
[{file,"error_logger_file_h.erl"},{line,114}]},
{error_logger_file_h,handle_event,2,
[{file,"error_logger_file_h.erl"},{line,79}]},
{rabbit_error_logger_file_h,safe_handle_event,3,[]},
{gen_event,server_update,4,[{file,"gen_event.erl"},{line,538}]},
{gen_event,server_notify,4,[{file,"gen_event.erl"},{line,520}]},
{gen_event,server_notify,4,[{file,"gen_event.erl"},{line,522}]},
{gen_event,handle_msg,5,[{file,"gen_event.erl"},{line,261}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]
RabbitMQ works fine, however, we no longer get information written to the error log file.
The change is that we installed erlang-base-hipe and modified /etc/rabbitmq/rabbitmq.config with
{hipe_compile, true}
The permissions on /var/log/rabbitmq/rabbit#rab04.log are 644 and owned by the user and group rabbitmq which is the user configured for the rabbitmq service.
Suggestions on how to debug and or repair this problem are appreciated.

How to get private executors to communicate with our scm

we are using jenkins-cli for private executors like this:
Command on our private build machine (linux box):
java -jar jenkins-cli.jar -s [cloudbees_url]-i /var/build/.ssh/id_rsa on-premise-executor -fsroot /var/build -labels myLabel -executors 1
But when I kick off a job on this machine, I get a permission denied error in the build:
conq: repository access denied. deployment key is not associated with the requested repository.
fatal: Could not read from remote repository.
Do you know how to add the keys necessary for the build machines to talk to our SCM (We are using BitBucket)
First try running the same commands as the Jenkins job would run, as the user which started the slave.

Unable to start Active MQ on Linux

I am trying to get ActiveMQ server running on a RaspberryPI Debian Squeeze box and all appears to be installed correctly but when I try and start the service I am getting the following...
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0# bin/activemq
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/jre1.7.0_07/bin/java'
/usr/jre1.7.0_07/bin/java: 1: /usr/jre1.7.0_07/bin/java:ELF0
4°: not found
/usr/jre1.7.0_07/bin/java: 2: /usr/jre1.7.0_07/bin/java: Syntax error: "(" unexpected
Tasks provided by the sysv init script:
restart - stop running instance (if there is one), start new instance
console - start broker in foreground, useful for debugging purposes
status - check if activemq process is running
setup - create the specified configuration file for this init script
(see next usage section)
Configuration of this script:
The configuration of this script can be placed on /etc/default/activemq or /root/.activemqrc.
To use additional configurations for running multiple instances on the same operating system
rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
$HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence.
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0#
It looks like there is an error somewhere but I am a fairly newbie at this and don't know where to look.
Just adding an answer since,becoz as per the documentation , the command is wrong
to start activemqm, use
Navigate to [installation directory/bin] and run ./activemq start or simple bin/activemq start
if you want to see it live in a window use bin/activemq console
To stop, you have to kill the process
The default ActiveMQ "getting started" link sends u here : http://activemq.apache.org/getting-started.html which is the "Getting Started Guide for ActiveMQ 4.x".
If you scroll down main documentation page, you will find this link with the proper commands :
http://activemq.apache.org/version-5-getting-started.html