ACTIVEMQ deployment steps and background Management site Service Unavailable issue resolution notes

Source: Internet
Author: User

Recently deployed ACTIVEMQ, found that some servers can open the background management URL, some servers cannot open, jetty reported 503 Service unavailable.

After a long time finally found the problem, now the deployment and resolution process to take notes as follows:

Installation Deployment steps:

# See if it comes with Java
Rpm-qa | grep java
# Uninstall Linux comes with the OpenjavaYumRemove-y Java
# or
RPM-E java# upload or network download JDK 7rz JDK-7u79-linux-X64.rpmorwgethttp//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_79export CLASSPATH=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/Tools.jar---------------------------------------------Source~/. Bash_profileEcho$JAVA _home# upload or network download Jdkrz Apache-activemq-5.12.1-bin.Tar. Gzorwgethttp//archive.apache.org/dist/activemq/5.12.1/apache-activemq-5.12.1-bin.tar.gzTarZXVF apache-activemq-5.12.1-bin.Tar. GZMVapache-activemq-5.12.1/usr/local/activemq# directly transform the ACTIVEMQ native startup script to do the service boot scriptLN-s/usr/local/activemq/bin/activemq/etc/init.d/VI/etc/init.d/ACTIVEMQ---------------------------------------------# The second line inserts # Chkconfig:345 the Panax Notoginseng# Description:auto Start ActiveMQ---------------------------------------------# can be set to boot up chkconfig activemq onchkconfig--list activemq# boot service See service ACTIVEMQ start# Set Firewall service iptables statusiptables-A input-p tcp-m state--state new-m TCP--dport61616-J Acceptiptables-A input-p tcp-m state--state new-m TCP--dport8161-J Acceptservice iptables saveservice iptables Restart

As soon as the deployment is good, it can be used normally, the default message port is 61616, the background management URL Port 8161, open the background management URL directly with the browser, the interface is as follows:

But on-line server deployment is a problem, unable to access the background management site, the interface is as follows:

Degree Niang for a long time, did not find the relevant solution, and then the nth part of the ACTIVEMQ official documents, see can also ACTIVEMQ console parameters for the foreground start, may expose the cause of the error, so the command is as follows:

# First deactivate the Activemqservice activemq stop# Manual console mode to start the/USR/LOCAL/ACTIVEMQ/BIN/ACTIVEMQ console

Then saw a pile of output, turn up the n screen after the end of the following sentence error:

Suddenly think I have this server hostname changed to Dubbo, but did not modify the Hosts file!!!

As shown above in the hosts added hostname Dubbo, normal start ACTIVEMQ service, background management URL finally normal.

So low to chop hands of the mistake, it should not!!!

The steps to complete modifying the server hostname are documented here as a ring:

# Modify host name to Server1 VI /etc/sysconfig/network---------------------------------HOSTNAME=Server1- --------------------------------# Modify the Hosts file to let the server recognize the name VI /etc/hosts------------------ ---------------127.0. 0.1   Server1---------------------------------# After restart reboot# If you cannot restart temporarily, you can use the following command to temporarily take effect  Hostname  server1# exit exit
Re-login (SSH re-connect) to see the hostname is in effect
~]#

ACTIVEMQ deployment steps and background Management site Service Unavailable issue resolution notes

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.