Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

OSError: [Errno 17] File exists" when installing HDF mpack hdf-ambari-mpack-3.1.2.0-7

OSError: [Errno 17] File exists" when installing HDF mpack hdf-ambari-mpack-3.1.2.0-7

New Contributor

Error (OSError: [Errno 17] File exists) occurring while installing the HDF Management pack - hdf-ambari-mpack-3.1.2.0-7 while upgrading existing HDP (Sandbox) with HDF.

Version :- Ambari 2.6.1 / HDP 2.6.4

Tried removing the existing softlinks from below paths and still it was un-successful

rm -rf /var/lib/ambari-server/resources/common-services/NIFI rm -rf /var/lib/ambari-server/resources/common-services/REGISTRY rm -rf /var/lib/ambari-server/resources/common-services/STREAMLINE rm -rf /var/lib/ambari-server/resources/common-services/SOLR rm -rf /var/lib/ambari-server/resources/mpacks rm -rf /var/lib/ambari-server/resources/stacks/HDF

Error:-

[root@sandbox]# ambari-server install-mpack --mpack=/tmp/hdf-ambari-mpack-3.1.2.0-7.tar.gz --verbose

Using python /usr/bin/python Installing management pack INFO:

Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Installing management pack /tmp/hdf-ambari-mpack-3.1.2.0-7.tar.gz

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Download management pack to temp location /var/lib/ambari-server/data/tmp/hdf-ambari-mpack-3.1.2.0-7.tar.gz

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Expand management pack at temp location /var/lib/ambari-server/data/tmp/hdf-ambari-mpack-3.1.2.0-7

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Stage management pack hdf-ambari-mpack-3.1.2.0-7 to staging location /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.1.2.0-7

INFO: Processing artifact hdf-service-definitions of type service-definitions in /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.1.2.0-7/common-services

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Symlink: /var/lib/ambari-server/resources/common-services/NIFI/1.0.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/NIFI/1.1.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/NIFI/1.2.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/NIFI/1.5.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/NIFI_REGISTRY/0.1.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/REGISTRY/0.3.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/STREAMLINE/0.5.0

INFO: Symlink: /var/lib/ambari-server/resources/common-services/STREAMLINE/0.6.0

INFO: Processing artifact hdf-stack-definitions of type stack-definitions in /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.1.2.0-7/stacks

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/configuration

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/hooks

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/kerberos.json

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/metainfo.xml

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/properties

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/repos

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/role_command_order.json

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/AMBARI_INFRA

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/AMBARI_METRICS

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/KAFKA

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/KERBEROS INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/LOGSEARCH

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/NIFI

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/RANGER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/STORM

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/ZOOKEEPER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/services/stack_advisor.py

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.0/widgets.json

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/metainfo.xml

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/repos INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/KAFKA INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/NIFI INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/RANGER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/STORM

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/ZOOKEEPER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/services/stack_advisor.py

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/2.1/upgrades

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/configuration

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/metainfo.xml

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/properties

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/repos

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/KAFKA

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/NIFI

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/RANGER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/REGISTRY

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/STORM

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/STREAMLINE

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/ZOOKEEPER

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/services/stack_advisor.py

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.0/upgrades

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/configuration

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/metainfo.xml

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/properties

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/repos

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/KAFKA

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/NIFI

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/NIFI_REGISTRY

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/REGISTRY

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/STORM

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/STREAMLINE

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/services/stack_advisor.py

INFO: Symlink: /var/lib/ambari-server/resources/stacks/HDF/3.1/upgrades

INFO: Processing artifact hdp-addon-services of type stack-addon-service-definitions in /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.1.2.0-7/hdp-addon-services/HDF/3.0

INFO: Loading properties from /etc/ambari-server/conf/ambari.properties

Traceback (most recent call last):

File "/usr/sbin/ambari-server.py", line 952, in <module> mainBody() File "/usr/sbin/ambari-server.py", line 922, in mainBody main(options, args, parser)

File "/usr/sbin/ambari-server.py", line 874, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs)

File "/usr/lib/python2.6/site-packages/ambari_server/setupMpacks.py", line 896, in install_mpack (mpack_metadata, mpack_name, mpack_version, mpack_staging_dir, mpack_archive_path) = _install_mpack(options, replay_mode)

File "/usr/lib/python2.6/site-packages/ambari_server/setupMpacks.py", line 794, in _install_mpack process_stack_addon_service_definitions_artifact(artifact, artifact_source_dir, options)

File "/usr/lib/python2.6/site-packages/ambari_server/setupMpacks.py", line 554, in process_stack_addon_service_definitions_artifact sudo.symlink(source_service_version_path, dest_link)

File "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 123, in symlink os.symlink(source, link_name)

OSError: [Errno 17] File exists

Please assist.

@nshelke @Vincent Jiang

1 REPLY 1

Re: OSError: [Errno 17] File exists" when installing HDF mpack hdf-ambari-mpack-3.1.2.0-7

Hi @Vinod Vijayarajan,

AS the error specifies this happens due to some folder exists ( some service) which is there in the mpack.

can you list out :

ls -l /var/lib/ambari-server/resources/common-services/

and spend some time to analyse which Folder exists that has the contents of mpack . you can unzip the mpack in seperate location and compare it with above folder and see which is the folder that exits in there and take backup and remove those.

Hope this helps you. please accept answer if it did.

Don't have an account?
Coming from Hortonworks? Activate your account here