13 Replies Latest reply on Aug 25, 2016 9:20 PM by Atul_

    Error in mapping prefixes: Waiting for prefixes map to be fetched from View server

    Vision1988 Novice

      Can't run workload on client VMs, cause error in mapping prefixes.

       

      Here is my ViewPlanner.log:

      2016-08-18 10:57:07,063 DEBUG    Waiting for the prefixes map to be fetched from View server.

      2016-08-18 10:57:12,067 ERROR    Error communicating with ViewPlanner agent in View server. Restart the View                                         Planner agent service in View server and try again.

       

      Viewplanner-viewagent.txt

       

      Sat, 23 Apr 2016 07:42:08 DEBUG    Got the harness root object from the harness: 192.168.80.242

      Sat, 23 Apr 2016 11:42:04 INFO     Getting the prefixes for all the pools

      Sat, 23 Apr 2016 11:42:05 ERROR    Error in mapping prefixes with error: 2004: Error in mapping VM Prefixes to Pools: string indices must be integers, not str

      Traceback:

      Traceback (most recent call last):

        File "C:\Package\listener.py", line 158, in remote_mapPrefixToPool

        File "C:\Package\viewadmin.py", line 137, in mapPrefixToPool

      TypeError: string indices must be integers, not str

       

      Result of debugging of serviceagent.pyc:

       

      PS C:\> python serviceagent.pyc debug

      Debugging service ViewPlannerAgent - press Ctrl+C to stop.

      Staring the ViewPlanner Agent service.

      Starting the twisted server on the machine for harness to send commands....

      192.168.80.242

      Getting the harness root object from the harness: 192.168.80.242

      Adding the callback for getting the root object from the appliance

      Error 0xC0000003 - The instance's SvcRun() method failed

       

       

      Traceback (most recent call last):

        File "C:\Python26\lib\site-packages\win32\lib\win32serviceutil.py", line 806, in SvcRun

          self.SvcDoRun()

        File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\serviceagent.py", line 73, in SvcDoRun

        File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\twisted_interface.py", line 39, in listen

        File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 419, in listenTCP

          p.startListening()

        File "C:\Python26\lib\site-packages\twisted\internet\tcp.py", line 857, in startListening

          raise CannotListenError, (self.interface, self.port, le)

      CannotListenError: Couldn't listen on any:9200: [Errno 10048] Only one usage of each socket address (protocol/network ad

      dress/port) is normally permitted.

       

       

      (null): (null)

       

       

      What's wrong?

        • 1. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
          Atul_ Enthusiast
          VMware Employees

          Hi,

           

          Viewplanner use port 9200 for remote connection, as suggested from your logs this port does not seems to be available for use in viewagent.

          can you check if some other application is using it?

           

          Atul

          • 2. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
            Vision1988 Novice

            Only pythonservice (view agent) itself.

             

            python.png

            • 3. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
              Atul_ Enthusiast
              VMware Employees

              I found few things from viewplanner.log attached by you in another post "Can't running test in passive mode":

               

              1- 2016-08-16 17:23:05,219 ERROR    --- ERROR ---  There was an error connecting to VP agent in View connection server.


              Can you check if communication is working between harness, AD, VC and view agent. you can check this in config tab of viewplanner UI.

               

              2-  2016-08-16 17:27:05,478 INFO     Looking for 1 VMs with prefixes NA in the VMs list

              Client and desktop prefix can not be NA. provide the same prefix for desktop and client which you have used while creating desktop VM pool with Horizon view and client VM's with viewplanner's provision tab.

               

              Atul

              • 4. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                Vision1988 Novice

                1) All connections are working (successefully tested)

                new.png

                2) Now I use another prefix for Desktop VMs but with same bad result:

                 

                new2.png

                 

                Part of log:

                2016-08-22 13:03:46,824 INFO     Looking for 2 VMs with prefixes ckbt in the VMs list:

                2016-08-22 13:03:46,840 INFO     Matching VM ckbt01 with prefix: ckbt

                2016-08-22 13:03:46,841 INFO     VM ckbt01 matched with prefix: ckbt

                2016-08-22 13:03:46,841 INFO     Matching VM ckbt02 with prefix: ckbt

                2016-08-22 13:03:46,841 INFO     VM ckbt02 matched with prefix: ckbt

                2016-08-22 13:03:46,841 INFO     Client VMs found: ['ckbt01', 'ckbt02']

                2016-08-22 13:03:46,841 INFO     Loading AD Info to the data structures is done with adinfo: [{'schedlist': None, 'protocol': 2L, 'name': 'test', 'wrk_FK': 'QuickWordTest_1i', 'poolname': '', 'grp_id': 67L, 'extrainfo': None, 'percent': 100L, 'connections_per_client': 2L, 'deskvms': ['W7-001', 'W7-002', 'W7-003', 'W7-004'], 'rdshtype': 0L, 'clientvms': ['ckbt01', 'ckbt02'], 'workprofile': {'IEbpm': 1L, 'ARbpm': 1L, 'Thinktime': 5L, 'extrainfo': None, 'name': 'QuickWordTest_1i', 'hosttime': 1, 'random': 1, 'Iterations': 1L, 'wpm': 60L, 'video': -1L, 'applist': 'WORD'}, 'clientprefix': 'ckbt'}]

                2016-08-22 13:03:46,844 DEBUG    Getting the configuration option monitor_control.pseudo_perfctr in VM W7-001

                2016-08-22 13:03:46,868 INFO     The value of performance counter for VM W7-001: true

                2016-08-22 13:03:46,868 INFO     Powering on 4 desktop VMs

                2016-08-22 13:03:46,868 INFO     Powering on VMs in test AD group: ['W7-001', 'W7-002', 'W7-003', 'W7-004']

                2016-08-22 13:03:46,869 DEBUG    Powering on the VM: W7-001

                2016-08-22 13:03:46,871 DEBUG    VM W7-001 is powered on. Rebooting the VM...

                2016-08-22 13:03:47,863 DEBUG    Powering on the VM: W7-002

                2016-08-22 13:03:47,866 DEBUG    VM W7-002 is powered on. Rebooting the VM...

                2016-08-22 13:03:48,874 DEBUG    Powering on the VM: W7-003

                2016-08-22 13:03:48,879 DEBUG    VM W7-003 is powered on. Rebooting the VM...

                2016-08-22 13:03:49,908 DEBUG    Powering on the VM: W7-004

                2016-08-22 13:03:49,912 DEBUG    VM W7-004 is powered on. Rebooting the VM...

                2016-08-22 13:03:50,956 INFO     Powering on 2 client VMs

                2016-08-22 13:03:50,957 INFO     Powering on VMs in test AD group: ['ckbt01', 'ckbt02']

                2016-08-22 13:03:50,957 DEBUG    Powering on the VM: ckbt01

                2016-08-22 13:03:50,960 DEBUG    VM ckbt01 is powered on. Rebooting the VM...

                2016-08-22 13:03:51,707 DEBUG    Returning the current status: 0 with message Status: [Powering On --> Desktops: 4,  Clients: 1 ]

                2016-08-22 13:03:52,011 DEBUG    Powering on the VM: ckbt02

                2016-08-22 13:03:52,015 DEBUG    VM ckbt02 is powered on. Rebooting the VM...

                2016-08-22 13:03:53,147 INFO     Operation: poweron_desktops,  Time of Start: Mon Aug 22 13:03:46 2016,  Total time taken: 25.16

                2016-08-22 13:03:53,147 INFO     Operation: poweron_clients,  Time of Start: Mon Aug 22 13:03:50 2016,  Total time taken: 4.49

                2016-08-22 13:03:53,148 DEBUG    Creating 4 users and adding to the AD security group: test

                2016-08-22 13:03:53,149 INFO        Waiting for the threshold number of VMs to register

                2016-08-22 13:03:53,149 INFO     ------------------------------------------------------------

                2016-08-22 13:03:53,165 INFO     Got the NetBIOS domain name: TEST

                2016-08-22 13:03:53,168 DEBUG    Adding the users ['test_1', 'test_2', 'test_3', 'test_4'] to the AD security group: test

                2016-08-22 13:03:53,196 DEBUG    All the users added to the AD security group: test

                2016-08-22 13:03:56,680 DEBUG    Returning the current status: 0 with message Status: [IP Registered: Desktops: 0, Clients: 0 ] [Workload Started on 0 machines ] [ Uploaded results --> Desktops: 0 (0 errors)]

                2016-08-22 13:04:08,316 INFO     New server registration: 192.168.80.177

                2016-08-22 13:04:08,316 INFO     Current registered machines status : [Client required: 2, registered: 0]  [Servers required: 4, registered: 1]

                2016-08-22 13:04:09,717 INFO     New server registration: 192.168.81.106

                2016-08-22 13:04:09,718 INFO     Current registered machines status : [Client required: 2, registered: 0]  [Servers required: 4, registered: 2]

                2016-08-22 13:04:09,845 INFO     New server registration: 192.168.80.224

                2016-08-22 13:04:09,846 INFO     Current registered machines status : [Client required: 2, registered: 0]  [Servers required: 4, registered: 3]

                2016-08-22 13:04:11,587 DEBUG    Returning the current status: 0 with message Status: [IP Registered: Desktops: 3, Clients: 0 ] [Workload Started on 0 machines ] [ Uploaded results --> Desktops: 0 (0 errors)]

                2016-08-22 13:04:12,810 INFO     New server registration: 192.168.81.111

                2016-08-22 13:04:12,811 INFO     Current registered machines status : [Client required: 2, registered: 0]  [Servers required: 4, registered: 4]

                2016-08-22 13:04:16,547 DEBUG    Returning the current status: 0 with message Status: [IP Registered: Desktops: 4, Clients: 0 ] [Workload Started on 0 machines ] [ Uploaded results --> Desktops: 0 (0 errors)]

                2016-08-22 13:05:39,889 INFO     New client registration: 192.168.80.36

                2016-08-22 13:05:39,890 INFO     Current registered machines status : [Client required: 2, registered: 1]  [Servers required: 4, registered: 4]

                2016-08-22 13:05:41,073 DEBUG    Returning the current status: 0 with message Status: [IP Registered: Desktops: 4, Clients: 1 ] [Workload Started on 0 machines ] [ Uploaded results --> Desktops: 0 (0 errors)]

                2016-08-22 13:05:52,427 INFO     New client registration: 192.168.80.35

                2016-08-22 13:05:52,428 INFO     Current registered machines status : [Client required: 2, registered: 2]  [Servers required: 4, registered: 4]

                2016-08-22 13:05:52,428 INFO     Getting the IP address for VM W7-001 from vCenter

                2016-08-22 13:05:52,437 INFO     Got the IP address for VM W7-001: 192.168.80.177

                2016-08-22 13:05:52,437 INFO     Getting the IP address for VM W7-002 from vCenter

                2016-08-22 13:05:52,446 INFO     Got the IP address for VM W7-002: 192.168.80.224

                2016-08-22 13:05:52,446 INFO     Getting the IP address for VM W7-003 from vCenter

                2016-08-22 13:05:52,455 INFO     Got the IP address for VM W7-003: 192.168.81.106

                2016-08-22 13:05:52,455 INFO     Getting the IP address for VM W7-004 from vCenter

                2016-08-22 13:05:52,464 INFO     Got the IP address for VM W7-004: 192.168.81.111

                2016-08-22 13:05:52,464 INFO     Getting the IP address for VM ckbt01 from vCenter

                2016-08-22 13:05:56,014 DEBUG    Returning the current status: 0 with message Status: [IP Registered: Desktops: 4, Clients: 2 ] [Workload Started on 0 machines ] [ Uploaded results --> Desktops: 0 (0 errors)]

                2016-08-22 13:06:07,498 INFO     Got the IP address for VM ckbt01: 192.168.80.35

                2016-08-22 13:06:07,498 INFO     Getting the IP address for VM ckbt02 from vCenter

                2016-08-22 13:06:07,505 INFO     Got the IP address for VM ckbt02: 192.168.80.36

                2016-08-22 13:06:07,505 DEBUG    IP: 192.168.81.111  -->  Name:  W7-004

                2016-08-22 13:06:07,505 DEBUG    IP: 192.168.81.106  -->  Name:  W7-003

                2016-08-22 13:06:07,506 DEBUG    IP: 192.168.80.35  -->  Name:  ckbt01

                2016-08-22 13:06:07,506 DEBUG    IP: 192.168.80.36  -->  Name:  ckbt02

                2016-08-22 13:06:07,506 DEBUG    IP: 192.168.80.224  -->  Name:  W7-002

                2016-08-22 13:06:07,506 DEBUG    IP: 192.168.80.177  -->  Name:  W7-001

                2016-08-22 13:06:07,530 INFO     Registering remaining VMs.

                2016-08-22 13:06:07,530 INFO     Threshold met for the number of machines. Starting the benchmark plan.

                2016-08-22 13:06:07,530 INFO     Waiting for VMs to settle; sleeping for the ramp up time.

                2016-08-22 13:07:15,597 DEBUG    Using View VP Agent to get the pool-desktop map.

                2016-08-22 13:07:15,598 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:07:15,607 ERROR    Error from the remote: Error in mapping prefixes with error: 2004: Error in mapping VM Prefixes to Pools: string indices must be integers, not str

                Traceback:

                Traceback (most recent call last):

                  File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\listener.py", line 194, in remote_mapPrefixToPool

                  File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\viewadmin.py", line 142, in mapPrefixToPool

                TypeError: string indices must be integers, not str

                 

                 

                Unhandled error in Deferred:

                Unhandled Error

                Traceback from remote host -- Traceback unavailable

                2016-08-22 13:07:20,517 DEBUG    Returning the current status: 0 with message Error in mapping prefixes with error: 2004: Error in mapping VM Prefixes to Pools: string indices must be integers, not str

                Traceback:

                Traceback (most recent call last):

                  File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\listener.py", line 194, in remote_mapPrefixToPool

                  File "d:\build\ob\bora-3657232\performance\viewplanner\ViewAgent\Package\C\viewadmin.py", line 142, in mapPrefixToPool

                TypeError: string indices must be integers, not str

                . Please see viewplanner.log for more details

                2016-08-22 13:07:20,603 DEBUG    Waiting for the prefixes map to be fetched from View server.

                ...

                ...

                ...

                2016-08-22 13:15:11,032 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:16,037 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:21,042 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:26,048 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:31,053 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:36,058 DEBUG    Waiting for the prefixes map to be fetched from View server.

                2016-08-22 13:15:41,063 ERROR    Error communicating with ViewPlanner agent in View server. Restart the ViewPlanner agent service in View server and try again.

                • 5. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                  Atul_ Enthusiast
                  VMware Employees

                  Can you provide c:\viewplanner-viewagent.log from viewagent VM.

                  • 7. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                    Atul_ Enthusiast
                    VMware Employees

                    Sun, 24 Apr 2016 07:03:29 INFO     Getting pool info, pbag: {'0': ''}

                     

                    It seems Viewplanner is unable to get pool info from view environment, can you let me know if you have created a desktop pool for W7-001 to 004 Vm's in horizon view?

                    • 8. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                      Vision1988 Novice

                      There are 2 pools now: W7 (W7-001 - W7-010) and VDI, both pools were created throught Horizon 7 Administrator Console that installed at View Connection Server.

                       

                      horizon administrator.png

                      • 9. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                        Atul_ Enthusiast
                        VMware Employees

                        Fri, 29 Apr 2016 07:10:12 INFO     Getting pool info, pbag: {'ErrorCode': '4', 'ErrorText': 'NotAuthorized'}

                         

                        There is an authorization error in  viewplanner-viewagent.log while Viewplanner is trying to get pool info. have your domain user have needed permissions?

                         

                        Although this error was not there in your initial tests:

                        Getting pool info, pbag: {'0': ''}

                         

                        After providing required permissions do following:

                        1. VMware View Planner Agent service in View connection service needs to be restarted.

                        2. you can restart the vdiappd service on the harness.


                        Here is another thread which might help: Error in mapping prefixes; Waiting for prefixes map to be fetched from View server...

                        • 10. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                          Vision1988 Novice

                          What exact permissions do I need for domain user?


                          I have local administrator account with full priveleges and domain account user with Administrator rights, but during installation View Planner Agent with domain acccount had some errors about "Not Administrator user".

                          I reinstalled VMware View Planner Agents via local Administrator account without any errors, nevertheless I had to install all components of View Agent (Twisted Server, PyWin, Zope Inteface) manually because serviceagent.pyc (VMware View Planner Agent service) didn't installed\started automatically with error (no module Zope, no module TwistedServer, etc).

                          I tried to restart View Planner Agent service and vdiappd service on the harness many times but every View planner test I have same result with mapping prefixes error.

                           

                          Result of PowerCLI Shell:

                          PS C:\Program Files\VMware\VMware View\Server\bin> Get-Pool

                          0

                          -

                           

                          Can I diagnose by myself what exactly happens with VDI Pools during test with some PowerCLI commands?

                          • 11. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                            Vision1988 Novice

                            Another error from viewagent.pyc debug listing:

                             

                            Debugging service ViewPlannerAgent - press Ctrl+C to stop.

                            Staring the ViewPlanner Agent service.

                            Starting the twisted server on the machine for harness to send commands....

                            192.168.80.242

                            Getting the harness root object from the harness: 192.168.80.242

                            Adding the callback for getting the root object from the appliance

                            Starting the python twisted reactor....

                            Got the harness root object from the harness: 192.168.80.242

                            Getting the prefixes for all the pools

                            Error in mapping prefixes with error: 2004: Error in mapping VM Prefixes to Pools: string indices must be integers

                            str

                            Traceback:

                            Traceback (most recent call last):

                              File "C:\Package\listener.py", line 158, in remote_mapPrefixToPool

                              File "C:\Package\viewadmin.py", line 137, in mapPrefixToPool

                            TypeError: string indices must be integers, not str

                             

                             

                            Peer will receive following PB traceback:

                            Traceback (most recent call last):

                              File "C:\Python26\lib\site-packages\twisted\spread\banana.py", line 153, in gotItem

                                self.callExpressionReceived(item)

                              File "C:\Python26\lib\site-packages\twisted\spread\banana.py", line 116, in callExpressionReceived

                                self.expressionReceived(obj)

                              File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 514, in expressionReceived

                                method(*sexp[1:])

                              File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 826, in proto_message

                                self._recvMessage(self.localObjectForID, requestID, objectID, message, answerRequired, netArgs, netKw)

                            --- <exception caught here> ---

                              File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 840, in _recvMessage

                                netResult = object.remoteMessageReceived(self, message, netArgs, netKw)

                              File "C:\Python26\lib\site-packages\twisted\spread\flavors.py", line 114, in remoteMessageReceived

                                state = method(*args, **kw)

                              File "C:\Package\listener.py", line 170, in remote_mapPrefixToPool

                             

                             

                            exceptions.UnboundLocalError: local variable 'prefixMap' referenced before assignment

                            • 12. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                              Vision1988 Novice

                              After I reinstalled Windows Server 2012 machine and Horizon Connection Server problem has dissappeared.

                              • 13. Re: Error in mapping prefixes: Waiting for prefixes map to be fetched from View server
                                Atul_ Enthusiast
                                VMware Employees

                                That's good news, Thank you for letting us know.