|Pivotal Cloud Foundry® (PCF)||1.5.x, 1.6.x, 1.7.x|
When attempting to run BOSH commands, such as "bosh vms", "bosh status", or "bosh instances", you get an error similar to the following:
ubuntu@pivotal-ops-manager:/var/tempest/workspaces/default/deployments$ bosh status Failed to load plugin /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_cli_plugin_micro-1.3146.6.0/lib/bosh/cli/commands/micro.rb: /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/sqlite3/sqlite3_native.so: failed to map segment from shared object: Cannot allocate memory - /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/sqlite3/sqlite3_native.so
The key component to this error is the "
failed to map segment from shared object: Cannot allocate memory" part.
The cause of this issue is that the director VM doesn't have enough memory to run the command, thus resulting in the error that you are seeing.
In the instance where this issue was observed, the memory of the Director VM was set to 2GB. The recommended minimum amount of memory for the Director/Ops Manager VM is 4GB. This setting can be changed in Ops Manager, in the resource config inside of the Ops Manager Director Tile. It can also be changed in the VM settings for Ops Manager in your IaaS dashboard, but we recommend changing this value in Ops Manager as changes made directly in the IaaS will not persist beyond the life of the current VM.