Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Error setting up HST Server while trying to add SmartSense service using Ambari in Hortonworks Sandbox 2.5

I am using a Hortonworks Sandbox (HDP2.5 on VMware) which I downloaded today.

I am trying to add SmartSense as a service using Ambari and it fails at the last task - HST Server Install.

Here is the ambari-agent error log:

Failed to execute command: /usr/sbin/hst setup -q --nostart --nocheck; Exit code: 1; stdout: ; stderr: Traceback (most recent call last):
  File "/usr/sbin/hst-server.py", line 1438, in <module>
    main(sys.argv)
  File "/usr/sbin/hst-server.py", line 1408, in main
    setup(options)
  File "/usr/sbin/hst-server.py", line 815, in setup
    accountName, notificationEmail, clusterName, clusterSecured, level)
  File "/usr/sbin/hst-server.py", line 401, in configure_server
    set_config_prop_value_ex(conf_file, 'server', 'port', str(port))
  File "/usr/sbin/hst-server.py", line 356, in set_config_prop_value_ex
    for line in fileinput.FileInput(conf_file, inplace=True):
  File "/usr/lib64/python2.6/fileinput.py", line 253, in next
    line = self.readline()
  File "/usr/lib64/python2.6/fileinput.py", line 322, in readline
    os.rename(self._filename, self._backupfilename)
OSError: [Errno 22] Invalid argument

Here is the ambari-agent output log:

2017-03-02 13:36:29,025 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.5.0.0-1245
2017-03-02 13:36:29,025 - Checking if need to create versioned conf dir /etc/hadoop/2.5.0.0-1245/0
2017-03-02 13:36:29,026 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'create-conf-dir', '--package', 'hadoop', '--stack-version', '2.5.0.0-1245', '--conf-version', '0')] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-03-02 13:36:29,075 - call returned (1, '/etc/hadoop/2.5.0.0-1245/0 exist already', '')
2017-03-02 13:36:29,075 - checked_call[('ambari-python-wrap', '/usr/bin/conf-select', 'set-conf-dir', '--package', 'hadoop', '--stack-version', '2.5.0.0-1245', '--conf-version', '0')] {'logoutput': False, 'sudo': True, 'quiet': False}
2017-03-02 13:36:29,108 - checked_call returned (0, '')
2017-03-02 13:36:29,108 - Ensuring that hadoop has the correct symlink structure
2017-03-02 13:36:29,108 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-03-02 13:36:29,109 - Group['ranger'] {}
2017-03-02 13:36:29,111 - Group['hadoop'] {}
2017-03-02 13:36:29,112 - Group['users'] {}
2017-03-02 13:36:29,112 - Group['knox'] {}
2017-03-02 13:36:29,112 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,113 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,114 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,115 - User['oozie'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2017-03-02 13:36:29,116 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,117 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['ranger']}
2017-03-02 13:36:29,117 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2017-03-02 13:36:29,118 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2017-03-02 13:36:29,118 - User['flume'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,119 - User['kafka'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,119 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,120 - User['sqoop'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,120 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,121 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,121 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,122 - User['knox'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,122 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-03-02 13:36:29,123 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-03-02 13:36:29,125 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2017-03-02 13:36:29,138 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if
2017-03-02 13:36:29,139 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'create_parents': True, 'mode': 0775, 'cd_access': 'a'}
2017-03-02 13:36:29,140 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-03-02 13:36:29,141 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'}
2017-03-02 13:36:29,154 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] due to not_if
2017-03-02 13:36:29,154 - Group['hdfs'] {}
2017-03-02 13:36:29,154 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hadoop', 'hdfs']}
2017-03-02 13:36:29,155 - FS Type: 
2017-03-02 13:36:29,155 - Directory['/etc/hadoop'] {'mode': 0755}
2017-03-02 13:36:29,171 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2017-03-02 13:36:29,172 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2017-03-02 13:36:29,190 - Initializing 4 repositories
2017-03-02 13:36:29,190 - Repository['HDP-2.5'] {'base_url': 'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-1245/', 'action': ['create'], 'components': ['HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': None}
2017-03-02 13:36:29,201 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.5]\nname=HDP-2.5\nbaseurl=http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.5.0.0-1245/\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-03-02 13:36:29,202 - Repository['HDP-UTILS-1.1.0.21'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6', 'action': ['create'], 'components': ['HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None}
2017-03-02 13:36:29,204 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.21]\nname=HDP-UTILS-1.1.0.21\nbaseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-03-02 13:36:29,205 - Repository['HDP-SOLR-2.5-100'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6/', 'action': ['create'], 'components': ['HDP-SOLR', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-SOLR', 'mirror_list': None}
2017-03-02 13:36:29,208 - File['/etc/yum.repos.d/HDP-SOLR.repo'] {'content': '[HDP-SOLR-2.5-100]\nname=HDP-SOLR-2.5-100\nbaseurl=http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6/\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-03-02 13:36:29,208 - Repository['HDP-SOLR-2.5-100'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6/', 'action': ['create'], 'components': ['HDP-SOLR', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-SOLR', 'mirror_list': None}
2017-03-02 13:36:29,211 - File['/etc/yum.repos.d/HDP-SOLR.repo'] {'content': '[HDP-SOLR-2.5-100]\nname=HDP-SOLR-2.5-100\nbaseurl=http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos6/\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-03-02 13:36:29,212 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-03-02 13:36:29,365 - Skipping installation of existing package unzip
2017-03-02 13:36:29,366 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-03-02 13:36:29,464 - Skipping installation of existing package curl
2017-03-02 13:36:29,464 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-03-02 13:36:29,634 - Skipping installation of existing package hdp-select
installing using command: {sudo} rpm -qa | grep smartsense- || {sudo} yum -y install smartsense-hst || {sudo} rpm -i /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/files/rpm/*.rpm
Command:  rpm -qa | grep smartsense- ||  yum -y install smartsense-hst ||  rpm -i /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/files/rpm/*.rpm
Exit code: 0
Std Out: smartsense-hst-1.3.0.0-1225.x86_64

Std Err: None
Command:  mkdir -p /etc/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /etc/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /etc/hst/conf
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /etc/hst/conf
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-common
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-common
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server/data
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server/data
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server/tmp
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server/tmp
Exit code: 0
Std Out: None
Std Err: None
Writing configs to : /etc/hst/conf/hst-agent.ini
2017-03-02 13:36:30,422 - File['/etc/hst/conf/anonymization_rules.json'] {'content': InlineTemplate(...), 'mode': 0644}
2017-03-02 13:36:30,425 - File['/etc/hst/conf/log4j.properties'] {'content': InlineTemplate(...), 'mode': 0644}
Writing configs to : /etc/hst/conf/hst-server.ini
2017-03-02 13:36:30,430 - File['/etc/hst/conf/anonymization_rules.json'] {'content': InlineTemplate(...), 'mode': 0644}
2017-03-02 13:36:30,434 - File['/etc/hst/conf/log4j.properties'] {'content': InlineTemplate(...), 'mode': 0644}
Command:  mkdir -p /etc/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /etc/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/log/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /etc/hst/conf
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /etc/hst/conf
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/run/hst
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-common
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-common
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server/data
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server/data
Exit code: 0
Std Out: None
Std Err: None
Command:  mkdir -p /var/lib/smartsense/hst-server/tmp
Exit code: 0
Std Out: None
Std Err: None
Command:  chown -R 'root':'root' /var/lib/smartsense/hst-server/tmp
Exit code: 0
Std Out: None
Std Err: None
This host is identified as sandbox.hortonworks.com and namenode is identified as ['sandbox.hortonworks.com']
This is found to be namenode. Creating smartsense activity user.
2017-03-02 13:36:30,534 - User['activity_analyzer'] {'gid': 'hadoop', 'groups': ['hdfs']}
Setting up HST server
Command: /usr/sbin/hst setup -q --nostart --nocheck
Exit code: 1
Std Out: None
Std Err: Traceback (most recent call last):
  File "/usr/sbin/hst-server.py", line 1438, in <module>
    main(sys.argv)
  File "/usr/sbin/hst-server.py", line 1408, in main
    setup(options)
  File "/usr/sbin/hst-server.py", line 815, in setup
    accountName, notificationEmail, clusterName, clusterSecured, level)
  File "/usr/sbin/hst-server.py", line 401, in configure_server
    set_config_prop_value_ex(conf_file, 'server', 'port', str(port))
  File "/usr/sbin/hst-server.py", line 356, in set_config_prop_value_ex
    for line in fileinput.FileInput(conf_file, inplace=True):
  File "/usr/lib64/python2.6/fileinput.py", line 253, in next
    line = self.readline()
  File "/usr/lib64/python2.6/fileinput.py", line 322, in readline
    os.rename(self._filename, self._backupfilename)
OSError: [Errno 22] Invalid argument

Command failed after 1 tries

I have used the default settings/configurations when trying to add SmartSense and have not changed anything except at one step it asked to set a password for admin, which I did.

From the output log, it appears the following command failed:

/usr/sbin/hst setup -q --nostart --nocheck

I also verified all other pre-existing services are up and running. Here is a snapshot.

13170-capture.jpg

Ignore SmartSense in the above picture as I took the screen capture after the installation failed.

P.S. I am behind a corporate firewall/proxy.

Appreciate any help. Thank you in advance.

4 REPLIES 4

can you try to issue the failing command manually via the command line and see what happens?

/usr/sbin/hst setup

Paste/attach the output here so we can see

Cloudera Employee

Hi Dinesh,

SmartSense ID needs to be configured in Ambari - Smartsense Service config page before starting the service. The same can be obtained from support portal under Tools tab.

Hi Srini, my installation has failed so I haven't yet reached the stage to start the service.

Contributor

Sandbox has some issue and that is the reason you see "Invalid argument" error. You need to either get the latest sandbox or upgrade the kernel (yum update kernel)

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.