VMware Cloud Community
JustRandomMe
Contributor
Contributor
Jump to solution

Problem with Get-Tag and Get-TagAssignment

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...

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
18 Replies
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
JustRandomMe
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
JustRandomMe
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
JustRandomMe
Contributor
Contributor
Jump to solution

Alright,

Thanks for the assistance

Reply
0 Kudos
flkurt
Contributor
Contributor
Jump to solution

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.
Reply
0 Kudos
chaston
Contributor
Contributor
Jump to solution

We are also experiencing this issue, any status update from VMware?
Reply
0 Kudos
lmaxfield
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

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

Is the one you are referring newer then the above?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

No, that is the latest one, released today


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

Reply
0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

aware of any workaround please since its not fixed yet?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
sewert1
Enthusiast
Enthusiast
Jump to solution

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
Jump to solution

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

Reply
0 Kudos