MySQL "Bind on TCP/IP port: Address already in use"

Source: Internet
Author: User

MySQL "Bind on TCP/IP port: Address already in use"

Recently, a MySQL instance has been added to the server where MySQL Enterprise Monitor has been deployed. As a result, the MySQL Enterprise Monitor Instance becomes abnormal and cannot be restarted successfully. The error message "Bind on TCP/IP port: Address already in use" is received. The following is a solution to this problem for your reference.

1. Fault
[Root @ SZAPP03 init. d] #./mysql-monitor-server start
Starting mysql service [OK]
150127 09:57:34 mysqld_safe Logging to '/opt/mysql/enterprise/monitor/mysql/runtime/mysqld. log '.
150127 09:57:35 mysqld_safe Starting mysqld daemon with databases from/opt/mysql/enterprise/monitor/mysql/data/
./Mysql-monitor-server: tomcat (pid 28303) already running
150127 09:57:42 mysqld_safe mysqld from pid file/opt/mysql/enterprise/monitor/mysql/runtime/mysqld. pid ended


2. Fault Analysis
# Check the log. The prompt is Bind on TCP/IP port: Address already in use. The Address is in use, as shown below:
[Root @ SZAPP03 init. d] # tail-100/opt/mysql/enterprise/monitor/mysql/runtime/mysqld. log | grep "ERROR"-A5
09:57:36 30753 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
2015-01-27 09:57:36 30753 [ERROR] Do you already have another mysqld server running on port: 13306?
09:57:36 30753 [ERROR] Aborting

09:57:36 30753 [Note] Binlog end
09:57:36 30753 [Note] Shutting down plugin 'partition'
09:57:36 30753 [Note] Shutting down plugin 'archive'
09:57:36 30753 [Note] Shutting down plugin 'blackhole'
09:57:36 30753 [Note] Shutting down plugin 'archive'
09:57:36 30753 [Note] Shutting down plugin 'blackhole'

# Check the default mysql enterprise monitor port number 13306 based on the preceding error message.
[Root @ SZAPP03 init. d] # netstat-nltp | grep mysql
Tcp 0 0: 3306: * LISTEN 8734/mysqld
Tcp 0 0: 3307: * LISTEN 9489/mysqld


3. troubleshooting

# The error message is tomcat (pid 28303) already running.
# This caused my attention, so I tried to kill tomcat-related processes first.
[Root @ SZAPP03 init. d] # ps-ef | grep 28303 | grep-v grep
Mysqlmem 28303 28302 4 Jan20? 07:35:03 jsvc.exe c-java-home/opt/mysql/enterprise/monitor/java
-User mysqlmem-pidfile/opt/mysql/enterprise/monitor/apache-tomcat/temp/catalina. pid-wait 10-outfile
/Opt/mysql/enterprise/monitor/apache-tomcat/logs/catalina-daemon.out-errfile & 1-classpath
/Opt/mysql/enterprise/monitor/apache-tomcat/bin/bootstrap. jar:
/Opt/mysql/enterprise/monitor/apache-tomcat/bin/commons-daemon.jar:
/Opt/mysql/enterprise/monitor/apache-tomcat/bin/tomcat-juli.jar-Dnop-Xmx768M-Xms768M
-XX: + HeapDumpOnOutOfMemoryError-XX: HeapDumpPath =/opt/mysql/enterprise/monitor/apache-tomcat/temp
-XX: + UseParallelOldGC-XX: MaxPermSize = 512 M-Djava. util. logging. manager = org. apache. juli. ClassLoaderLogManager
-Djava. endorsed. dirs =-Dcatalina. base =/opt/mysql/enterprise/monitor/apache-tomcat
-Dcatalina. home =/opt/mysql/enterprise/monitor/apache-tomcat
-Djava. io. tmpdir =/opt/mysql/enterprise/monitor/apache-tomcat/temp org. apache. catalina. startup. Bootstrap

[Root @ SZAPP03 init. d] # kill-9 28303
# Check whether any tomcat-related process exists again and kill tomcat-related processes one by one
[Root @ SZAPP03 init. d] # ps-ef | grep tomcat
[Root @ SZAPP03 init. d] # kill-9 28302
[Root @ SZAPP03 init. d] # kill-9 30867
# Author: Leshami
# Blog:

MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Build a MySQL Master/Slave server in Ubuntu 14.04

Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

MySQL-5.5.38 universal binary Installation

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

Related Article

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.