JustRandomMe
Contributor
Contributor

Problem with Get-Tag and Get-TagAssignment

Jump to solution

All of a sudden I get errors in my existing scripts which use Get-Tag or Get-TagAssignment.

This is the error:

get-tag : 19/10/2017 15:15:20 Get-Tag vSphere single sign-on failed for connection '/VIServer=domain\admin@vcenter.domain.local:443/'. Future operations which require single sign-on on this connection will fail. The underlying cause was: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

At line:1 char:1

+ get-tag -Name *SQL*

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

    + CategoryInfo          : NotSpecified: (:) [Get-Tag], CisException

    + FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTag.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTag

Whenever I search for the error, I only see resolutions for WCF applications/services...

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Then you better open a SR, this is a known issue, but the more report it ...

And yes, PowerCLI is supported for these kind of issues, see PowerCLI Support Breakdown


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
18 Replies
LucD
Leadership
Leadership

Did you check in the Web Client if there is a service (Administration-System Configuration-Services) that has a warning or is in a critical state?

The fact that the message queue seems to have reached the maximum quota, could indicate that there is a service in trouble.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
JustRandomMe
Contributor
Contributor

Hi,

Just checked to make sure, but VCenter reports 20 good services and 7 not applicable.

Also already update VCSA to the latest version (6.5.0.10100 Build 6671409) this morning, just to make sure.

So both VCenter / local machine were rebooted.

0 Kudos
LucD
Leadership
Leadership

There have been somewhat similar mentions of failing ssi.

Did you try the following:

  • connect to the vCenter with a FQDN
  • connect to only 1 vCenter
  • uninstall/install PowerCLI


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
JustRandomMe
Contributor
Contributor

we always connect using FQDN (just tried not fully qualified to make sure, but the same thing happens)

we also only have 1 vcenter

Uninstalled powercli this morning (6.5.0) and installed the latest gallery version

0 Kudos
LucD
Leadership
Leadership

Then you better open a SR, this is a known issue, but the more report it ...

And yes, PowerCLI is supported for these kind of issues, see PowerCLI Support Breakdown


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
JustRandomMe
Contributor
Contributor

Alright,

Thanks for the assistance

0 Kudos
flkurt
Contributor
Contributor
We have come across this same issue.  It appears to be related to the size of the user's token.  A large number of group memberships can cause this.  Using administrator@vsphere.local for credentials is a work around.
0 Kudos
chaston
Contributor
Contributor
We are also experiencing this issue, any status update from VMware?
0 Kudos
lmaxfield
Contributor
Contributor

Just wanted to note that this still appears to be an issue even with the latest version of PowerCLI (11.0.0 build 10380590) when using pass-through authentication to connect to a vCenter (not specifying credentials for Connect-VIServer). When using pass-through auth, the various Tag cmdlets fail with the "vSphere single sign-on failed for connection" error message that was posted above.

However, if I create a credential object and pass that to Connect-VIServer, the Tag cmdlets work. E.g.,

$cred = Get-Credential

Connect-VIServer vcenter -Credential $cred

This works if you're running things by hand, but is not a great workaround if you're trying to use the Tag cmdlets in an unattended script.

0 Kudos
LucD
Leadership
Leadership

If the problem is not yet fixed,and while waiting for that fix, you could use my rCisTag module.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
andvm
Enthusiast
Enthusiast

Have a .csv file with the VM names in first column and VM tags I want to assign them in the subsequent columns (Tags already created on the VCSA)

Can the rCisTag be used to complete the above as the Tag commands (Get-Tag etc..) seems to be still not working even with latest powercli (using VCSA 6.5U2)

If you can provide please provide an example

Thanks

0 Kudos
LucD
Leadership
Leadership

Did you try that with PowerCLI 11.3.0, which we released a couple of hours ago?
The Tag cmdlets have been rewritten, they are a lot faster now.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
andvm
Enthusiast
Enthusiast

I re-installed PowerCLI today - version is 11.3.0 build 13990089

Is the one you are referring newer then the above?

0 Kudos
LucD
Leadership
Leadership

No, that is the latest one, released today


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
andvm
Enthusiast
Enthusiast

aware of any workaround please since its not fixed yet?

0 Kudos
LucD
Leadership
Leadership

That's a bummer.

The rCisTag module provides the same set of cmdlets as the regular Tag related cmdlets in PowerCLI.
Just the name has been slightly changed, for example, the Get-Tag cmdlet becomes the Get-rCisTag cmdlet.

Have you also looked at another community module named VMware.Community.CISTag , it tends to be faster than the rCisTag module cmdlets.

See New Community Module for Tag Management - VMware PowerCLI Blog - VMware Blogs

Can you eventually show a mockup of that CSV layout?
What exactly is in there (VMname,TagCategory,TagName...)?

Is there more than 1 tag in a row?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
sewert1
Enthusiast
Enthusiast

This has been fixed in PowerCLI 12.3. At least when the issue was caused by a large Kerberos ticket using pass through authentication, because the size was limited to 12288 byte. Now the limit is 65535.

Sasidhar1234
Enthusiast
Enthusiast

I have installed 12.3 version of PowerCli and rebooted the server, not received the error again. 

0 Kudos