[
https://issues.apache.org/jira/browse/AMBARI-15641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
darkz updated AMBARI-15641:
---------------------------
Description:
When I use ambari 2.2.1,the server and agent install, and I install some
service of HDP 2.3.4.0-3485 through the ambari web UI,install ok but start
service failed,the logs shows me :
stderr: /var/lib/ambari-agent/data/errors-69.txt
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
line 39, in <module>
BeforeStartHook().execute()
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 219, in execute
method(env)
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
line 28, in hook
import params
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py",
line 141, in <module>
ambari_db_rca_password =
config['hostLevelParams']['ambari_db_rca_password'][0]
TypeError: 'int' object is unsubscriptable
stdout: /var/lib/ambari-agent/data/output-69.txt
2016-03-29 12:21:52,902 - The hadoop conf dir
/usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for
version 2.3.4.0-3485
2016-03-29 12:21:52,902 - Checking if need to create versioned conf dir
/etc/hadoop/2.3.4.0-3485/0
2016-03-29 12:21:52,903 - call['conf-select create-conf-dir --package hadoop
--stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False, 'sudo':
True, 'quiet': False, 'stderr': -1}
2016-03-29 12:21:52,952 - call returned (1, '/etc/hadoop/2.3.4.0-3485/0 exist
already', '')
2016-03-29 12:21:52,952 - checked_call['conf-select set-conf-dir --package
hadoop --stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False,
'sudo': True, 'quiet': False}
2016-03-29 12:21:52,996 - checked_call returned (0,
'/usr/hdp/2.3.4.0-3485/hadoop/conf -> /etc/hadoop/2.3.4.0-3485/0')
2016-03-29 12:21:52,997 - Ensuring that hadoop has the correct symlink structure
2016-03-29 12:21:52,997 - Using hadoop conf dir:
/usr/hdp/current/hadoop-client/conf
I modifythe code of
/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
and find line 141:
ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url'][0]
I add
import pprint
print "xxxxxxxxxxxxxxx"
pprint.pprint(config['hostLevelParams'])
print "xxxxxxxxxxxxxxx"
to debug the dictionary content:
{'agentCacheDir': '/var/lib/ambari-agent/cache',
'ambari_db_rca_driver': 'com.mysql.jdbc.Driver',
'ambari_db_rca_password': '123456',
'ambari_db_rca_url': 'jdbc:mysql://127.0.0.1:3306/ambari',
'ambari_db_rca_username': 'ambari',
...
So I think it call wrong,so I change
ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url'][0]
to
ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url']
then start the service is OK.
so I think is a bug of ambari-agent ??
I post the problem in
https://community.hortonworks.com/questions/24861/ambari-2210-start-service-failed-with-error.html
was:
When I use ambari 2.2.1,the server and agent install, and I install some
service of HDP 2.3.4.0-3485 through the ambari web UI,install ok but start
service failed,the logs shows me :
stderr: /var/lib/ambari-agent/data/errors-69.txt
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
line 39, in <module>
BeforeStartHook().execute()
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 219, in execute
method(env)
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
line 28, in hook
import params
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py",
line 141, in <module>
ambari_db_rca_password =
config['hostLevelParams']['ambari_db_rca_password'][0]
TypeError: 'int' object is unsubscriptable
stdout: /var/lib/ambari-agent/data/output-69.txt
2016-03-29 12:21:52,902 - The hadoop conf dir
/usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for
version 2.3.4.0-3485
2016-03-29 12:21:52,902 - Checking if need to create versioned conf dir
/etc/hadoop/2.3.4.0-3485/0
2016-03-29 12:21:52,903 - call['conf-select create-conf-dir --package hadoop
--stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False, 'sudo':
True, 'quiet': False, 'stderr': -1}
2016-03-29 12:21:52,952 - call returned (1, '/etc/hadoop/2.3.4.0-3485/0 exist
already', '')
2016-03-29 12:21:52,952 - checked_call['conf-select set-conf-dir --package
hadoop --stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False,
'sudo': True, 'quiet': False}
2016-03-29 12:21:52,996 - checked_call returned (0,
'/usr/hdp/2.3.4.0-3485/hadoop/conf -> /etc/hadoop/2.3.4.0-3485/0')
2016-03-29 12:21:52,997 - Ensuring that hadoop has the correct symlink structure
2016-03-29 12:21:52,997 - Using hadoop conf dir:
/usr/hdp/current/hadoop-client/conf
I post the problem in
https://community.hortonworks.com/questions/24861/ambari-2210-start-service-failed-with-error.html
> ambari 2.2.1 install some service of HDP 2.3.4.0-3485 ok but start service
> failed
> ----------------------------------------------------------------------------------
>
> Key: AMBARI-15641
> URL: https://issues.apache.org/jira/browse/AMBARI-15641
> Project: Ambari
> Issue Type: Bug
> Components: ambari-agent
> Affects Versions: 2.2.1
> Environment: Centos 6.3 64bit,openjdk1.8
> Reporter: darkz
>
> When I use ambari 2.2.1,the server and agent install, and I install some
> service of HDP 2.3.4.0-3485 through the ambari web UI,install ok but start
> service failed,the logs shows me :
> stderr: /var/lib/ambari-agent/data/errors-69.txt
> Traceback (most recent call last):
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
> line 39, in <module>
> BeforeStartHook().execute()
> File
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
> line 219, in execute
> method(env)
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py",
> line 28, in hook
> import params
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py",
> line 141, in <module>
> ambari_db_rca_password =
> config['hostLevelParams']['ambari_db_rca_password'][0]
> TypeError: 'int' object is unsubscriptable
>
> stdout: /var/lib/ambari-agent/data/output-69.txt
> 2016-03-29 12:21:52,902 - The hadoop conf dir
> /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for
> version 2.3.4.0-3485
> 2016-03-29 12:21:52,902 - Checking if need to create versioned conf dir
> /etc/hadoop/2.3.4.0-3485/0
> 2016-03-29 12:21:52,903 - call['conf-select create-conf-dir --package hadoop
> --stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False, 'sudo':
> True, 'quiet': False, 'stderr': -1}
> 2016-03-29 12:21:52,952 - call returned (1, '/etc/hadoop/2.3.4.0-3485/0 exist
> already', '')
> 2016-03-29 12:21:52,952 - checked_call['conf-select set-conf-dir --package
> hadoop --stack-version 2.3.4.0-3485 --conf-version 0'] {'logoutput': False,
> 'sudo': True, 'quiet': False}
> 2016-03-29 12:21:52,996 - checked_call returned (0,
> '/usr/hdp/2.3.4.0-3485/hadoop/conf -> /etc/hadoop/2.3.4.0-3485/0')
> 2016-03-29 12:21:52,997 - Ensuring that hadoop has the correct symlink
> structure
> 2016-03-29 12:21:52,997 - Using hadoop conf dir:
> /usr/hdp/current/hadoop-client/conf
>
> I modifythe code of
> /var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
> and find line 141:
> ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url'][0]
> I add
> import pprint
> print "xxxxxxxxxxxxxxx"
> pprint.pprint(config['hostLevelParams'])
> print "xxxxxxxxxxxxxxx"
> to debug the dictionary content:
> {'agentCacheDir': '/var/lib/ambari-agent/cache',
> 'ambari_db_rca_driver': 'com.mysql.jdbc.Driver',
> 'ambari_db_rca_password': '123456',
> 'ambari_db_rca_url': 'jdbc:mysql://127.0.0.1:3306/ambari',
> 'ambari_db_rca_username': 'ambari',
> ...
> So I think it call wrong,so I change
> ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url'][0]
> to
> ambari_db_rca_url = config['hostLevelParams']['ambari_db_rca_url']
> then start the service is OK.
> so I think is a bug of ambari-agent ??
> I post the problem in
> https://community.hortonworks.com/questions/24861/ambari-2210-start-service-failed-with-error.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)