VMware Cloud Community
krc1517
Enthusiast
Enthusiast

error: login to query service failed

I am trying to search using the search box in the very top right corner of the vsphere client.

Whey I type in the name of a server, it searches for a second and returns an error message: error: login to query service failed

I restarted VC services. Restarted the Web component. This was working last week but not today.

Only thing that has changed was SP2 to SQL 2005 was applied.

anyone seen this and know how to fix it?

0 Kudos
17 Replies
john_gallucci
Enthusiast
Enthusiast

Same problem here. I also noticed that my Storage Views plugin is not working anymore either, vSphere is acting up and we're not quite sure why. It's been installed for over a month now.

We haven't upgraded our SQL server since the initial installation so I don't think that is your problem.

0 Kudos
krc1517
Enthusiast
Enthusiast

Ours started working after our DB was moved to a new SQL server. This wasn't a troubleshooting step. It just so happened we had been planning to move the DB off the VC VM to our corp SQL.

After that, it just started working again.

Maybe deleting and recreating the System DSN might help. Or stopping sql. Stopping VC. Restarting the server(s) and make sure SQL comes up before Virtual Center does....

Good luck.

KC

0 Kudos
PaScKM
Enthusiast
Enthusiast

It works again (for me) when you shrink the database (files and db). After this it all works.

(Problem occured when patching MS SQL 2005 nonSP to SP3)

0 Kudos
kgroat
Contributor
Contributor

Depending on how the SQL instance was originally setup, the following may be helpful:

  1. Check the allocation and growth for MDF and LDF files and increase if at all possible (even if for no other reason than to create headroom)

  2. Log off any remote vCenter instances

  3. Restart SQL server

  4. Restart Virtual Center Server

  5. Log back in remotely if necessary

Not only did this fix the issue , but the querying engine responsiveness increased noticeably.

0 Kudos
Jawdat
Contributor
Contributor

Nothing in this post helped me resolve the search probelm, I have tried all that been suggested here but the error "Login to the query service failed" is persistent when the search is used.

Again was working fine, can't tell what changed that caused the probelm, any more ideas will be great.

Instructions provide the steps to do it but you still have to apply your intelect.
0 Kudos
squebel
Contributor
Contributor

Having the same problem here. Hopefully posting will pop this to the top and someone will have some more suggestions.

0 Kudos
Jawdat
Contributor
Contributor

Actually I have managed to resolve this when I was resolving another issue alltogether, it was a long way round though but might worth trying if you have the same symptoms.

The cause is likely a failed VM and or a corrupt db table, the failed VM may have caused the corruption in one or more tables that hold the inventory (vms/storage/network...).

I refer you to another reply I added on another post that might help here.

http://communities.vmware.com/message/1534269#1534269

The resolution I am proposing might help in rebuilding or cleaning the inventory tables involved.

After rejoining the hosts you may need to restart the vCentre server and the database if on another server.

Let me know how you get on and if this helped.

Good luck

Instructions provide the steps to do it but you still have to apply your intelect.
0 Kudos
trink408
Enthusiast
Enthusiast

Something to check is the Windows Firewall as well.. I had this error start happening after moving my vcenter to a new server, some features were blocked by the Windows firewall in Server 2008 R2. I know this is a pretty standard thing to check, but sometimes the simple details are the ones that give us trouble...

0 Kudos
ceddings
Contributor
Contributor

I had to change the following within Advanced

Settings

VirtualCenter.VimApiUrl

VirtualCenter.VimWebServiceUrl

Both

contained the FQDN of the server within AD which was not the valid DNS name.

0 Kudos
JohnDoubleU
Contributor
Contributor

Cheer to ceddings! That was exactly my issue. The VCenter server name was changed and it was not updated here. Many thanks.

0 Kudos
DeanGuilberry
Contributor
Contributor

That worked for me too. I had a work around for my workstation which was to put the correct server name/ipaddress into the hosts file for my workstation. However everytime other administrators got the Query service errors they would come to me to findout why this occured. After I put the correct entries into the Advanced Settings of the VSphere server all workstations are now happy.

0 Kudos
peobe
Contributor
Contributor

Perfect - solved my problem.

0 Kudos
JohnnyQuad
Contributor
Contributor

I ran into the same problem in a test environment running servers in Workstation and then trying to connect with my PC.  My PC was not part of the domain and not using the same DNS.  Therefore I had to add an entry to my HOST file pointing the the address of my VCenter server.  Once I did that everything worked fine.

0 Kudos
dkraut
Enthusiast
Enthusiast

Ceddings hit it on the head, thank you! 

0 Kudos
RLawrance
Contributor
Contributor

This one did the job for me after a domain change.

Thanks alot !

0 Kudos
bobalob
Contributor
Contributor

Of all the things, shrinking the DB fixed the issue for me.

I wonder what the root cause of this is? Oh well, fixed for me now, but if you didn't believe the others that a db shrink would make any difference, I'm here to add weight to this solution.

Thanks

0 Kudos
Jmart21
Contributor
Contributor

I had this same issue on a XP 32-bit workstation.  No fix for it for 32bit XP.

http://www.vmware.com/support/vsphere5/doc/vsphere-esx-vcenter-server-51-release-notes.html

0 Kudos