[Solved] Oned[]: Could not create the database


(Arash) #1

Hello

I have an error in my new opennebula 5.2 installation :

Jul 06 18:20:10 srv1 systemd[1]: Starting OpenNebula Cloud Controller Daemon...
Jul 06 18:20:10 srv1 systemd[1]: Started OpenNebula Cloud Controller Daemon.
Jul 06 18:20:10 srv1 oned[21780]: Could not create the database.
Jul 06 18:20:10 srv1 systemd[1]: Stopped OpenNebula Cloud Controller Daemon.

OS :

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial
Linux 4.4.0-62-generic #83-Ubuntu

/etc/one/oned.conf :

#DB = [ BACKEND = "sqlite" ]

# Sample configuration for MySQL
DB = [ BACKEND = "mysql",
       SERVER  = "localhost",
       PORT    = 0,
       USER    = "oneadmin",
       PASSWD  = "password",
       DB_NAME = "opennebule" ]

First i was using percona-server-server-5.7 but i also tried with mariadb 10.2 problem exists .

credentials works :

mysql -u oneadmin --password=password 

oned -i also returns :

Could not create the database

any suggestion ?

thank you


(Arash) #2

Update 1 :
Mysql shows error about communication packets :

Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624500487936 [Warning] Aborted connection 10 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624498669312 [Warning] Aborted connection 16 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624498366208 [Warning] Aborted connection 17 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624499881728 [Warning] Aborted connection 12 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624500791040 [Warning] Aborted connection 9 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication 
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624499578624 [Warning] Aborted connection 13 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624498063104 [Warning] Aborted connection 18 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624499275520 [Warning] Aborted connection 14 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624500184832 [Warning] Aborted connection 11 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication
Jul 07 02:58:29 srv1 mysqld[24744]: 2017-07-07  2:58:29 139624497760000 [Warning] Aborted connection 19 to db: 'unconnected' user: 'oneadmin' host: 'localhost' (Got an error reading communication

I changed max_allowed_packed and innodb_buffer_pool_size and problem still exists.


(Ciro Iriarte) #3

did you actually create the database?. You should create user and database, giving full control of the created database to the new user (all this with root).

Opennebula will create and populate the tables.


(Arash) #4

I changed

DB = [ BACKEND = "mysql",
       SERVER  = "localhost",
       PORT    = 0,
       USER    = "oneadmin",
       PASSWD  = "password",
       DB_NAME = "opennebule" ]

to

 DB = [ backend = "mysql",
        server  = "localhost",
        port    = 0,
        user    = "oneadmin",
        passwd  = "password",
        db_name = "opennebula" ]

I think its about capital letters.


(Anton Todorov) #5

I would bet on the db_name change: “opennebule” -> “opennebula:slight_smile:


(@LINFORGE @LINBIT) #6

these are the errors that keep you debugging for days, or at least until the next morning, when you look at it with fresh eyes, and have that kind of “really? that’s it?” moment… hahaha :slight_smile:


(Arash) #7

Ohh … i never seen that because I only comment out this part of oned.conf so never check for anything except password :smile: