Shanghai Tengke Education Dream Database Training Dry Goods Sharing Troubleshooting Method for Network Communication Abnormalities in DM7

When everyone first came into contact with Dameng Database, one of the problems they often encountered was abnormal network communication. Different from the connection tool used, the problem may be manifested as abnormal network communication or socket connection failure.

 

Error report under Mana ger

 

Error reporting under Disql

 

When encountering such errors, how do we troubleshoot the problem? This article will introduce you to several possible causes and troubleshooting methods.

 

1. The service of Dameng database is not started

 

1) Execute ps -ef|grep dmserver on the Linux server to check whether the process exists;

 

2) For windows server, use the Dameng service viewer (dmdbms\tool\dmservice.exe to view the Dameng database instance service) to check whether the service is started, or use the service viewer that comes with windows (cmd to run services.msc) to check Dream database instance service status;

 

2. Remote access is blocked by firewall

 

If the service is connected normally locally, but the network is abnormal when using the remote connection, it is generally a problem caused by the firewall. At this time, you need to check the firewall related settings. Generally, the production system does not allow you to directly turn off the firewall, so you need to open the corresponding port remote access permission on the database server (the default is 5236).

 

Here is an example under Linux:

Edit the /etc/sysconfig/iptables file directly

1. Edit the /etc/sysconfig/iptables file: vi /etc/sysconfig/iptables

Add content and save: -A RH-Firewall-1-INPUT -m state--state NEW -m tcp -p tcp --dport 5236 -j ACCEPT

2. Restart the service: /etc/init.d/iptablesrestart

3. Check whether the port is open: /sbin/iptables-L -n

 

Three, the port number is wrong

 

The default port number of Dameng database is 5236. Use Dameng management tools or other interfaces such as jdbc to access the database. If the port number is not specified separately, port 5236 will be used by default;

 

The port number related settings are searched for PORT_NUM in the dm.ini file in the dmdbms/data/DAMENG directory by default. After confirming the port number, use the correct port number to access

 

Parameter Description:

PORT_NUM server communication port number, valid value range (1024~65534), default value 5236

 

Fourth, the maximum number of sessions is reached, and a new connection cannot be established

 

Solution:

1) First determine whether the maximum number of sessions limit is reached

In the dmdbms/log directory, check the log of the current month. For example, the log name of this month (August) is: dm_DMSERVER_201808.log. If there is a prompt of reach the maxsession limit in the log, it means that the maximum session limit has been reached.

 

2) If it is confirmed that the database cannot be accessed due to this reason, the following two aspects need to be checked

a. Application connection pool configuration, the maximum number of sessions in the connection pool should be set reasonably

b. In the dm.ini file, the MAX_SESSIONS parameter, the default is 100, can be adjusted according to actual needs

Parameter Description:

MAX_SESSIONS The maximum number of simultaneous connections allowed by the system, which is also restricted by LICENSE, whichever is smaller, the effective value range (1~65000)

 

3) If the maximum number of connections set by the application connection pool is set to 500, and the license is the official enterprise version or the test enterprise version, you need to modify the MAX_SESSION parameter in dm.ini>500

Execute SP_SET_PARA_VALUE(2,'MAX_SESSIONS',600) in the database;

 

4) After the parameter modification is completed, the database service needs to be restarted to take effect;

Guess you like

Origin blog.csdn.net/qq_42726883/article/details/108399248