Opensips server build problem [1]-Failed to connect to 127.0.0.1 port 8888: Connection refused

2cd6a1045c904d0a8d8a1744ced8c2cc.png

415f276521964a9c8f5b177ded5367d1.jpg Both cases show that the 8888 port of opensips cannot be used, and the service is denied. The first possibility is that the 8888 port has been occupied, so check the usage of the 8888 port through the netstat -ap |grep 8888 command:

8b17bac0b1ec4b54a4f0dcc4cd41543c.png

 It can be seen that there is no service on 8888, so the denial of service is normal. Therefore, you need to check what operations opensips will perform through port 8888. It turns out that opensips connects to the mysql database through port 8888 by default, and mysql defaults to port 3306 for data transmission. This error occurs only when the ports are not correct. You can view the port of mysql through netstat -nltup or mysql -u root -p, show global variables like 'port' command, port port is the global variable:

548ef9ca86de40bc84eb74026fa848c6.png

 The next step is to change the port number of mysql to 8888:

#cd /etc/mysql

#vim mysql.conf.d

52df5a3aa1df4eac88c355963730317f.png

3f900acd625b4fa98ae7ad85d49317e6.png 

 Select mysqld.cnf and press the "enter" key.

a507f2e4a46a4582baeba2e262b9562d.png

 Change 3306 to 8888, save and exit.

 

Guess you like

Origin blog.csdn.net/m0_51292856/article/details/128337753
Recommended