VMware Cloud Community
JayDeah
Contributor
Contributor

Inventory service, wrong URL specified, how to change?

just updated my 4.1 vcenter to 5.0 and unfortunately have a problem. it appears that the "inventory service" which listens on 10443 is configured with the wrong URL.

when i try and access webservice things (such as searches) in viclient i get an unable to connect error and the url is HTTPS://domain.local:10443 where it should be https://vcenterserver.domain.local:10443

not wure where it picked this up from but i need to go and change it so that webservices and the web client work properly.

does anyone know where i change this to the correct URL?

Regards

Jim

0 Kudos
11 Replies
JayDeah
Contributor
Contributor

ah, found it in the documentation!

If the actual host name or domain name of the vCenter Server machine does not match the name that was entered at installation, the service does not work. When the host name or domain name of the vCenter Server machine changes after you install vCenter Server, update the configuration information of the inventory service.

1

Stop the vCenter Inventory Service.

a

From the Windows Start menu, select Administrative Tools > Services.

b

Right-click vCenter Inventory Service and select Stop.

2

Open a command prompt.

3

Change directory to Inventory_Service_directory/scripts

The location of the Inventory Service directory is specified during the vCenter Server installation. For example, if you installed vCenter Inventory Service in the default location, run this command.

cd /Program Files/VMware/Infrastructure/Inventory Service/scripts
4

Run the register.bat command to update the stored configuration information of the Inventory Service.

register.bat current_vCenter_Server_fully_qualified_domain_name vCenter_Server_HTTPS_port

For example, if the vCenter Server fully qualified domain name is machinename.corp.com and the HTTPS port is 443, run this command.

register.bat machinename.corp.com 443
5

Restart the vCenter Inventory Service.

a

From the Windows Start menu, select Administrative Tools > Services.

b

Right-click vCenter Inventory Service and select Start.

The vCenter Inventory Service URL configuration is updated.

0 Kudos
towlesd
Contributor
Contributor

Small thing but don't forget to restart "vSphere Web Client" for the Web Site to detect the changes after making the changes JayDeah recommends.

0 Kudos
stjeanl1
Enthusiast
Enthusiast

Thanks!  This worked for me.

0 Kudos
woltage
Contributor
Contributor

Hello there,

I am updating this issue, because I have had same problem on vCenter appliance. No manual entry for Update the vCenter Inventory Service URL Configuration unfortunately.

So what works for me:

vcenter:/ #/etc/init.d/vmware-inventoryservice stop

vcenter:/ # vi /usr/lib/vmware-vpx/inventoryservice/scripts/ds-register.sh

add these 3 lines right after header:

VPXD_HOSTNAME= IP or FQDN of your vcenter appliance (i.e 192.168.1.1)
VPXD_HTTPS_PORT= port (i.e 443)
VPXD_HOSTNAME_CHANGED="yes"

save file and run

vcenter:/ # /usr/lib/vmware-vpx/inventoryservice/scripts/ds-register.sh

after that new IP should be registerred

(you can verify it in /var/vmware/vpxd/startup_hooks_last_env file)

then start inventory service using:

vcenter:/ #/etc/init.d/vmware-inventoryservice start

and restart web-client service

After that web-client should be working properly

Michal

0 Kudos
repa
Contributor
Contributor

Hi,

i tried this, but still get the error message, that the inventory service cannot be found.

in the error message, the false server is listed.

any other hints?

0 Kudos
stjeanl1
Enthusiast
Enthusiast

I did this last October so I can't remember cleary the details but I think I had to restart the server.  Simply restarting the webservices service did not cut it.  

I followed JayDeah's instrcutions.

Luc

0 Kudos
hkraal
Contributor
Contributor

Try this article for renaming your hostname, worked for me:

     http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200993...

0 Kudos
blomoff
Enthusiast
Enthusiast

Hi,

I too am having this same problem. Built vCenter 5 yesterday, all working as expected. Now when trying to setup the web client i get the error thats in this post:

Unable to connect to the vcenter inventory service - https://servername.domainname.com:10443

Now following this guide I run the script and as it flies through it there is a few messages Unable to locate messagesource with name 'messagesource' etc

At the end it states EXECUTION FAILED

Restarted the serices anyways anyway and still have the same issue!

What is going on? Should there be anything populated in the script other than this...

@echo off

REM **********************************************************
REM Copyright 2011 VMware, Inc.  All rights reserved
REM **********************************************************

REM
REM Inventory service registration update script - service must be stopped before
REM running this script
REM
REM Run as:
REM
REM  register.bat <fully-qualified-domain-name> <vCenter-Server-HTTPS-port>

call "%~dp0\exec.bat" "%~dp0" com.vmware.vim.dataservices.provider.util.SetupLocalService -vcurl https://%1:%2/sdk/vimService -providercfg "%~dp0\..\lib\server\config\vc-provider-registration.xml" -servicecfg "%~dp0\..\lib\server\config\dataservice.properties"

0 Kudos
faugusto
Contributor
Contributor

Hi blomoff, how are you?

I'm having the same issue? Did you found a solution? What is the trick?

Thanks!!

-- Regards Fernando
0 Kudos
vAndrew
Enthusiast
Enthusiast

Hi Faugusto sorry about the late reply, ive just replied to your PM aswell, this is blomoff but i've lost my login details so had to create a new account, only had the one post so didnt matter to much Smiley Happy

Spent 5 weeks on a support call with VMware, today the gave a "possible workaround" which didnt work!

Can I ask one thing though, does your search function work in vCenter? Or does it give an error, reason I ask is mine was giving an error, which led me to think it was related to the database. Turns out it wasnt though, but if you get the search error similar to what we had, which was something about:

"Login to the Query Service Failed..."

As i got sick of waiting for VMware to give an answer/fix, especially as this now seems to be a known, and failry common issue. I decided to reinstall vCenter, which has fixed the problems. I can now search away happily and make use of the web client, so, so far all is well.

Therefore I would say to you that reinstalling vCenter is the easiest answer, should only take about 15 minuts or so, probably not even that.

These are the instuctions I followed, shamelessly "borrowed" from another forum:

Uninstall vCenter.

Then delete the 3 folders listed below.

Reinstall vCenter (Pointing to the existing DB and NOT overwriting it)

Reboot the vCenter box. Then reconfigure your web client again.

Try logging into it and all should be well...

C:\Program Files\Vmware\Infrastructure\Inventory Service

C:\Program Files\Vmware\Infrastructure\VirtualCenter Server

C:\ProgramData\VMware\VMware VirtualCenter

You will then probably have to reconnect your hosts to vCenter, but thats a painless task to be honest and clear a few alarms, but other than that it's now running fine.

Hope that helps, let me know how you get on

-- Andrew (VMware VCP-DCV, MCSA)
0 Kudos
sysxperts
Enthusiast
Enthusiast

These instructions worked great for me with the exception that I needed to restart all of the services including vCenter, Inventory and Web Client before things worked properly - full server reboot was not required nor was a reinstall.

Paul Valentino - VCP, EMCCA - @sysxperts @vcommunitytrust - Help the vCommunity one certification at a time! http://www.vcommunitytrust.org/ http://igg.me/p/212476?a=1091980
0 Kudos