Skip to main content
Delphix

Provision or SnapShot fails with error "BASH_FUNC_module(): line 0: syntax error near unexpected token `)'" (KBA5523)

 

KBA

KBA# 5523

 

Issue

Provisioning or Snapshot of dSource or VDB may fail with error output which includes

 

BASH_FUNC_module(): line 0: syntax error near unexpected token `)'
BASH_FUNC_module(): line 0: `BASH_FUNC_module() () { eval `/usr/bin/modulecmd bash $*`'
error importing function definition for `BASH_FUNC_module'


This issue is due to an incompatibility between the version of bash shipped with Delphix and the "environment-modules" package installed on the host.

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

Resolution

To resolve the issue the following options are available:

  1. If environment-modules is not used on the host, the environment-modules package can be uninstalled.
  2. Modules can be disabled for the specific Delphix os user by adding the following to the end of the ~/.bashrc file ( or appropriate shell RC file if bash is not the default ). 
unset module

 


Troubleshooting

The issue can be tested by manually running the bash executable shipped in the Delphix toolkit directory. If no error is returned, then the host is not affected. 

cat test.sh
echo "test"
/<toolkit path>/Delphix_COMMON_<engine_uuid>_<os_user>_host/scripts/bash/linux_x86/bin64/bash ~/test.sh
/<toolkit path>/Delphix_COMMON_<engine_uuid>_<os_user>_host/scripts/bash/linux_x86/bin64/bash: BASH_FUNC_module(): line 0: syntax error near unexpected token `)'
/<toolkit path>/Delphix_COMMON_<engine_uuid>_<os_user>_host/scripts/bash/linux_x86/bin64/bash: BASH_FUNC_module(): line 0: `BASH_FUNC_module() () {  eval `/usr/bin/modulecmd bash $*`'
/<toolkit path>/Delphix_COMMON_<engine_uuid>_<os_user>_host/scripts/bash/linux_x86/bin64/bash: error importing function definition for `BASH_FUNC_module'
test
[ora12201@rhel74-ora-tgt ~]$

 


Related Articles

The following articles may provide more information or related information to this article: