Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

author
message
[Level:0]jake

Post subject: First db does not open

registered: 05/23/2013

IP: *.217.108.57

views: 1

I have installed Cubrid in a VM on CentOS 6.4 and created a database:
cubrid createdb German

Tried to start the db:
csql German -u dba

This results in:
ERROR: Failed to connect to database server, 'German', on the following host(s): localhost

And the csql.err file reads:
Time: 05/23/13 16:37:24.227 - ERROR *** file ../src/communication/network_cl.c, line 4224 ERROR CODE = -191 Tran = -1, EID = 1
Cannot connect to server "German" on "localhost".

Time: 05/23/13 16:37:24.227 - ERROR *** file ../src/transaction/boot_cl.c, line 1561 ERROR CODE = -677 Tran = -1, EID = 2
Failed to connect to database server, 'German', on the following host(s): localhost

*** The previous error message is the last one. ***

What am I doing wrong?

Quote
[Level:3]Esen Sagynov

# Post subject:Re: First db does not open

profile

registered: 05/31/2011

IP: *.91.139.64

Hi jake,

You have forgotten to start your database. In CUBRID in order to connect and start working with a database, you need to start it.

The following is an exerpt from Important Facts to know about CUBRID. Please refer to it to learn more about other facts.

Database in CUBRID

 

  1. Every database in CUBRID must be explicitly started before working with them. By default they are stopped. See Start or Autostart CUBRID Database for more info.
  2. As of version 8.4.3, database names in CUBRID should not exceed 17 characters.
  3. CUBRID does not allow to create or drop a database from within the SQL query. Command line cubrid createdb,cubrid deletedb utilities or CUBRID GUI Tools should be used to accomplish this task.

I have also updated the How to Create a CUBRID Database tutorial to mention about starting the database.

Thank you for asking this question. If you have other issues, feel free to ask. I will be glad to answer you.

Quote
[Level:0]jake

# Post subject:Re: First db does not open

profile

registered: 05/23/2013

IP: *.217.108.57

Hello Esen Saygnov,

Thank you for your prompt reply.

I tried making a new database and starting it. The server failed.

Attached is a screenshot.

What should I try next?

Quote

Attachment:

[Level:3]Esen Sagynov

# Post subject:Re: First db does not open

profile

registered: 05/31/2011

IP: *.91.139.66

Ok, I see. I suppose you have installed CUBRID via YUM. Am I correct? I will now install CentOS 6.4 and try it with CUBRID 9.1 as in your case. Then I will write you back.

Quote
[Level:3]Esen Sagynov

# Post subject:Re: First db does not open

profile

registered: 05/31/2011

IP: *.91.139.66

jake,

I've successfully installed and used CUBRID 9.1 on a fresh CentOS 6.4 x64. One possible reason of your database failing to start is that your VM doesn't have enough memory to start the database. By default, a database needs 512M memory to cache the data (see data_buffer_size server parameter). If this is the case, you need to increase your VM's memory or decrease the value of data_buffer_size in cubrid.conf configuration file.

If memory is not your problem, then you can definitely find the reason if you check the logs at /var/cubrid/log/server directory. There will be a file which starts with the name of your database and end with .err extension like Italian_20130524_1712.err. Please let me know the contents of this file and I will help you to find the cause of the failure.

Here is how I proceeded with CUBRID installation and creation of a database.

First, add CUBRID YUM repository:

$ sudo su
[root@localhost vagrant]# rpm -ivh http://yumrepository.cubrid.org/cubrid_repo_settings/9.1.0/cubridrepo-9.1.0-1.el6.noarch.rpm
Retrieving http://yumrepository.cubrid.org/cubrid_repo_settings/9.1.0/cubridrepo-9.1.0-1.el6.noarch.rpm
Preparing...                ########################################### [100%]
   1:cubridrepo             ########################################### [100%]

Then install CUBRID.

[root@localhost vagrant]# yum install cubrid
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.neowiz.com
 * extras: ftp.neowiz.com
 * updates: ftp.neowiz.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package cubrid.x86_64 0:9.1.0.0212-1.el6 will be installed
--> Processing Dependency: /usr/bin/expect for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Processing Dependency: gc for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Processing Dependency: csh for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Processing Dependency: lzo for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Processing Dependency: expect for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Processing Dependency: liblzo2.so.2()(64bit) for package: cubrid-9.1.0.0212-1.el6.x86_64
--> Running transaction check
---> Package expect.x86_64 0:5.44.1.15-4.el6 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: expect-5.44.1.15-4.el6.x86_64
---> Package gc.x86_64 0:7.1-10.el6 will be installed
---> Package lzo.x86_64 0:2.03-3.1.el6 will be installed
---> Package tcsh.x86_64 0:6.17-24.el6 will be installed
--> Running transaction check
---> Package tcl.x86_64 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================
 Package                                    Arch                                       Version                                               Repository                                      Size
==================================================================================================================================================================================================
Installing:
 cubrid                                     x86_64                                     9.1.0.0212-1.el6                                      cubridrepo                                      26 M
Installing for dependencies:
 expect                                     x86_64                                     5.44.1.15-4.el6                                       base                                           256 k
 gc                                         x86_64                                     7.1-10.el6                                            base                                           146 k
 lzo                                        x86_64                                     2.03-3.1.el6                                          base                                            55 k
 tcl                                        x86_64                                     1:8.5.7-6.el6                                         base                                           1.9 M
 tcsh                                       x86_64                                     6.17-24.el6                                           base                                           414 k

Transaction Summary
==================================================================================================================================================================================================
Install       6 Package(s)

Total download size: 29 M
Installed size: 82 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): cubrid-9.1.0.0212-1.el6.x86_64.rpm                                                                                                                                  |  26 MB     01:42     
(2/6): expect-5.44.1.15-4.el6.x86_64.rpm                                                                                                                                   | 256 kB     00:00     
(3/6): gc-7.1-10.el6.x86_64.rpm                                                                                                                                            | 146 kB     00:00     
(4/6): lzo-2.03-3.1.el6.x86_64.rpm                                                                                                                                         |  55 kB     00:00     
(5/6): tcl-8.5.7-6.el6.x86_64.rpm                                                                                                                                          | 1.9 MB     00:00     
(6/6): tcsh-6.17-24.el6.x86_64.rpm                                                                                                                                         | 414 kB     00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                             255 kB/s |  29 MB     01:55     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : gc-7.1-10.el6.x86_64                                                                                                                                                           1/6 
  Installing : lzo-2.03-3.1.el6.x86_64                                                                                                                                                        2/6 
  Installing : 1:tcl-8.5.7-6.el6.x86_64                                                                                                                                                       3/6 
  Installing : expect-5.44.1.15-4.el6.x86_64                                                                                                                                                  4/6 
  Installing : tcsh-6.17-24.el6.x86_64                                                                                                                                                        5/6 
  Installing : cubrid-9.1.0.0212-1.el6.x86_64                                                                                                                                                 6/6 
  Verifying  : tcsh-6.17-24.el6.x86_64                                                                                                                                                        1/6 
  Verifying  : expect-5.44.1.15-4.el6.x86_64                                                                                                                                                  2/6 
  Verifying  : 1:tcl-8.5.7-6.el6.x86_64                                                                                                                                                       3/6 
  Verifying  : lzo-2.03-3.1.el6.x86_64                                                                                                                                                        4/6 
  Verifying  : cubrid-9.1.0.0212-1.el6.x86_64                                                                                                                                                 5/6 
  Verifying  : gc-7.1-10.el6.x86_64                                                                                                                                                           6/6 

Installed:
  cubrid.x86_64 0:9.1.0.0212-1.el6                                                                                                                                                                

Dependency Installed:
  expect.x86_64 0:5.44.1.15-4.el6             gc.x86_64 0:7.1-10.el6             lzo.x86_64 0:2.03-3.1.el6             tcl.x86_64 1:8.5.7-6.el6             tcsh.x86_64 0:6.17-24.el6            

Complete!

Once CUBRID is installed we need to logout then login again in order for PATH to be set.

[root@localhost vagrant]# exit
exit
[vagrant@localhost ~]$ exit
logout
Connection to 127.0.0.1 closed.
Esens-Air:VMs nbp$ vagrant ssh
Last login: Fri May 24 17:03:53 2013 from 10.0.2.2
Welcome to your Vagrant-built virtual machine.

In order to run CUBRID commands, we need to login as a passwordless "cubrid" user.

[vagrant@localhost ~]$ sudo su -s $SHELL cubrid
bash-4.1$

Let's check CUBRID Service status.

bash-4.1$ cubrid service status
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
@ 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 
=================================================================================================================================================================================================
* query_editor          1473 30000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0 
* broker1               1483 33000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0 
@ cubrid manager server status
++ cubrid manager server is running.

We can see above that CUBRID Service is running. Now, let's see where we are now.

bash-4.1$ pwd
/home/vagrant

Let's create a database called "Italian" as in your example.

bash-4.1$ cubrid createdb Italian
Creating database with 512.0M size. The total amount of disk space needed is 1.5G.

CUBRID 9.1

In order to be able to connect to it and use it, we need to start it.

bash-4.1$ cubrid server start Italian
@ cubrid server start: Italian

This may take a long time depending on the amount of recovery works to do.

CUBRID 9.1

++ cubrid server start: success

Let's check the CUBRID Service status again. You can notice "Server Italian (rel 9.1, pid 2211)" which means the database called "Italian" has successfully been started.

bash-4.1$ cubrid service status
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
 Server Italian (rel 9.1, pid 2211)
@ 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 
=================================================================================================================================================================================================
* query_editor          1473 30000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0 
* broker1               1483 33000     5    0                    0                    0        0        0        0        0        0     0/60.0     0/60.0             0             0         0 
@ cubrid manager server status
++ cubrid manager server is running.
bash-4.1$

Finally, let's see the CUBRID version.

bash-4.1$ cubrid --version
cubrid_app (CUBRID utilities)
CUBRID 9.1 (9.1.0.0212) (64bit release build for linux_gnu) (Apr  8 2013 14:47:13)
Copyright (C) 2008 Search Solution Corporation. All rights reserved by Search Solution.

Quote
[Level:0]jake

# Post subject:Re: First db does not open

profile

registered: 05/23/2013

IP: *.217.108.57

Hello Esen Sagynov,

Thank you so much for your in depth help.

I built a new machine and installed Cubrid, then created a new db. When I tried to start the database it hung.

Looked at the error log and Cubrid wasn't able to find the host. So I added the network name of my machine to my /etc/hosts file.

Success!

jake

Quote
[Level:3]Esen Sagynov

# Post subject:Re: First db does not open

profile

registered: 05/31/2011

IP: *.195.231.183

Great! I'm very glad it did work out successfully!

Let me know if you have other questions. I will be glad to help you!

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: