Skip to main content
jsensharma
Platinum ⭐️⭐️
July 1, 2019

@Pritam Konar

I do not see the error any more in the SmartSense startup log. Seems that the previous remedy worked in getting it fixed

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

It will be great if you can mark the current HCC thread as Answered by clicking the "Accept" button on the helpful answer and that way we can keep one HCC thread dedicate to One particular issue and one particular resolution.

.

.

Your current error is completely different and will require separate investigation. I will suggest you to please open a separate HCC thread with " /var/log/smartsense-activity/activity-analyzer.log" log attached for the review of the following error that you are getting now.

Waiting for activity analyzer to start...................
SmartSense Activity Analyzer failed to start, with exitcode -1. Check /var/log/smartsense-activity/activity-analyzer.log for more information.
User root failed to execute command : /usr/sbin/hst activity-analyzer start



4 replies

pritam_konar
Silver ⭐️⭐️
June 30, 2019

Can anyone please help on this?

Translate
jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
June 30, 2019

@Pritam Konar

As we see the following error:

Traceback (most recent call last):
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 62, in _ensure_metadata
    _group_entity = grp.getgrnam(group)
KeyError: 'getgrnam(): name not found: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory\nroot'

The above exception was the cause of the following exception:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/SMARTSENSE/package/scripts/activity_analyzer.py", line 13, in <module>
    Activity('analyzer').execute()


So can you please try this and then see if it works for you?

Edit the AGENT_WORKING_DIR property value inside the "/var/lib/ambari-agent/bin/ambari-agent" to something else and then try again. The default location will be something like following on all hosts.

Default setting

# grep 'AGENT_WORKING_DIR' /var/lib/ambari-agent/bin/ambari-agent
AGENT_WORKING_DIR=/var/lib/ambari-agent


For example try changing it to something like "/tmp/ambari-agent " as following:

Example After change

# grep 'AGENT_WORKING_DIR' /var/lib/ambari-agent/bin/ambari-agent
AGENT_WORKING_DIR=/tmp/ambari-agent


Then restart Ambari Agent on all hosts.

# ambari-agent restart

Translate
pritam_konar
Silver ⭐️⭐️
July 1, 2019

@Jay Kumar SenSharma

As mentioned in the above steps, i restarted ambari-agent in all the hosts, but i am getting this error in the attached smartsense log:-


SmartSense.txt

Translate
jsensharma
Platinum ⭐️⭐️
Platinum ⭐️⭐️
July 1, 2019

@Pritam Konar

I do not see the error any more in the SmartSense startup log. Seems that the previous remedy worked in getting it fixed

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

It will be great if you can mark the current HCC thread as Answered by clicking the "Accept" button on the helpful answer and that way we can keep one HCC thread dedicate to One particular issue and one particular resolution.

.

.

Your current error is completely different and will require separate investigation. I will suggest you to please open a separate HCC thread with " /var/log/smartsense-activity/activity-analyzer.log" log attached for the review of the following error that you are getting now.

Waiting for activity analyzer to start...................
SmartSense Activity Analyzer failed to start, with exitcode -1. Check /var/log/smartsense-activity/activity-analyzer.log for more information.
User root failed to execute command : /usr/sbin/hst activity-analyzer start



Translate