Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ranger services are not starting

ranger services are not starting

I have just installed ranger service in a single node cluster, but ranger services are not getting started .

Please find ambari stack trace for the same :

 File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 262, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/bin/ranger-admin-stop' returned 126. NOTE: This script is provided for backward compatibility only. All scripts calling this should now use '/usr/bin/ranger-admin stop' instead 

/usr/bin/ranger-admin-stop: line 19: /usr/bin/ranger-admin: is a directory

I was facing the issue earlier as well while installing the ranger so I have remove the earlier one and again installed but getting the same problem .

before installation I have done database part for ranger below are steps for the same :

CREATE USER 'rangerdba'@'localhost' IDENTIFIED BY 'rangerdba';

GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost';

CREATE USER 'rangerdba'@'%' IDENTIFIED BY 'rangerdba';

GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'%';

GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;

also i have created ranger database in mysql .
while configuring ranger config , I mentioned database name as ranger , database user as rangerdba and db password as rangerdba .
please help me on this , am  I missing some steps ?
1 REPLY 1

Re: ranger services are not starting

Mentor

@Anurag Mishra

You can create a new database fro ranger follow these steps, log on to MySQL as the root user, below I am assuming:

The root password is guessit

The ranger user and password is ranger

The FQDN of the MySQL server is hdptest.com

# mysql -u root -pguessit 

One you have the prompt

mysql> CREATE USER 'ranger'@'localhost' IDENTIFIED BY 'ranger'; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost'; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'hdptest.com'; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%'; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' WITH GRANT OPTION; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'hdptest.com' IDENTIFIED BY 'ranger' WITH GRANT OPTION; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' IDENTIFIED BY 'ranger' WITH GRANT OPTION; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%' WITH GRANT OPTION; 
mysql> FLUSH PRIVILEGES; quit; 

Switch to user ranger and create the databases rangerdb

$ mysql -u ranger -pranger 
mysql> CREATE DATABASE rangerdb; quit; 

Use the above credentials when setting up ranger in the Ambari UI.

Please revert

Don't have an account?
Coming from Hortonworks? Activate your account here