VMware Cloud Community
burdena
Contributor
Contributor

copy-datastoreitem ERROR : Unable to write data to the transport connection: An established connection was aborted by the software in your host machine

Hi, I've had this error on one of your vcenter servers.when trying to upload files via powercli or via curl, both use http POST I believe.

PS D:\Users\myuserid> Copy-DatastoreItem D:\filename.iso $ds.DatastoreBrowserPath -Recurse

Copy-DatastoreItem : Upload of file 'D:\adam.iso' failed. Error message: Unable to write data to the transport connection: An

established connection was aborted by the software in your host machine.

At line:1 char:1

+ Copy-DatastoreItem D:\filenameiso $ds.DatastoreBrowserPath -Recurse

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Copy-DatastoreItem], VimException

    + FullyQualifiedErrorId : Client20_StorageServiceImpl_UploadFile_UploadFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.CopyD

   atastoreItem

This was working up until about 3 weeks ago ! Uploading via the vcenter client is working fine.

vCetner 4.1.0 build 345043

filename.iso is only 6MB in size.

It's logged with VMware but don't seem to be getting anywhere with it, help appreciated.

Reply
0 Kudos
4 Replies
EKardinal
Enthusiast
Enthusiast

Hi,

PS D:\Users\myuserid> Copy-DatastoreItem D:\filename.iso $ds.DatastoreBrowserPath -Recurse

You don't need the -Recurse param if specifying a single file. But this shouldn't cause the error.

Could you verify, that all required ports are open on the vCenter Server?

Look page 18 & 19 at http://www.vmware.com/pdf/vsphere4/r41/vsp_41_esxi_i_vc_setup_guide.pdf

Also check the vCenter services via vSphere Client "Home => Administration => vCenter Service Status".

This was working up until about 3 weeks ago ! Uploading via the vcenter client is working fine.

If you upload data through the vSphere client, you are going to establish a direct connection with a host that has access to the datastore.

PowerCLI uploads the data to the vCenter Server which sends it to a host. According to this, get the output of $ds.DatastoreBrowserPath and try to resolve the given url via nslookup. (Not the whole, just the FQDN after vmstores://)

Regards

Emanuel

Reply
0 Kudos
burdena
Contributor
Contributor

Thanks for the reply.

I had removed the -recurse but clearly left it in my paste oops.

I can happily browse the LUNs via the following

https://FQDNof Vcenter/folder?dcPath=DATACENTRE&dsName=LUNNAME

Which confirms both the service and the ports are open.

The vmstores name within $ds does indeed have the correct FQDN of my vCenter server.

Reply
0 Kudos
EKardinal
Enthusiast
Enthusiast

Hmm, curios. DNS works, services are up.

Are you using a proxy server in the internet settings on the vCenter Host or the PowerCLI Host?

Have you already restarted the whole vCenter Host?

Could you connect with the Connect-VIServer directly to a host and try it again?

Just to note: Your link is stating to your internal address and datastore. Better remove it Smiley Happy

Regards

Emanuel

Reply
0 Kudos
burdena
Contributor
Contributor

Cheers for the heads up on the link I'll test the direct connection tomorrow ( when back at work)

And yes going via a proxy, but I think I tested it without but i will certainly turn it off and try again.

Reply
0 Kudos