Controlling CoraDB processes: coradb service, server, broker
CoraDB runs as several processes — the master, database servers, brokers with their CAS processes, the CoraDB Manager Server (CMS) and the Java SP server — all controlled with the coradb utility. This page gives the commands for each and describes the CoraDB service; the processes are described in detail on their own pages: Database server, Broker, CMS and Java SP server.
Controlling CoraDB service
Section titled “Controlling CoraDB service”The following coradb utility syntax shows how to control services registered in the configuration file. One of the following can be specified in <command>.
coradb service <command><command>: {start|stop|restart|status}- start: start services.
- stop: stop services.
- restart: restart services.
- status: check status.
No additional options or arguments are required.
Controlling database server
Section titled “Controlling database server”The following coradb utility syntax shows how to control database server process.
coradb server <command> [database_name]<command>: {start|stop|restart|status}One of the following can be specified in <command>:
- start: start a database server process.
- stop: stop a database server process.
- restart: restart a database server process.
- status: check status of a database server process.
Every command can specify a database name ([database_name]) as an argument.
If the database name is not specified, the status command displays the currently running database servers' information, and the commands except status refer to the database names in the server property of the [service] section of coradb.conf.
[service]
...
server=e-commerce,testdb
...% coradb server start
@ coradb server start: e-commerce
This may take a long time depending on the amount of recovery works to do.
CoraDB 1.0
++ coradb server start: success
@ coradb server start: testdb
This may take a long time depending on the amount of recovery works to do.
CoraDB 1.0
++ coradb server start: successControlling broker
Section titled “Controlling broker”The following coradb utility syntax shows how to control CoraDB broker process.
coradb broker <command><command>: start |stop |restart |status [options] [broker_name_expr] |acl {status|reload} broker_name |on <broker_name> |off <broker_name> |reset broker_name |info- start: start broker processes.
- stop: stop broker processes.
- restart: restart broker processes.
- status: check status of broker processes.
- acl: limit broker access.
- on/off: enable/disable the specified broker.
- reset: reset the connection to broker.
- info: display the broker configuration information.
Controlling CMS
Section titled “Controlling CMS”CMS runs on the database host and lets administration clients manage databases and brokers remotely. The following coradb utility syntax controls the CMS processes.
coradb manager <command><command>: {start|stop|status}- start: start CMS processes.
- stop: stop CMS processes.
- status: check the status of manager processes.
Controlling CoraDB Java stored procedure server
Section titled “Controlling CoraDB Java stored procedure server”The following coradb utility syntax shows how to control CoraDB Java Stored Procedure server process.
coradb javasp <command> [database_name]<command>: {start|stop|restart|status}One of the following can be specified in <command>:
- start: start a Java Stored Procedure server process.
- stop: stop a Java Stored Procedure server process.
- restart: restart a Java Stored Procedure server process.
- status: check status of a Java Stored Procedure server process.
Every command can specify a database name ([database_name]) as an argument. If the database name is not specified, the command is executed by referring to the database names in the server property of the [service] section of coradb.conf.
[service]
...
server=e-commerce,testdb
...% coradb javasp start
@ coradb javasp start: e-commerce++ coradb javasp start: success
@ coradb javasp start: testdb++ coradb javasp start: successRegistering services
Section titled “Registering services”If you do not register any service, only master process is registered by default. It is convenient for you to view status of all related processes at a glance or start and stop the processes at once with the coradb service utility once it is registered as CoraDB service.
- For details on CoraDB Java Stored Procedure server configuration, see Configuring for CoraDB Java SP server.
The following example shows how to register database server and broker as service in the coradb.conf file and enable databases ( e-commerce and testdb ) to start automatically at once when CoraDB server starts running.
...
[service]
# The list of processes to be started automatically by 'coradb service start' commandservice=server,broker
# The list of database servers in all by 'coradb service start' command.# This property is effective only when the above 'service' property contains 'server' or 'javasp' keyword.server=e-commerce,testdbStarting services
Section titled “Starting services”In Linux environment, you can enter the code below to start CoraDB after installation. If no server is registered in the configuration file, only master process (cora_master) runs by default.
In the Windows environment, the code below is normally executed only if a user with system permission has logged in. An administrator or general user can start or stop the CoraDB server by clicking its icon on the taskbar tray.
% coradb service start
@ coradb master start++ coradb master start: successThe following message is returned if master process is already running.
% coradb service start
@ coradb master start++ coradb master is running.The following message is returned if master process fails to run. The example shows that service fails to start due to conflicts of the coradb_port_id parameter value specified in the coradb.conf file. In such a case, you can resolve the problem by changing the port. If it fails to start even though no port is occupied by process, delete /tmp/CoraDB1523 file and then restart the process.
% coradb service start
@ coradb master startcora_master: '/tmp/CoraDB1523' file for UNIX domain socket exist.... Operation not permitted++ coradb master start: failAfter registering service as explained in CoraDB services, enter the code below to start the service. You can verify that database server process and broker as well as registered e-commerce and testdb are starting at once.
% coradb service start
@ coradb master start++ coradb master start: success@ coradb server start: e-commerce
This may take a long time depending on the amount of restore works to do.CoraDB 1.0
++ coradb server start: success@ coradb server start: testdb
This may take a long time depending on the amount of recovery works to do.CoraDB 1.0
++ coradb server start: success@ coradb broker start++ coradb broker start: successStopping services
Section titled “Stopping services”Enter code below to stop CoraDB service. If no services are registered by a user, only master process stops and then restarts.
% coradb service stop@ coradb master stop++ coradb master stop: successEnter code below to stop registered CoraDB service. You can verify that server process, broker process, and master process as well as e-commerce and testdb stop at once.
% coradb service stop@ coradb server stop: e-commerce
Server e-commerce notified of shutdown.This may take several minutes. Please wait.++ coradb server stop: success@ coradb server stop: testdbServer testdb notified of shutdown.This may take several minutes. Please wait.++ coradb server stop: success@ coradb broker stop++ coradb broker stop: success@ coradb master stop++ coradb master stop: successRestarting services
Section titled “Restarting services”Enter code below to restart CoraDB service. If no services are registered by a user, only master process stops and then restarts.
% coradb service restart
@ coradb master stop++ coradb master stop: success@ coradb master start++ coradb master start: successEnter code below to restart registered CoraDB service. You can verify that server process, broker process, and master process as well as e-commerce and testdb stop and then restart at once.
% coradb service restart
@ coradb server stop: e-commerceServer e-commerce notified of shutdown.This may take several minutes. Please wait.++ coradb server stop: success@ coradb server stop: testdbServer testdb notified of shutdown.This may take several minutes. Please wait.++ coradb server stop: success@ coradb broker stop++ coradb broker stop: success@ coradb master stop++ coradb master stop: success@ coradb master start++ coradb master start: success@ coradb server start: e-commerce
This may take a long time depending on the amount of recovery works to do.
CoraDB 1.0
++ coradb server start: success@ coradb server start: testdb
This may take a long time depending on the amount of recovery works to do.
CoraDB 1.0
++ coradb server start: success@ coradb broker start++ coradb broker start: successManaging service status
Section titled “Managing service status”The following example shows how to check the status of master process and database server registered.
% coradb service status
@ coradb master status++ coradb master is running.@ coradb server status
Server testdb (rel 1.0, pid 31059)Server e-commerce (rel 1.0, pid 30950)
@ coradb broker status% query_editor----------------------------------------ID PID QPS LQS PSIZE STATUS---------------------------------------- 1 15465 0 0 48032 IDLE 2 15466 0 0 48036 IDLE 3 15467 0 0 48036 IDLE 4 15468 0 0 48036 IDLE 5 15469 0 0 48032 IDLE
% broker1 OFF
@ coradb manager server status++ coradb manager server is not running.The following message is returned if master process has stopped.
% coradb service status@ coradb master status++ coradb master is not running.coradb utility logging
Section titled “coradb utility logging”CoraDB supports a logging feature about coradb utility's running result.
Logging contents
The following contents are written to the $CORADB/log/coradb_utility.log file.
- All commands through coradb utilities: only usage, version and parsing errors are not logged.
- Execution results by coradb utilities: success/failure.
- An error message when failure.
Log file size
A size of coradb_utility.log file is expanded by the size specified by error_log_size parameter in coradb.conf; if this size is enlarged as the specified size, it is backed up as the coradb_utility.log.bak file.
Log format
<time> (coradb PID) <contents>The following is an example of printing the log file.
13-11-19 15:27:19.426 (17724) coradb manager stop13-11-19 15:27:19.430 (17724) FAILURE: ++ coradb manager server is not running.13-11-19 15:27:19.434 (17726) coradb service start13-11-19 15:27:19.439 (17726) FAILURE: ++ coradb master is running.13-11-19 15:27:22.931 (17726) SUCCESS13-11-19 15:27:22.936 (17756) coradb service restart13-11-19 15:27:31.667 (17756) SUCCESS13-11-19 15:27:31.671 (17868) coradb service stop13-11-19 15:27:34.909 (17868) SUCCESSHowever, in Windows, some coradb commands are executed through a service process; therefore, a duplicated information can be displayed again.
13-11-13 17:17:47.638 ( 3820) coradb service stop13-11-13 17:17:47.704 ( 7848) d:\CoraDB\bin\coradb.exe service stop --for-windows-service13-11-13 17:17:56.027 ( 7848) SUCCESS13-11-13 17:17:57.136 ( 3820) SUCCESSAnd, in Windows, a process run through the service process cannot print out an error message; therefore, for error messages related to the service start, you should definitely check them in the coradb_utility.log file.