Reply
Explorer
Posts: 28
Registered: ‎04-15-2018

Problem in database set up in cloudera manager

  • I was installing Cloudera manager in my ubuntu 16.04 LTS machine. I have configured some databases in MySQL to run hive, oozie, activity monitor, resource manager services on top of them. When I gave credentials in Cloudera manager page the databases are not connected.

 

Screenshot from 2018-08-23 00-04-40.png

 

  • Then I checked the log files using 
  • sudo vim /var/log/mysql/error.log.3.gz
  • I found the following

 

2018-08-19T19:08:49.957537Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-08-19T19:08:49.957619Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-08-19T19:08:50.124457Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-08-19T19:08:50.124616Z 0 [Warning] Can't create test file /var/lib/mysql2/chinni.lower-test
2018-08-19T19:08:50.124677Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23-0ubuntu0.16.04.1) starting as process 5761 ...
2018-08-19T19:08:50.129298Z 0 [Warning] Can't create test file /var/lib/mysql2/chinni.lower-test
2018-08-19T19:08:50.129354Z 0 [Warning] Can't create test file /var/lib/mysql2/chinni.lower-test
2018-08-19T19:08:50.133288Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-08-19T19:08:50.133324Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-08-19T19:08:50.133336Z 0 [Note] InnoDB: Uses event mutexes
2018-08-19T19:08:50.133347Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-08-19T19:08:50.133358Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-08-19T19:08:50.133368Z 0 [Note] InnoDB: Using Linux native AIO
2018-08-19T19:08:50.133764Z 0 [Note] InnoDB: Number of pools: 1
2018-08-19T19:08:50.133908Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-08-19T19:08:50.136290Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-08-19T19:08:50.148675Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-08-19T19:08:50.151422Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-08-19T19:08:50.161514Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2018-08-19T19:08:50.161592Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2018-08-19T19:08:50.161663Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-08-19T19:08:50.762753Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-19T19:08:50.762901Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-19T19:08:50.762942Z 0 [ERROR] Failed to initialize builtin plugins.
2018-08-19T19:08:50.762960Z 0 [ERROR] Aborting

2018-08-19T19:08:50.763035Z 0 [Note] Binlog end
2018-08-19T19:08:50.763275Z 0 [Note] Shutting down plugin 'MyISAM'
2018-08-19T19:08:50.763361Z 0 [Note] Shutting down plugin 'CSV'
2018-08-19T19:08:50.764633Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

 

 

Please give any fix

Thanks and Regards

solomonchinni 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Posts: 957
Topics: 1
Kudos: 228
Solutions: 121
Registered: ‎04-22-2014

Re: Problem in database set up in cloudera manager

@solomonchinni,

 

Are you saying that the Database connections never return?  That Cluster Setup screen stays that way forever?

 

I recommend going through this checklist first and make sure the databases are created as required and that the drivers are located where they need to be:

 

https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_mysql.html#cmig_topic_5_5

 

I don't know that the mysql logs are applicable to the issue you are seeing.

 

I recommend checking the Cloudera Manager logs for clues:

/var/log/cloudera-scm-server/cloudera-scm-server.log

 

 

Posts: 519
Topics: 14
Kudos: 90
Solutions: 45
Registered: ‎09-02-2016

Re: Problem in database set up in cloudera manager

@solomonchinni

 

Login to your mysql as root and create the required databases and grant the priviledge 

 

Ex: 
create database hive;create user 'hive' identified by 'password'; grant all on hive.* to hive; flush privileges;

create database rman;create user 'rman' identified by 'password'; grant all on rman.* to rman; flush privileges;

 

 

Highlighted
Expert Contributor
Posts: 133
Registered: ‎01-08-2018

Re: Problem in database set up in cloudera manager

This does not seem to be an issue with Cloudera platform, but with your DB.

According to your logs, mysql is down.

First notice, is that you are not using the default "/var/lib/mysql" datadir but "/var/lib/mysql2", if that is true then this directory should be owned by user:group "mysql:mysql". If not, then probably when you modified your /etc/my.cnf file, you made a typo error in datadir.

 

If still this is not the case, then you might find interesting this post https://dba.stackexchange.com/questions/106085/cant-create-file-var-lib-mysql-user-lower-test regarding AppArmor.

Explorer
Posts: 28
Registered: ‎04-15-2018

Re: Problem in database set up in cloudera manager

Created like above, but no use
Posts: 957
Topics: 1
Kudos: 228
Solutions: 121
Registered: ‎04-22-2014

Re: Problem in database set up in cloudera manager

@solomonchinni,

 

Don't forget to check the CM log as I mentioned.  I believe you should see some information there regarding what CM is doing to check the Databases.

Explorer
Posts: 28
Registered: ‎04-15-2018

Re: Problem in database set up in cloudera manager

@bgooley and @GeKas

 Your responses helped me

 

According to @bgooley

 

I have checked /var/log/cloudera-scm-server/cloudera-scm-server.log

 

I found following

 

can't connect to mysql server on 'localhost' (10061)

 

Then I checked https://www.tecmint.com/fix-error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111/ link to knowmon which IP address mysql-server is running

by typing mysql -u root -p -h <hostname -I> That didn't work

I tried with

mysql -u root -p -h 127.0.0.1

now I got mysql promt on my terminal

Then I have edited some config files where we define IP address

1) sudo vim /etc/cloudera-scm-agent/config.ini

 


server_host=127.0.0.1

 

2) sudo vim /etc/hosts

 

127.0.0.1 Fully Qualified Domain Name

 

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

 

bind-address = 127.0.0.1

 

Now I have restarted the following processes

 

sudo service ssh restart

sudo service mysql restart

sudo service cloudera-scm-server restart

sudo service cloudera-scm-agent restart

 

According to @GeKas link

 

I have changed the permissions on /var/lib/mysql folder to 755

 

Then I tried to do database set up by giving credentials for hue, hive, activity monitor, reports manager, oozie. Then the database setup was completed successfully.

Screenshot from 2018-08-24 16-54-56.png

 

 

Thank you !

Announcements