Pivotal Knowledge Base

Follow

HTTP method PUT not supported for URI Error while installing PCF® on vCenter

Environment

Product Version
Pivotal Cloud Foundry® (PCF) 1.6 to 1.7

Symptom

When deploying the Ops Manager Director via Ops Manager, it always fails during the uploading of the env.json file to datastore.

Error Message:

The error log entries from the Ops Manager are shown below:

/home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/file_provider.rb:38:in `block in upload_file': Could not upload file 'https://169.52.34.180/folder/vm-abdf114c-4120-4dde-8905-b354fbaebe9c/env.json?dcPath=DC_NewDatacenter&dsName=CloudPOC-2', received status code '400' (RuntimeError)
from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:9:in `block in retry_block'
from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:7:in `times' 
from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:7:in `retry_block' 
from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/file_provider.rb:28:in `upload_file' 
from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi- 
... 
Exited with 1.

The error messages from vCenter logs are the following:

2016-03-01T17:52:22.514+08:00 [02924 warning 'HTTP server'] Vmacore::Http::UnimplementedRequestHandler: HTTP method PUT not supported for URI /folder/vm-533abdc7-1c34-42c8-8273-68fbab222bd4/env.json?dcPath=datacentername&dsName=datastorename

Cause 

The BOSH vSphere CPI uploads files to vSphere via REST API https://<vcenter IP>/folder/<path on datastore>/<filename>?dcPath=<datacenter name>&dsName=<datastore name>

The upload files cannot be uploaded because vCenter was not configured to enable HTTP datastore access.

Resolution

Follow these steps to resolve this issue:

  1. Go to vCenter under directory. vCenter directory may vary depending on vCenter installation. If it is installed on Windows it is usually C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter. If installed in Linux, it is usually under /etc/vmware-vpx/vpxd.cfg.
  2. Edit vpxd.cfg.
  3. Remove the line 
    <enableHttpDatastoreAccess>false</enableHttpDatastoreAccess>.
  4. Save changes to vpxd.cfg.
  5. Restart the vCenter Service.
  6. Redeploy the Ops Manager.

Additional Information 

For further information, please refer to the following resources:

Comments

Powered by Zendesk