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:
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:
The next step is to change the port number of mysql to 8888:
#cd /etc/mysql
#vim mysql.conf.d
Select mysqld.cnf and press the "enter" key.
Change 3306 to 8888, save and exit.