NetWitness Log Collector Service installation is failing with global.rb file invalid entries.
Issue
NetWitness Log Collector Installation in Admin->Hosts page fails with the below error.
/var/log/netwitness/config-management/chef-solo.log
[2021-11-27T05:55:01+00:00] ERROR: Running exception handlers
[2021-11-27T05:55:01+00:00] ERROR: Exception handlers complete
[2021-11-27T05:55:01+00:00] FATAL: Stacktrace dumped to /var/lib/netwitness/config-management/cache/chef-stacktrace.out
[2021-11-27T05:55:01+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2021-11-27T05:55:01+00:00] FATAL: SyntaxError: /var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb:261: Invalid return in class/module body
return 'deploy_admin'
^~~~~~
/var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb:275: Invalid return in class/module body
return 'password'
^~~~~~
[2021-11-27T05:55:01+00:00] ERROR: Exception handlers complete
[2021-11-27T05:55:01+00:00] FATAL: Stacktrace dumped to /var/lib/netwitness/config-management/cache/chef-stacktrace.out
[2021-11-27T05:55:01+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2021-11-27T05:55:01+00:00] FATAL: SyntaxError: /var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb:261: Invalid return in class/module body
return 'deploy_admin'
^~~~~~
/var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb:275: Invalid return in class/module body
return 'password'
^~~~~~
Removing invalid entries in /var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb file do not help and the entries come back again.
Cause
This issue is due to invalid entries in /var/netwitness/config-management/cookbooks/platform/nw-base/libraries/global.rb file which is being pushed to /var/lib/netwitness/config-management/cache/cookbooks/nw-base/libraries/global.rb file during installation.Resolution
- Please login to Log Collector Host
- Edit /var/netwitness/config-management/cookbooks/platform/nw-base/libraries/global.rb file to remove invalid entries as below.
Sample: Below red highlighted invalid return lines to be removed.
# Get the deployment userid
return 'deploy_admin'
def self.get_deployment_userid
if Chef.node['global'] &&
Chef.node['global']['platform'] &&
Chef.node['global']['platform']['deployment']
Chef.node['global']['platform']['deployment']['userid']
else
get_config_server_property(
'nw.security-client', nil, 'platform.deployment.userid', false
)
end
end
# Get the deployment password
return 'password'
return 'deploy_admin'
def self.get_deployment_userid
if Chef.node['global'] &&
Chef.node['global']['platform'] &&
Chef.node['global']['platform']['deployment']
Chef.node['global']['platform']['deployment']['userid']
else
get_config_server_property(
'nw.security-client', nil, 'platform.deployment.userid', false
)
end
end
# Get the deployment password
return 'password'
3. Then Try to install Log Collector Service which will be successful now.
Product Details
NetWitness Product Set: NetWitness PlatformNetWitness Product/Service Type: NetWitness Log Collector
NetWitness Version/Condition: 11.X,12.X
Platform: CentOS 7 / Alma
Summary
This document outlines the procedure to remove invalid entries fro global.rb file.
Approval Reviewer Queue
Technical approval queue