Background Image

DOCUMENTATION

?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

Author: Manyoung Joung 

 

here are more Q&A inquiries than expected about 

1. users are not able to connect to the CUBRID DB server due to the ‘firewall problems’; 

2. which port should use to connect the application to the CUBRID Manager and CUBRID Migration Toolkit (CMT). 
Therefore, in this section, we will introduce the port opening command between the target server (PC) and CUBRID DB server.

 

First of all, if you briefly organize the CUBRID port-related contents, the configuration files are located in the $CUBRID/conf directory and cubrid_port_id=1523 in cubrid.conf, BROKER_PORT=30000,33000 in cubrid_broker.conf, ha_port_id=59901 in cubrid_ha.conf and cm_port=8001 in cm.conf by default.

 

The table below shows the ports used by CUBRID.

  1. CUBRID Port Table:

Division

Target Equipment

Linux Port

Windows Port

Firewall

Single DB

WEB/WAS Server

33000(TCP)

33000~33040(TCP)

Open

CUBRID Manager

30000(TCP)

8001(TCP)

30000~30040(TCP)

8001(TCP)

Open

CUBRID CMT

30000(TCP)

30000~30040(TCP)

Open

CUBRID HA

WEB/WAS Server

33000(TCP)

33000~33040(TCP)

Open

CUBRID Manager

30000(TCP)

8001(TCP)

30000~30040(TCP)

8001(TCP)

Open

CUBRID CMT

30000(TCP)

30000~30040(TCP)

Open

Master/Slave Server Bidirectional

1523(TCP)

7(TCP)

59901(UDP)

HA Features not supported

Linux: Open

window: Necessity

CUBRID Manager

User/manager PC

CUBRID Manager

30000(TCP)

8001(TCP)

30000~30040(TCP)

8001(TCP)

Open

CUBRID Migration Toolkit

User/manager PC

CUBRID CMT

30000(TCP)

30000~30040(TCP)

Open

 

 

2. When running the CUBRID service, you can check the master, DB server, broker, and manager processes.

[cubrid@cub_db01 ~]$ cubrid service start; cubrid server start demodb
@ cubrid master start
++ cubrid master start: success
@ cubrid broker start
++ cubrid broker start: success
@ cubrid manager server start
++ cubrid manager server start: success
@ cubrid server start: demodb
This may take a long time depending on the amount of recovery works to do.
CUBRID 9.3
 ++ cubrid server start: success

[cubrid@cub_db01 ~]$ cubrid service status
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
 Server demodb (rel 9.3, pid 2351)
@ cubrid broker status
  NAME                   PID  PORT    AS   JQ                  TPS                 QPS   SELECT   INSERT   UPDATE   DELETE   OTHERS     LONG-T     LONG-Q         ERR-Q  UNIQUE-ERR-Q  #CONNECT   #REJECT
===========================================================================================================================================================================================================
* query_editor          2295 30000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0         0
* broker1               2306 33000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0         0
@ cubrid manager server status
++ cubrid manager server is running

 

3. In Linux, you can find out which port is currently running for each CUBRID process by searching netstat or lsof command with “grep cub_*” combination.

[cubrid@cub_db01 ~]$ netstat -tnlp | grep cub_*
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8001                0.0.0.0:*                   LISTEN      2320/cub_manager
tcp        0      0 0.0.0.0:33000               0.0.0.0:*                   LISTEN      2306/cub_broker
tcp        0      0 0.0.0.0:30000               0.0.0.0:*                   LISTEN      2295/cub_broker
tcp        0      0 0.0.0.0:1523                0.0.0.0:*                   LISTEN      2292/cub_master

[cubrid@cub_db01 ~]$ lsof -i -nP | grep LISTEN | awk '{print $(NF-1)" "$1}' | sort -u | grep cub_*
*:1523 cub_master
*:30000 cub_broker
*:33000 cub_broker
*:8001 cub_manager

 

4. If the CUBRID server is Windows, you can use the netstat command as in Linux, but there is no way to search for the process name with grep, so search for “LISTENING” with the find command and output 1523, 8001, 30000+5, 33000+ 5 You need to find and confirm the port.

**Note: Unlike Linux, Windows must open all broker ports (30000, 33000) as many as MAX_NUM_APPL_SERVER ports in cubrid_broker.conf (ex: 30000~30040).

C:\Users\myjun>netstat -an | find "LISTENING"
TCP    0.0.0.0:1523           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:8001           0.0.0.0:0              LISTENING
                             :
                             :
TCP    0.0.0.0:30000          0.0.0.0:0              LISTENING
TCP    0.0.0.0:30001          0.0.0.0:0              LISTENING
TCP    0.0.0.0:30002          0.0.0.0:0              LISTENING
TCP    0.0.0.0:30003          0.0.0.0:0              LISTENING
TCP    0.0.0.0:30004          0.0.0.0:0              LISTENING
TCP    0.0.0.0:30005          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33000          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33001          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33002          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33003          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33004          0.0.0.0:0              LISTENING
TCP    0.0.0.0:33005          0.0.0.0:0              LISTENING

 

5. This is how to check if the WEB/WAS server is Linux and the 33000 port is connected to the CUBRID DB server using the nc command. “NC -z IP (CUBRID DB server) PORT (Broker port)” on the WEB/WAS server. After execution, if "Succeeded!" is displayed as in the example, the connection is possible, that is, the connection from the source IP to the destination IP/Port can be considered. (Refer to the second example if you need to repeatedly check with the nc command.)

[Jboos@was_server01 ~]$ nc -z 192.168.56.3 33000
Connection to 192.168.56.3 33000 port [tcp/*] succeeded!

[Jboos@was_server01 ~]$ while true; do date; nc -w1 -z 192.168.56.3 33000; sleep 1; done
2018. 07. 03. (화) 10:59:18 KST
Connection to 192.168.56.3 33000 port [tcp/*] succeeded!
2018. 07. 03. (화) 10:59:19 KST
Connection to 192.168.56.3 33000 port [tcp/*] succeeded!
2018. 07. 03. (화) 10:59:20 KST
Connection to 192.168.56.3 33000 port [tcp/*] succeeded!
                       :
                       :

Stop: Ctrl+C

 

6. If you use the CUBRID Manager or CUBRID Migration Toolkit (CMT) in Windows (PC), you need to check if port 8001, 30000 can be connected to the CUBRID DB server, but the window can be checked if the destination address and port can be connected using the tcping command, but most of the tcping commands are not installed in the window, so the following error is in the CMD window:

*How to install:

STEP1: Access https://www.elifulkerson.com/projects/tcping.php

STEP2: Download tcping.exe file

STEP3: Move/copy the tcping.exe file to the C:\Windows\System32 folder

 

*How to use:

- Start> Window system> Command prompt (CMD window) Run as administrator

-tcping IP (CUBRID DB server) PORT (broker port)

 

C:\>cd C:\Windows\System32

C:\Windows\System32>tcping 192.168.56.3 30000
Probing 192.168.56.3:33000/tcp - Port is open - time=10.781ms
Probing 192.168.56.3:33000/tcp - Port is open - time=1.257ms
Probing 192.168.56.3:33000/tcp - Port is open - time=1.787ms
Probing 192.168.56.3:33000/tcp - Port is open - time=0.615ms
 Ping statistics for 192.168.56.3:33000
     4 probes sent.
     4 successful, 0 failed.  (0.00% fail)
Approximate trip times in milli-seconds:
     Minimum = 0.615ms, Maximum = 10.781ms, Average = 3.610ms

C:\Windows\System32>tcping -t 192.168.56.3 30000
 ** Pinging continuously.  Press control-c to stop **
 Probing 192.168.56.3:33000/tcp - Port is open - time=11.171ms
Probing 192.168.56.3:33000/tcp - Port is open - time=0.869ms
Probing 192.168.56.3:33000/tcp - Port is open - time=0.548ms
Probing 192.168.56.3:33000/tcp - Port is open - time=0.950ms
Probing 192.168.56.3:33000/tcp - Port is open - time=1.783ms
Stop: Control-C
 Ping statistics for 192.168.56.3:33000
     5 probes sent.
     5 successful, 0 failed.  (0.00% fail)
Approximate trip times in milli-seconds:
     Minimum = 0.548ms, Maximum = 11.171ms, Average = 3.064ms

 

***Note:CUBRID Manager is distinguished from the management mode and query mode functions. 8001, 30000 ports are required to be opened in the management mode, and 30000 ports are required to use the CUBRID Manager tool.

 

 


List of Articles
No. Category Subject Date
17 Server Introduction to CUBRID Security – Part I file 2020.06.25
16 Server CUBRID Configuration Guide to Launch Services 2020.06.24
15 Server CUBRID Java Stored Procedures file 2020.06.24
14 Server CUBRID Port and iptables (firewall) Configuration 2020.06.24
13 Server CUBRID Backup & Restore – Part II (Restore) file 2020.06.22
12 Server CUBRID Backup & Restore – Part I (Backup) file 2020.06.22
11 Interfaces Common Uses of CUBRID Node.js API with Examples file 2020.06.10
10 Server CUBRID Triggers file 2020.06.10
9 Server CUBRID Log Files file 2020.06.10
8 Server CUBRID HA (High Availability) Starting Guide 2020.05.22
Board Pagination Prev 1 2 3 4 Next
/ 4

Join the CUBRID Project on