Please rate how useful you found this document: 
Average: 2.6 (5 votes)

Discovering Ports and Debugging

To find the port number being used by a database, use the nmap command. This program is installed by default in most Linux/UNIX distributions, but it needs to be installed in Windows.

If the database is located on the same machine as the ProcessMaker server, issue the command:

nmap localhost

If the database is on another server, enter the domain name or IP address where it is located. For example:

nmap 192.168.1.229

nmap will list the ports that are currently being used by the server. If the database service is activated and it's port isn't blocked by a firewall, then a port number should be listed for the database:

Starting Nmap 6.00 ( http://nmap.org ) at 2015-02-05 12:03 BOT Nmap scan report for no-name-229.colosa.net (192.168.1.229) Host is up (0.0094s latency). Not shown: 990 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 111/tcp open rpcbind 389/tcp open ldap 631/tcp open ipp 1521/tcp open oracle 3306/tcp open mysql

If a port number isn't listed for the database, then go to the server where the database is installed and make sure that it is being run as a service:

MySQL:

Red Hat/Cent OS/Fedora:

Login as root (or use sudo) and issue the command:

# service mysqld status mysqld (pid 1703) is running...

To see a list of all services:

service --status-all

Debian/Ubuntu:

Login as root (or use sudo) and issue the command:

# service mysql status Server version 5.5.41-0+wheezy1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 3 days 1 hour 59 min 33 sec Threads: 1 Questions: 19041 Slow queries: 0 Opens: 716 Flush tables: 1 Open tables: 205 Queries per second avg: 0.071.

To see a list of all services:

service --status-all

Windows:

Open the command prompt (go to Start > Run and enter: cmd) and enter the following command to see a list of all running services:

net start

To see the status of MySQL:

sc query mysql-service-name

For example, to see the status of MySQL installed by the automatic ProcessMaker Installer:

C:\> sc query ProcessMakerMysql SERVICE_NAME: ProcessMakerMysql TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0

PostgreSQL:

Red Hat/Cent OS/Fedora:

Login as root (or use sudo) and issue the command:

# service postgresql status postmaster (pid 3498) is running...

For recent versions, it may be necessary to specify the version number:

# service postgresql-9.4 status postmaster (pid 3498) is running...

To see a list of all services:

service --status-all

Debian/Ubuntu:

Login as root (or use sudo) and issue the command:

# service postgresql status Running clusters: 9.1/main

To see a list of all services:

service --status-all

Windows:

Open the command prompt (go to Start > Run and enter: cmd) and enter the following command to see a list of all running services:

net start

To see the status of PostgreSQL:

sc query postgresql-service-name

Oracle:

Linux/UNIX:

Oracle uses the dbstart and dbstop commands (which are located in the $ORACLE_HOME/bin directory) to start and stop the database, although a service script can be added in the /etc/init.d/ directory. Likewise, it uses the lsnrctl start and lsnrctl stop commands to start and stop the listener and isqlplusctl start and isqlplusctl stop to start and stop SQL*Plus.

To see the status of the Oracle database, use the following command (located in the $ORACLE_HOME/bin directory):

chkdb_status

Windows:

Open the command prompt (go to Start > Run and enter: cmd) and enter the following command to see a list of all running services:

net start

Oracle creates a service for its listener and for its database:

sc query OracleOraDB12Home1TNSListener sc query OracleDatabaseX

For example, to see the status of an Oracle database named "ORCL" and its listener:

C:\> sc query OracleServiceORCL SERVICE_NAME: OracleServiceORCL TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 C:\> sc query OracleOraDB12Home1TNSListener SERVICE_NAME: OracleOraDB12Home1TNSListener TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0

MS SQLServer:

Windows:

Open the command prompt (go to Start > Run and enter: cmd) and enter the following command to see a list of all running services:

net start

Oracle creates a service for its listener and for its database:

sc query MSSQLSERVER

For example:

C:\> sc query MSSQLSERVER SERVICE_NAME: MSSQLSERVER TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0