ActiveMQ deployment steps and background management website Service Unavailable Problem Solving notes, activemq and webservice

Source: Internet
Author: User

ActiveMQ deployment steps and background management website Service Unavailable Problem Solving notes, activemq and webservice

When ActiveMQ was recently deployed, it was found that some servers could open the background management website, some servers could not open it, and Jetty reported 503 Service Unavailable.

After a long time, I finally found the problem. Now I will take notes on the deployment and solution process as follows:

Installation and deployment steps:

# Check whether Java is included
Rpm-qa | grep java
# Uninstall OpenJavayum remove-y java in Linux
# Or
Rpm-e java # upload or download JDK 7rz jdk-7u79-linux-x64.rpmorwget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpmrpm-ivh jdk-7u79-linux-x64.rpmjava-versionvi ~ /. Bash_profile ------------------------------------------- export JAVA_HOME =/usr/java/jdk1.7.0 _ 79 export CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar --------------------------------------------- source ~ /. Bash_profileecho $ JAVA_HOME # upload or net download JDKrz apache-activemq-5.12.1-bin.tar.gzorwget http://archive.apache.org/dist/activemq/5.12.1/apache-activemq-5.12.1-bin.tar.gztar apache-activemq-5.12.1-bin.tar.gzmv zxvf apache-activemq-5.12.1/usr/local/activemq # direct transformation activemq native STARTUP script to do service boot script ln-s/usr/local/activemq /bin/activemq/etc/init. d/vi/etc/init. d/activemq --------------------------------------------- # insert in the second line # chkconfig: 345 63 37 # description: auto start ActiveMQ restart # You can set to start chkconfig activemq onchkconfig -- list activemq # start the service to see service activemq start # Set firewall service iptables statusiptables-a input-p tcp-m state -- state NEW-m tcp -- dport 61616-j ACCEPTiptables-a input-p tcp-m state -- state NEW-m tcp -- dport 8161-j ACCEPTservice iptables saveservice iptables restart

After the above deployment, you can use it normally. The default message port is 61616, and the background management website port is 8161. You can directly open the background management website using a browser. The interface is as follows:

However, an error occurs during online server deployment and the website management interface is as follows:

Du Niang hasn't found a solution for a long time. Later, when I read the ActiveMQ official document in part N, I can see that the activemq console parameter can be used for foreground startup, which may expose the cause of the error, the command is as follows:

# Stop activemqservice activemq stop # Start/usr/local/activemq/bin/activemq console manually

As a result, I saw a bunch of output logs. After Turning N screens up, I finally got down to the following error:

Suddenly remembered that I had changed the hostname of this server to dubbo, but did not modify the hosts file !!!

 

As shown above, after adding the host name dubbo to hosts, the activemq service is started normally, and the background management URL is finally normal.

It's not a low-level mistake !!!

Here, the complete steps for modifying the Server hostname are recorded as follows, so as to avoid this:

# Modify the host name to server1vi/etc/sysconfig/network ----------------------------------- HOSTNAME = server1 ----------------------------- # modify the hosts file, let the server recognize this name vi/etc/hosts ------------------------------- 127.0.0.1 server1 restart # reboot takes effect after restart # If the restart cannot be performed temporarily, use the following command to temporarily take effect hostname server1 # exit
# Log on again (SSH reconnect) and you will see that the host name takes effect.
[Root @ server1 ~] #

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.