activemq no "activemq" file in /bin directory - java

I am using (trying to use) activemq 5 on Ubuntu 10.4 and there are big mismatches between the documentation on Apache.org and what is actually in the install.
I installed it by doing a sudo apt-get install activemq
According to the Apache documentation there should be a file called "activemq" in the bin directory of the install. However, in my folder /usr/share/activemq/bin there is only one file: run.jar which is a symlink. There is no file activemq.
So, I have no way to even start it according to the documentation (http://activemq.apache.org/version-5-getting-started.html#Version5GettingStarted-InstallationProcedureforUnix).
If I try to start a broker using the command activemq console I get the error mkdir: missing operand followed by a long java command line which ends with
-jar "/usr/share/activemq/bin/run.jar" start : not found
which is strange because that exact symlink is on my machine.
If I run sudo activemq console I get similar errors followed by runtime exception,
"Failed to execute start task. Reason blah blah FileNotFoundException:
class path resource [activemq.xml] cannot be opened because it does
not exist. (StartCommand.java:98)"
How can I get past this problem and start activemq?

There is something wrong definitely. You don't need a packet manager.
I advise you to use the official download page:
http://activemq.apache.org/activemq-5151-release.html
Pick the latest or other version then download, extract and start via ./bin/activemq start

Related

Why doesn't my JBoss AS bin directory contain a run.sh script?

I am running Ubuntu 16.04 and I need to install and run Restcomm JSS7 stack as a JBoss AS Service.
I followed this video tutorial to install JBoss AS 7. Then I set the JBOSS_HOME environment variable to installation directory of JBoss AS 7. As a result, I was able to start the JBoss AS successfully by executing ./run.sh in the bin sub-folder of the installation directory.
Then I followed this guide to install Restcomm JSS7 stack. For that, I downloaded restcomm-jss7-7.4.1404.zip, unzipped it to /opt/ and then navigated to the ss7-jboss sub-directory and then executed ant deploy,
and the result was
...
BUILD SUCCESSFUL
which according to the guide is an indication of the service deployed successfully.
Then I am following CHAPTER 4 SECTION 4.1 of this user manual to run it as a JBoss AS Service. According to it,
All you have to do to start the Service is start the JBoss AS. This
will automatically start the SS7 Service. To start the JBoss Server
you must execute the run.sh (Unix) or run.bat (Microsoft Windows)
startup script in the /bin folder (on Unix or
Windows).
TWO PROBLEMS:
My <jboss_install_directory>/bin does NOT have a run.sh script. Because of this reason, I tried by running JBoss AS by using the regular standalone.sh script.
Next in the user manual, it is stated:
Result: If the service started properly you should see following lines
in the Unix terminal or Command Prompt depending on your environment:
(Note: I have pasted the following excerpt from user manual here, since it is too long to paste in this question.)
But I see none of those lines in my terminal. Rather, my terminal output of running ./standalone.sh is pasted here.
So I don't know how and where to proceed from here. Please help.
NOTE: This question is NOT a duplicate of my other question. Like I mentioned in the question titles, this question is about why my JBoss AS installation doesn't contain a run.sh script, and what would be its alternative. The other question is about some possible command to find out the JBoss Services started when it is running? When a beginner is starting to learn something, their entire purpose Not getting the job done. They have many confusions/questions in their mind.
The documentation documents how to start a JBoss 5.1 server but your installation uses a JBoss 7.1 server, which is why you have to use standalone.sh instead of run.sh to start the server and why the logs are different.
Since you correctly reach the JBoss AS 7.1.0.Final "Thunder" started in 3955ms line I wouldn't worry too much (except about using a documentation that is clearly outdated).
The documentation of your product only declares compatibility with JBoss 5.1.0. While it may work on later releases, you might want to check if there's a more recent version of your product. I wouldn't recommend installing JBoss AS 5.1.0 as it isn't supported anymore and will contain security breaches.

Problems about Jenkins running remote shell script

I have some question when using jenkins.
the scenario:
I have installed a tomcat on machine A,and config all necessary environment including JDK, and they work well.
I wrote a shell script named restart.sh to kill the tomcat process,and restart.
I execute the script and it works well.When I check the tomcat process using ps -ef,and it shows the exact JDK path as I already config.The JDK path is /usr/local/java/JDK7
When I execute the restart.sh script via jenkins,problem comes. I can see the tomcat process using the wrong JDK path,/usr/bin/java,not the path as i config. I use SSH Publishers plugin to run the remote script.see as the image below:
enter image description here
I don't know how this problem happen,please help,Thanks all
This might be the problem of path variables, just to cross verify , find JAVA_HOME on your server 1. By logging onto server manually 2. From Exec command of your ssh section of your jenkins job , most probably you will find the answer.
i'm assuming you're jenkins is configured to use jdk which is defined at its root level.
if this didn't solve , we need to look into this problem from another angle.

java missing class when supervisor running process but not when running as www-data user

I've made my first clojure app and I've built it with leiningen by running lein ring uberjar. I can run this on my dev machine (fedora 23) and I can run this on my ubuntu production machine java -jar tomahawk.jar. I've followed the digital ocean tutorial here that describes how to set up the environment. My supervisor conf is the following:
[program:tomahawk]
environment=TOMAHAWK_DB=$TOMAHAWK_DB
command=/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -jar tomahawk.jar
logfile=/tmp/supervisord.log
directory=/var/www/tomahawk/app
user=www-data
autostart=true
autorestart=true
startretries=3
redirect_stderr=true
stdout_logfile=/var/www/logs/tomahawk.app.log
However, when using this through nginx, i get the error
2016-03-19 23:34:08.594:WARN:oejs.AbstractHttpConnection:/
java.sql.SQLException: No suitable driver found for jdbc:sqlserver:$
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at clojure.java.jdbc$get_connection.invoke(jdbc.clj:255)
This comes from the com.microsoft.sqldbc4.jar file. However, I can run this standalone jar file, as well as I can run sudo -u www-data env TOMAHAWK_DB=$TOMAHAWK_DB java -jar tomahawk.jar just fine. Also, while this is running, I can hit it through the nginx reverse proxy.
I've searched around and found an unanswered email on the supervisor mailing list from 2011. Why can I only sometimes see the missing jar file?
I've tried putting it inside of the /usr/lib/jvm/.../lib/ext location for my jvm, bundled inside of the jar file, running from Tomcat, etc. I've made an upstart script as well with identical results as well. I am not sure what other paths I can try and was wondering if anyone had any insights.

Heroku - How to fix "cannot load such file -- foreman/cli (LoadError)" ? - [Java, Windows, Ruby-on-rails]

I'm following the official Heroku Java tutorial:
Getting Started with Java on Heroku
I've succesfully followed every step up to
Run the app locally
Running the command described in this step:
foreman start web
that on Windows needs to use a specific Procfile:
foreman start web -f Procfile.windows
I get the following error:
C:\Users\Andrea>foreman start web -f Procfile.windows
C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.r
b:36:in `require': cannot load such file -- foreman/cli (LoadError)
from C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/cus
tom_require.rb:36:in `require'
from C:/Program Files (x86)/Heroku/bin/foreman:8:in `<main>'
What causes the problem, and how can I fix it ?
Thanks #AndreaLigios for posting my solution on StackOverflow.
#Gespejo is getting below problem taken from GitHub:
I installed heroku in the c:\Heroku directory but it's still not working. Can you help me? Thanks
C:>foreman
C:/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require':
cannot load such file -- foreman/cli(LoadError) from C:/Heroku/ruby-1.9.3/lib/ruby/
site_ruby/1.9.1/rubygems/custom_requi re.rb:36:inrequire' from C:/Heroku/bin/foreman:8:in
Follow the below Steps:
Uninstall Heroku Toolbelt completely from your computer.
Uninstall Foreman gem by using command gem uninstall 'foreman'.
Now install Heroku Toolbelt again
Check foreman is working now or not by running command foreman that will list all commands option supported by foreman
Let us know if problem has solved after executing above listed steps.
The error is caused by the fact that:
Foreman does not work if your installation of Heroku has any special characters or spaces in any directory name or in directory Hierarchy
(thanks to #theajaygupta for finding the solution)
Since the Heroku Toolbelt for Windows installation is defaulting the Heroku path to
C:\Program Files (x86)\Heroku
, everyone following the tutorial on Windows will get this error.
The solution is simple: reinstall the Heroku Toolbelt for Windows specifying a path without spaces and special characters. For example:
Valid
C:\Heroku
C:\SeemsLegitIn2015\Heroku
Not Valid
C:\Program Files (x86)\Heroku
C:\Progra~2\Heroku

Neo4J Server Installation Linux AWS Centos OS -- service user cannot find java

I have downloaded Neo4J enterprise from the Neo site and have untar'd it under /opt
I have successfully downloaded and installed the Java 7 Server edition from the Oracle web site. Note after indicating I want a server JRE, Oracle downloads this : jdk1.7.0_51
I have untar'd both under /opt giving me /opt/neo4j-2.0.0 and /opt/jdk1.7.0_51
I have successfully installed Neo4J 2.O on AWS with Centos Linux, such that it should run as a Service under a service account. To do this I used the Neo install command. The command ran successfully
I can successfully start Neo4J as myself. After editing my ~/.bash_profile to define JAVA_HOME and exporting.
export JAVA_HOME="/opt/jdk1.7.0_51/"
export NEO4J_HOME="/opt/neo4j-2.0.0"
export PATH=$JAVA_HOME/bin:$NEO4J_HOME:$PATH
Apply
source ~/.bash_profile
cd /$NEO$J_HOME
bin/neo4j start
Works just fine.
However, we are not able to successfully get Neo to start as a service
sudo service neo4j-service start
which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)
ERROR: Unable to find java. (Cannot execute )
* Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
If I echo $JAVA_HOME it returns as expected
If I echo $PATH it returns as expected
by as expected we can see java on the path.
If I simply type java -version before I run sudo service neo4j-service start
the response shows the java version.
A bit of background: the Linux service command is not available unless I first run a special script per our normal it policies. However, the script clobbers the exports that I would otherwise use.
Accordingly the command
service neo4j-service start
returns
-bash: neo4j-service: command not found
indicating that the 'service' command cannot be found
So sudo is required in our environment to execute the service command
We have tried simply placing jdk1.7.0_51 under /sbin/jdk1.7.0_51 that does not work. We have also tried extracting the jre folder from jdk1.7.0_51 and placing it under /sbin/jre
Also tried creating a java.sh file under /etc/profile.d/
Still no success.
So the simple question....
Where is Neo4J 2.0.0 looking for Java when running as a service? Is it using the environment variable JAVA_HOME, or is it looking in one of the following locations as the Neo4J server error message would seem to indicate? "no java in (/sbin:/usr/sbin:/bin:/usr/bin)"
Under my installation configuration the neo4j service is intended to run under the account neo4jservice. Is this as simple as making sure JAVA_HOME is available to the neo4jservice accound? Why the error message "no java in (/sbin:/usr/sbin:/bin:/usr/bin)"?
Thanks in advance
I ran a test on my solaris and Linux Mint install and this seems to work for me
Perhaps it's not elegant, but it will get you going. Just drop the sudo part for your startup script.
sudo NEO4J_HOME="/opt/neo4j" JAVA_HOME="/usr/java" /opt/neo4j/bin/neo4j start
Obviously, modify the environment variables to your situation:
JAVA_HOME="/opt/jdk1.7.0_51/" NEO4J_HOME="/opt/neo4j-2.0.0" service neo4j-service start
Not quite the answer I was hoping for... as the answer seems to disregard this part of the original POST: "So sudo is required in our environment to execute the service command"
What does seem to work is modifying the neo4j-service script to include the exports.
neo4j-service is found at /etc/init.d

Categories

Resources