Support Questions
Find answers, ask questions, and share your expertise

Error in SmartSense

Solved Go to solution

Error in SmartSense

While restarting SmartSense I am getting the below attached error. Please look into it:-


SmartSense.txt

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error in SmartSense

Super Mentor

@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



View solution in original post

4 REPLIES 4

Re: Error in SmartSense

Can anyone please help on this?

Re: Error in SmartSense

Super Mentor

@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

Re: Error in SmartSense

@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

Re: Error in SmartSense

Super Mentor

@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



View solution in original post