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.

Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Solved Go to solution

Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Rising Star
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 37, in <module>
    AfterInstallHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 31, in hook
    setup_stack_symlinks()
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py", line 52, in setup_stack_symlinks
    stack_select.select_all(version)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py", line 135, in select_all
    Execute(command, only_if = only_if_command)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/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/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.3.4.0-3485 | tail -1`' returned 1. Traceback (most recent call last):
  File "/usr/bin/hdp-select", line 378, in <module>
    printVersions()
  File "/usr/bin/hdp-select", line 235, in printVersions
    result[tuple(map(int, versionRegex.split(f)))] = f
ValueError: invalid literal for int() with base 10: 'ssl'
ERROR: set command takes 2 parameters, instead of 1


usage: hdp-select [-h] [<command>] [<package>] [<version>]


Set the selected version of HDP.


positional arguments:
  <command>   One of set, status, versions, or packages
  <package>   the package name to set
  <version>   the HDP version to set


optional arguments:
  -h, --help  show this help message and exit
  -r, --rpm-mode  if true checks if there is symlink exists and creates the symlink if it doesn't


Commands:
  set      : set the package to a specified version
  status   : show the version of the package
  versions : show the currently installed versions
  packages : show the individual package names
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Super Mentor

@Prakash Punj

Please have only the following directories inside the "/usr/hdp" and move rest of the files and directories.

2.3.4.0-3485
current

.

I am suspecting that the "ssl" directory there is actually causing the issue.

5 REPLIES 5

Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Super Mentor

@Prakash Punj

We see the error:

resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.3.4.0-3485 | tail -1`' returned 1. 

Traceback (most recent call last):  File "/usr/bin/hdp-select", line 378, in <module>    printVersions()  File "/usr/bin/hdp-select", line 235, in printVersions    result[tuple(map(int, versionRegex.split(f)))] = fValueError: invalid literal for int() with base 10: 'ssl'

.

this usually happens if you have some Manually created / copied directories (or files) inside the "/usr/hdp" directory.

Please remove any unwanted directory from "/usr/hdp" and then try installing Grafana again.

Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Rising Star

Thanks @Jay SenSharma.

Can you please take a look at the following directory structure and advise which ones I need to remove.

[centos@hdp-m:/usr/hdp ] $ ls -l
total 24
drwxr-xr-x. 30 root root 4096 Feb 23  2016 2.3.4.0-3485
drwxr-xr-x.  2 root root 4096 Feb 15  2016 current
-rw-r--r--.  1 root root 4924 Feb 17  2016 samit-ca.crt
-rw-r--r--.  1 root root 1927 Feb 17  2016 samit.crt
-rw-r--r--.  1 root root 1704 Feb 17  2016 samit.key
drwxr-xr-x.  2 root root   88 Feb 17  2016 ssl
[centos@hdp-m:/usr/hdp ] $ cd ssl
[centos@hdp-m:/usr/hdp/ssl ] $ ls
ambari-server-truststore  samit-ca.crt  samit.crt  samit.key
[centos@hdp-m:/usr/hdp/ssl ] $ cd ssl
-bash: cd: ssl: No such file or directory
[centos@hdp-m:/usr/hdp/ssl ] $ pwd
/usr/hdp/ssl
[centos@hdp-m:/usr/hdp/ssl ] $ ls -l
total 20
-rw-r--r--. 1 root root 1451 Feb 17  2016 ambari-server-truststore
-rw-r--r--. 1 root root 4924 Feb 17  2016 samit-ca.crt
-rw-r-----. 1 root root 1927 Feb 17  2016 samit.crt
-rw-r--r--. 1 root root 1704 Feb 17  2016 samit.key



Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Rising Star
Thanks @Jay SenSharma. 

Not sure which file or directory I need to remove. They may be important. Can you take a look at my directory structure and advise.

[centos@hdp-m:/usr/hdp ] $ ls -l
total 24
drwxr-xr-x. 30 root root 4096 Feb 23  2016 2.3.4.0-3485
drwxr-xr-x.  2 root root 4096 Feb 15  2016 current
-rw-r--r--.  1 root root 4924 Feb 17  2016 samit-ca.crt
-rw-r--r--.  1 root root 1927 Feb 17  2016 samit.crt
-rw-r--r--.  1 root root 1704 Feb 17  2016 samit.key
drwxr-xr-x.  2 root root   88 Feb 17  2016 ssl
[centos@hdp-m:/usr/hdp ] $ cd ssl
[centos@hdp-m:/usr/hdp/ssl ] $ ls
ambari-server-truststore  samit-ca.crt  samit.crt  samit.key
[centos@hdp-m:/usr/hdp/ssl ] $ cd ssl
-bash: cd: ssl: No such file or directory
[centos@hdp-m:/usr/hdp/ssl ] $ pwd
/usr/hdp/ssl
[centos@hdp-m:/usr/hdp/ssl ] $ ls -l
total 20
-rw-r--r--. 1 root root 1451 Feb 17  2016 ambari-server-truststore
-rw-r--r--. 1 root root 4924 Feb 17  2016 samit-ca.crt
-rw-r-----. 1 root root 1927 Feb 17  2016 samit.crt
-rw-r--r--. 1 root root 1704 Feb 17  2016 samit.key


Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Super Mentor

@Prakash Punj

Please have only the following directories inside the "/usr/hdp" and move rest of the files and directories.

2.3.4.0-3485
current

.

I am suspecting that the "ssl" directory there is actually causing the issue.

Re: Grafana installation failing after I upgraded Ambari from 2.2 to 2.5

Rising Star

Great, This does seem to work..

Thanks

prakash

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