Error on importing OVF to content library: HTTP connection to url: null failed with status code: 404 and response message: Not Found. For more information check out the logs.
search cancel

Error on importing OVF to content library: HTTP connection to url: null failed with status code: 404 and response message: Not Found. For more information check out the logs.

book

Article ID: 393193

calendar_today

Updated On:

Products

Issue/Introduction

When trying to import OVF files to a content library, vSphere Web Client will fail with the error: "HTTP connection to url: null failed with status code: 404 and response message: Not Found. For more information check out the logs."

 

└─$ grep '404 and response message' vsphere_client_virgo.log

[<TIMESTAMP>] [ERROR] http-nio-5090-exec-27         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.
[<TIMESTAMP>] [ERROR] http-nio-5090-exec-26         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.
[<TIMESTAMP>] [ERROR] http-nio-5090-exec-22         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.
[<TIMESTAMP>] [ERROR] http-nio-5090-exec-29         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.
[<TIMESTAMP>] [ERROR] http-nio-5090-exec-23         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.
[<TIMESTAMP>] [ERROR] http-nio-5090-exec-31         c.v.v.client.h5.admin.controllers.ContentLibraryUploadHandler     HTTP connection to url: null failed with status code: 404 and response message: Not Found.

 

envoy-access-####.log will show this:

<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.371Z PUT /external-vecs/http1/VCENTER.FQDN/443/cls/data/<CL_PID>/TEMPLATE%2520WITH%2520SPACE%2520IN%2520THE%2520NAME.ovf HTTP/1.1 404 via_upstream - 13286 682 3 2 0 127.0.0.1:44924 127.0.0.1:1080 127.0.0.1:33128 127.0.0.1:16666
<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.370Z PUT /external-vecs/http1/VCENTER.FQDN/443/cls/data/<CL_PID>/TEMPLATE%2520WITH%2520SPACE%2520IN%2520THE%2520NAME.mf HTTP/1.1 404 via_upstream - 454 682 5 2 0 127.0.0.1:44918 127.0.0.1:1080 127.0.0.1:49036 127.0.0.1:16666
<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.372Z POST /invsvc/vmomi/sdk/ HTTP/1.1 200 via_upstream - 2391 534 3 3 0 127.0.0.1:56246 127.0.0.1:443 127.0.0.1:34774 127.0.0.1:10080
<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.365Z PUT /ui/admin-ui/libraryimport/import?url=https%3A%2F%2FVCENTER.FQDN%3A443%2Fcls%2Fdata%2F<CL_PID>%2FTEMPLATE%2520WITH%2520SPACE%2520IN%2520THE%2520NAME.mf HTTP/2 500 via_upstream - 454 131 12 11 0 CLIENT_IP:51465 VCENTER_IP:443 127.0.0.1:38480 127.0.0.1:5090
<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.373Z POST /invsvc/vmomi/sdk/ HTTP/1.1 200 via_upstream - 2391 534 5 4 0 127.0.0.1:56250 127.0.0.1:443 127.0.0.1:36768 127.0.0.1:10080
<TIMESTAMP> info envoy[###############] [Originator@6876 sub=Default] 2025-03-14T08:33:14.366Z PUT /ui/admin-ui/libraryimport/import?url=https%3A%2F%2FVCENTER.FQDN%3A443%2Fcls%2Fdata%2F<CL_PID>%2FTEMPLATE%2520WITH%2520SPACE%2520IN%2520THE%2520NAME.ovf HTTP/2 500 via_upstream - 13286 131 13 12 0 CLIENT_IP:51465 VCENTER_IP:443 127.0.0.1:38466 127.0.0.1:5090

 

Environment

vCenter Server Appliance 7.0 U2.

Cause

The issue happens because the import process should be received as "%20", not "%2520" to be valid as URL address due to the space, but the URL conversion is causing the "%" character to be converted as "%25"

For instance:

Instead of TEMPLATE%2520WITH%2520SPACE%2520IN%2520THE%2520NAME.ovf it suppose to be TEMPLATE%20WITH%20SPACE%20IN%20THE%20NAME.ovf

 

Resolution

This is resolved on newer versions of vCenter (vCenter Server 7.0 Update 3s and above), update/upgrade vCenter to a newest version available.

 

Workaround:

Use OVF templates with no space.

If you have an OVF template that is already exported with spaces and do not have an way to export it again, you can use the following steps to rename the OVF:

  1. Rename the files related to the template to have no space (for instance change "template with space in the name" to "template-with-space-in-the-name".

  2. Edit the template-with-space-in-the-name.ovf file and replace all entries that has reference to the old name with the new name.

  3. Select the content of the OVF file and copy it to clipboard.

  4. Use a SHA265 hash generator and paste the content of the OVF file to it.
    For instance an online tool like this: https://tools.keycdn.com/sha256-online-generator
    Or use the command sha256sum in vCenter (create a file with the contents of the ovf and run sha256sum file.ovf)

  5. Copy the new hash generated (64 characters ID).

  6. Edit the template-with-space-in-the-name.mf file and replace the hash of the template-with-space-in-the-name.ovf contents obtained on steps 4 and 5.

  7. Also replace inside the template-with-space-in-the-name.mf the name of the files to have no spaces like you did for the OVF.

  8. Try to import the OVF again.