When using the HTTP put/get/head methods of accessing files on a datastore, a session is created in vCenter that never gets closed. I don’t have a handle to that session so I can’t close it. Any idea how to close it? We're using vSphere 4.0.
afaik, vifs is only supported when connecting to an ESX(i) host directly, it doesn't support vCenter?
If you take a look at the documentation, it states the following:
The vifs command performs common operations such as copy, remove, get, and put on files and directories. The command is supported against ESX/ESXi hosts but not against vCenter Server systems.
I've tried this in the past and it won't work if you try vCenter and specify the path that way, I'm curious on how you're identify the session is related to vifs on vCenter? It may be a separate session between vCenter & ESX(i) for periodic polls via vpxa/hostd back to vCenter server and not related to your vifs call
I'm not using vifs. I have a C# app I wrote that makes simple HTTP put/get method calls using the documented URL syntax:
https://{vcenter}/folder/{somepath/somefile}?dcPath={somedatacenter}&dsName={somedatastore}
In the vCenter client I can see sessions being created when the calls are made, but they are not closed when the methods complete.
The same problem occurs when I try to download a file using a browser. Session is created in vCenter but not closed when the download completes or when the browser is closed.
Gotcha, yea vifs basically implements the same HTTP put/get .. but last time I checked, it was not supported on vCenter, perhaps this has changed recently? In any case, yea that would be a problem if your calls are being made but aren't being closed by vCenter, wouldn't surprise me if this is a bug and can lead to issues if too many sessions are left open.
I'm surprised this is also the case for the datastore browser? I can't say if this is on purpose, I'm not aware of this being so and as you know once the session is left idle > 30min it'll get disconnected. You can see if someone from VMware will respond, but in my experience for things like this, it's easier to get a response if you have SnS support and just file a VMware SR for them to confirm/deny the issue.
Very interesting find and thanks for sharing
Yeah, was hoping to catch the eye of someone at VMware. Do you know if it's possible to change the session timeout value?
I don't believe the session timeiout value is configurable, it might be an internal value. I can check with one of my VMware contacts to see if they have any insight to this session issue + timeout. If you need an answer right away, filing an SR with VMware is the best approach. Not many VMware employees frequent the developer forums, so this may or may not be caught by any VMware folks
I´d recommended to verify the "rest" of your code/app.
I am using HTTP put/get heavily without having kept sessions in vCenter at all.
Tos2k
Tos2k - are you working with files on a datastore? Are you using the formatted URL shown above? Is what you're doing documented somewhere?