Updated on 2024-11-29 GMT+08:00

Default Port 20050 or 20051 Is Occupied

Symptom

DBService restart fails, and information indicating that port 20050 or 20051 is occupied is displayed in the printed fault log.

Cause Analysis

  1. The default port 20050 or 20051 used by DBService is occupied by another process.
  2. The DBService process is not stopped, and the port used by DBService is not released.

Solution

This solution uses port 20051 as an example. The solution to the problem that port 20050 is occupied is similar.

  1. Log in to the node where the error is reported as user root, and run the netstat -nap | grep 20051 command to check the process that occupies port 20051.
  2. Run the kill command to forcibly stop the process that uses port 20051.
  3. About 2 minutes later, run the netstat -nap | grep 20051 command again to check whether any process uses the port.
  4. Check the service to which the process belongs and change the port for the service.
  5. Run the find . -name "*20051*" command in the /tmp and /var/run/MRS-DBService/ directories, and delete all files found.
  6. Log in to Manager and restart DBService.