Member since
02-18-2020
29
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3218 | 07-23-2020 11:38 PM |
06-07-2021
02:42 AM
I'm looking for a solution to clean logs of ambari-agent in HDP 3.1.4
I would like to keep logs during a retention period, and delete them after.
Can I configure this clean in the configuration file ambari-agent.ini, or do I need to use another system like logrotate ?
Thanks in advance
... View more
Labels:
01-22-2021
05:39 AM
I have opened a new message for the same topic => https://community.cloudera.com/t5/Support-Questions/HDP-3-1-4-0-315-libhdfs-problem/td-p/310294
... View more
01-22-2021
05:38 AM
I have opened a new message for the same topic => https://community.cloudera.com/t5/Support-Questions/HDP-3-1-4-0-315-libhdfs-problem/td-p/310294
... View more
01-21-2021
06:52 AM
I have the same problem on HDP 3.1.4.0-315 What is the solution ?
... View more
01-21-2021
06:32 AM
I have the same problem on HDP 3.1.4.0-315 What is the solution ?
... View more
07-30-2020
06:20 AM
@Shelton After the apply of the workaround on the file /var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py, I succeeded to execute the API request but there's no effect : the directory of the old version hasn't been removed on the servers of the cluster, and the results of the API queries GET http://localhost/api/v1/clusters/<cluster_name>/stack_versions, http://localhost/api/v1/clusters/<cluster_name>/stack_versions/<id_oldversion>, are the same.
... View more
07-30-2020
05:37 AM
@Shelton In order to remove or modify the symlinks that point to the old version, I have executed the command '/usr/bin/hdp-select set all 3.1.4.0-315' on all servers of the cluster. After that, I have relaunch the API request, and I get a new error that I think I can fix with the workaround suggested before in this thread Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 119, in <module>
RemovePreviousStacks().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/custom_actions/scripts/remove_previous_stacks.py", line 49, in actionexecute
self.remove_stack_version(structured_output, low_version)
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 54, in remove_stack_version
packages_to_remove = self.get_packages_to_remove(version)
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 77, in get_packages_to_remove
all_installed_packages = self.pkg_provider.all_installed_packages()
AttributeError: 'AptManager' object has no attribute 'all_installed_packages'
... View more
07-29-2020
06:53 AM
@Shelton Yes, I tried this workaround, and I still get this error : Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 118, in <module>
RemovePreviousStacks().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/custom_actions/scripts/remove_previous_stacks.py", line 49, in actionexecute
self.remove_stack_version(structured_output, low_version)
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 53, in remove_stack_version
self.check_no_symlink_to_version(structured_output, version)
File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 93, in check_no_symlink_to_version
raise Fail("{0} contains symlink to version for remove! {1}".format(stack_root_current, version))
resource_management.core.exceptions.Fail: /usr/hdp/current/ contains symlink to version for remove! 3.1.0.0-78 It seems that it fails because there are still symink to the old version in the directory /usr/hdp/current (at least on the server where ambari-server is hosted) : root@server-01:~# ls -l /usr/hdp/current | grep 3.1.0.0-78
lrwxrwxrwx 1 root root 25 Jul 28 06:27 atlas-server -> /usr/hdp/3.1.0.0-78/atlas
lrwxrwxrwx 1 root root 31 Jul 28 06:27 hadoop-hdfs-datanode -> /usr/hdp/3.1.0.0-78/hadoop-hdfs
root@server-01:~# ls -l /usr/hdp/current | grep 3.1.4.0-315
lrwxrwxrwx 1 root root 26 Jul 28 10:44 atlas-client -> /usr/hdp/3.1.4.0-315/atlas
lrwxrwxrwx 1 root root 27 Jul 28 10:51 hadoop-client -> /usr/hdp/3.1.4.0-315/hadoop
lrwxrwxrwx 1 root root 32 Jul 28 10:51 hadoop-hdfs-client -> /usr/hdp/3.1.4.0-315/hadoop-hdfs
... View more
07-29-2020
06:34 AM
@massoudm Did you found a solution ? I get the same error after the upgrade of HDP 3.1.0 to 3.1.4 Thanks in advance
... View more