Member since
07-30-2019
453
Posts
112
Kudos Received
80
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1807 | 04-12-2023 08:58 PM | |
3941 | 04-04-2023 11:48 PM | |
1216 | 04-02-2023 10:24 PM | |
2937 | 07-05-2019 08:38 AM | |
2988 | 05-13-2019 06:21 AM |
12-27-2018
01:14 AM
Hi @Jack Madden,
from your previous comment i see "desired_admin_state" is in "INSERVICE", but as per you it is showing a DECOMMISSIONING State . Also the CURL command tells us the host-component is not in maintenance_state .
We can try following things here to get the correct status in UI
1) try restarting ambari-server if doesnt work Take a backup of database and look out for output of following commands
2) go to database, inspect the output of the following command :
ambari=> select id,component_name,desired_State,host_id,service_name,admin_state from hostcomponentdesiredstate where service_name='HBASE';
id | component_name | desired_state | host_id | service_name | admin_state
-----+--------------------+---------------+---------+--------------+-------------
9 | HBASE_MASTER | STARTED | 6 | HBASE |
27 | HBASE_REGIONSERVER | STARTED | 2 | HBASE | INSERVICE
28 | HBASE_REGIONSERVER | STARTED | 5 | HBASE | INSERVICE
86 | HBASE_CLIENT | INSTALLED | 1 | HBASE |
53 | HBASE_CLIENT | INSTALLED | 2 | HBASE |
54 | HBASE_CLIENT | INSTALLED | 5 | HBASE |
26 | HBASE_REGIONSERVER | STARTED | 1 | HBASE |
151 | HBASE_CLIENT | INSTALLED | 6 | HBASE |
152 | HBASE_REGIONSERVER | STARTED | 6 | HBASE | INSERVICE
(9 rows)
3) correct the admin_state column if required. please remember to set it as NULL , example command :
ambari=> update hostcomponentdesiredstate set admin_state=NULL where id=<ID>;
4) restart ambari to see if there is any luck.
Note : Please take proper backup of the database and be 1000% sure of what command you are executing, make sure ambari-server is stopped before performing any edit to the database.If it's a production cluster always contact hortonworks support .
Hope this helps you troubleshooting more on this regard.
Please accept the answer if it helped.
... View more
12-26-2018
05:48 PM
Hi @Jack Madden, If the decommissioning process is completed and just ambar is showing wrong information in ui , then can you try disable maintainence mode for the region server and see if there is any luck ? BTW the ui fetches the Status of component via CURL curl -u admin:admin -H "X-Requested-By:ambari" -i -X GET http://<AMBARI_HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOSTNAME>/host_components/HBASE_REGIONSERVER/?fields=* and will look for desired_admin_state , whats the output of this command for you ? Also try to enable debug log for ambari-agent , restart ambari-agent to see whats the status of region server in heartbeat message send from ambari-agent to ambari-server.
... View more
12-26-2018
05:22 PM
Hi @Rajeswaran Govindan , If you cant give the suoders permissions as listed docs , Its always better to run the ambari-server as root. to run ambari server again as root again follow this steps
1)stop ambari-server
[root@asnaik-asnaik1 ~]# ambari-server stop
Using python /usr/bin/python
Stopping ambari-server
Waiting for server stop...
Ambari Server stopped
2) perform ambari-server setup and customize the user-account for ambari server
[root@asnaik-asnaik1 ~]# ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)?
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):root
Adjusting ambari-server permissions and ownership...
WARNING: Command chown -R -L root /var/lib/ambari-server returned exit code /var/lib/ambari-server with message: chown: cannot dereference ‘/var/lib/ambari-server/resources/mysql-connector-java.jar’: No such file or directory
chown: cannot dereference ‘/var/lib/ambari-server/resources/mysql-jdbc-driver.jar’: No such file or directory
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? n
Checking GPL software agreement...
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? n
Configuring database...
....
3) start ambari-server
[root@asnaik-asnaik1 ~]# ambari-server start
Using python /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Refer to help : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation/content/set_up_the_ambari_server.html If you have any doubt. Please accept this answer if its helpful
... View more
12-26-2018
03:37 PM
8 Kudos
Problem Statement : when using a local repository, installation fails due to empty baseurls being written to the Ambari repository (even though local repository baseurl values were provided). The installation fails with below error : stderr:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/hook.py", line 37, in <module>
BeforeInstallHook().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
method(env)
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/hook.py", line 33, in hook
install_packages()
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/shared_initialization.py", line 37, in install_packages
retry_count=params.agent_stack_retry_count)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
self.env.run()
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/packaging.py", line 30, in action_install
self._pkg_manager.install_package(package_name, self.__create_context())
File "/usr/lib/ambari-agent/lib/ambari_commons/repo_manager/yum_manager.py", line 219, in install_package
shell.repository_manager_executor(cmd, self.properties, context)
File "/usr/lib/ambari-agent/lib/ambari_commons/shell.py", line 753, in repository_manager_executor
raise RuntimeError(message)
RuntimeError: Failed to execute command '/usr/bin/yum -y install hdp-select', exited with code '1', message: 'Repository InstallMedia is listed more than once in the configuration
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: HDP-3.1-repo-1
'
Command aborted. Reason: 'Server considered task failed and automatically aborted it'
stdout: We can See that Ambari UI shows the empty baseURL in review step : It also sends the empty Repo version while deploy stage Root cause : https://issues.apache.org/jira/browse/AMBARI-25069 Workaround : This is a Javascript bug in ambari that happens when using local repository and there is no internet access to cluster to workaround this Steps 1) go to /usr/lib/ambari-server/web/javascipts cd /usr/lib/ambari-server/web/javascripts 2) take backup of app.js cp app.js app.js_backup 3) edit the app.js find out the line(39892) : onNetworkIssuesExist: function () { Change the line from : /**
* Use Local Repo if some network issues exist
*/
onNetworkIssuesExist: function () {
if (this.get('networkIssuesExist')) {
this.get('content.stacks').forEach(function (stack) {
stack.setProperties({
usePublicRepo: false,
useLocalRepo: true
});
stack.cleanReposBaseUrls();
});
}
}.observes('networkIssuesExist'), to /**
* Use Local Repo if some network issues exist
*/
onNetworkIssuesExist: function () {
if (this.get('networkIssuesExist')) {
this.get('content.stacks').forEach(function (stack) {
if(stack.get('useLocalRepo') != true){
stack.setProperties({
usePublicRepo: false,
useLocalRepo: true
});
stack.cleanReposBaseUrls();
}
});
}
}.observes('networkIssuesExist'), as per : https://github.com/apache/ambari/pull/2743/files Later as you have already deployed the cluster we need to reset the cluster (Caution : this will erase all the configs you have created previously in Step6 and also the Hosts and services you have selected need to select again ) Command : ambari-server reset And hard reload the page and start the create cluster wizard again. Incase you have already at Step 9 and cannot proceed with ambari-server reset (as it invovles lots of Configs being added again , the below steps are for you ) Preqrequesties : The cluster now is in Deployment step(step 9 ) and you have only retry button to press steps 1) Stop ambari-server 2) login to Database 3) use the below command to list out all the contents in repo_definition table : select * from repo_definition; 4) you can see the base_url will be empty for the all the Rows in the table 5) Correct the base_url for every rows and update it using the command : update repo_definition set base_url='<YOUR BASE URL>' where id=<THE CORESPONDING ID>; for ex : update repo_definition set base_url='http://asnaik.example.com/localrepo/HDP-3.1' where id=9; 6) after correcting all the base_url columns in repo_definition table and also delete the empty repos created by ambari from location /etc/yum.repos.d 7) start ambari, Login to UI and press retry button, The Installation will work as smooth as it can be. Hope this helps.
... View more
Labels:
12-25-2018
05:05 PM
1 Kudo
Hi @Nikita Yashtaev, Whats your HDP version and ambari version.
... View more
12-25-2018
04:24 PM
Hi @Rajeswaran Govindan , Can you please login and accept the best answer to resolve this thread. and Create a new thread for this new issue you are facing. Accepting the best answer helps other community users to figure out the answer correctly.
... View more
12-25-2018
01:05 PM
Hi @lei lin, Can you please login and accept the original answer if this helps you. and for your last query. you need to add in ambari-env.sh like this : export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Djavax.net.debug=all" and restart ambari-server . you can find the algorithm and debug logs in ambari-server.out. it works for me and as per oracle JDK help. it should has to work for you too : https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/ReadDebug.html
... View more
12-25-2018
12:56 PM
Hi @Henry Luo, Can you please see if this helps you. Can you please login and accept the anwer if it did.
... View more
12-25-2018
12:53 PM
Hi @Michael Mester, Can you please see if this commend helps you. login and accept this answer if it did. 🙂
... View more
12-24-2018
02:04 PM
1 Kudo
Disclaimer:This article is based on my personal experience and knowledge.Don't take it as a standard guidelines, understand the concept and modify it for your environmental best practices and use case. Always contact Hortonworks support if its production cluster Problem Description: I am currently using ambari-2.6.2 version. I am trying to update some configs via configs.py and my python version is python-2.7.9 and my configs.py is failing with below error : [root@asnaik1 certs]# /var/lib/ambari-server/resources/scripts/configs.py --port=8443 --action=set --host=asnaik1.openstacklocal --cluster=asnaik --config-type=kafka-env --user=admin --password=admin --key=kafka_log_dir --value=/tmp --protocol=https
2018-12-05 10:24:57,615 INFO ### Performing "set":
2018-12-05 10:24:57,615 INFO ### new property - "kafka_log_dir":"/tmp"
Traceback (most recent call last):
File "/var/lib/ambari-server/resources/scripts/configs.py", line 364, in <module>
sys.exit(main())
File "/var/lib/ambari-server/resources/scripts/configs.py", line 343, in main
return set_properties(cluster, config_type, action_args, accessor)
File "/var/lib/ambari-server/resources/scripts/configs.py", line 237, in set_properties
update_config(cluster, config_type, updater, accessor)
File "/var/lib/ambari-server/resources/scripts/configs.py", line 131, in update_config
properties, attributes = config_updater(cluster, config_type, accessor)
File "/var/lib/ambari-server/resources/scripts/configs.py", line 136, in update
properties, attributes = get_current_config(cluster, config_type, accessor)
File "/var/lib/ambari-server/resources/scripts/configs.py", line 123, in get_current_config
config_tag = get_config_tag(cluster, config_type, accessor)
File "/var/lib/ambari-server/resources/scripts/configs.py", line 94, in get_config_tag
response = accessor(DESIRED_CONFIGS_URL.format(cluster))
File "/var/lib/ambari-server/resources/scripts/configs.py", line 89, in do_request
raise Exception('Problem with accessing api. Reason: {0}'.format(exc))
Exception: Problem with accessing api. Reason: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)> Root cause: starting from python 2.7.9, python will validate the SSL certificate by default and if no valid SSL certificate is configured it might fail. All the python version below 2.7.9 this is disabled by default. More Details can be found in this JIRA : https://issues.apache.org/jira/browse/AMBARI-23893 the above JIRA is fixed in ambari-2.7 version so all the versions below ambari-2.7 and having python 2.7.9 will be having this issue. Workaround : The fix of JIRA : AMBARI-23893 is this : https://github.com/apache/ambari/pull/1314/files We can actually take backup of file : /var/lib/ambari-server/resources/scripts/configs.py and use this configs.py instead . Steps 1) Navigate to /var/lib/ambari-server/resources/scripts/ cd /var/lib/ambari-server/resources/scripts/ 2) take Backup of configs.py mv configs.py configs.py_Backup 3) wget the raw github content with fix: wget https://raw.githubusercontent.com/dlysnichenko/ambari/75e0c4a6e5f2c30483bf2f783c1af0c38f3b2623/ambari-server/src/main/resources/scripts/configs.py 4) give necessary permissions chmod -R 750 configs.py 5) Retry the Operation with --unsafe option [root@asnaik1 certs]# /var/lib/ambari-server/resources/scripts/configs.py --port=8443 --action=set --host=asnaik1.openstacklocal --cluster=asnaik --config-type=kafka-env --user=admin --password=admin --key=kafka_log_dir --value=/tmp --protocol=https --unsafe NOTE: Remember to add --unsafe option as that was the change associated with the apache-jira
... View more