Skip to main content
mervezeybel
Gold ⭐️
January 23, 2020
Solved

Infra Solr can not start after installation on Ambari 2.7.1

Hello,

 

I'm trying to install Infra Solr from Ambari. After installation, when i restart the Infra Solr, the status of the service is red and it gives error below:

 

Traceback (most recent call last):
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 51, in _ensure_metadata
_user_entity = pwd.getpwnam(user)
KeyError: 'getpwnam(): name not found: infra-solr'

The above exception was the cause of the following exception:

Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py", line 171, in <module>
InfraSolr().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 351, in execute
method(env)
File "/var/lib/ambari-agent/cache/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py", line 54, in start
self.configure(env)
File "/var/lib/ambari-agent/cache/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py", line 49, in configure
setup_infra_solr(name = 'server')
File "/var/lib/ambari-agent/cache/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/setup_infra_solr.py", line 38, in setup_infra_solr
group=params.user_group
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 125, in __new__
cls(names_list.pop(0), env, provider, **kwargs)
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/system.py", line 199, in action_create
recursion_follow_links=self.resource.recursion_follow_links, safemode_folders=self.resource.safemode_folders)
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 53, in _ensure_metadata
raise Fail("User '{0}' doesn't exist".format(user))
resource_management.core.exceptions.Fail: User 'infra-solr' doesn't exist


I google it, but i cannot find any solution. Does anybody know the cause of this error?

mervezeybel
Gold ⭐️
January 27, 2020

I resolve the problem. The cause of the error is that when Solr is installed, Solr user and group can not be created automatically. I add Solar user and its group manually from the terminal with this command (1004 is the Oozie's group id):

 

useradd -g 1004 infra-solr -m -d /home/infra-solr --shell /bin/bash

  

 

1 reply

mervezeybel
mervezeybelAuthorAnswer
Gold ⭐️
January 27, 2020

I resolve the problem. The cause of the error is that when Solr is installed, Solr user and group can not be created automatically. I add Solar user and its group manually from the terminal with this command (1004 is the Oozie's group id):

 

useradd -g 1004 infra-solr -m -d /home/infra-solr --shell /bin/bash

  

 

Translate