Troubleshooting the Horizon Agent

In this lab we look at the impact the network might have for communications between the Agent and the Horizon Broker. JMS requires ports 4001 and 4002 to be open for communications to succeed. In high secure environments where for example Micro-segmentation and Identity Firewall rules are enabled this can be a challenge that needs to be overcome. We will consider what the Admin console shows us and also the logs when communications are broken and also what to look for when we have a healthy environment

Expand or collapse content Part 1. Performing the Break

we will execute a PowerShell script to facilitate a break scenario

  1. On the ControlCenter.techseals.co server
    • on the Desktop
      1. select the START button
        • from the START menu
          1. select and right-click Windows PowerShell ISE
            • from the pop-out
              1. select More > Run as administrator
  1. In the Windows PowerShell ISE window
    • in the Terminal
      • enter cd c:\scripts
        • to select scripts
          • with your keyboard
            • press ENTER
  1. In the Windows PowerShell ISE window
    • PS C:\scripts\ line
      • enter cd .\
      • with your Keyboard
        • select the down arrow to
          • Seselect lab 2. Horizon Agent Troubleshooting
        • press ENTER
        • press ENTER
  1. In the Windows PowerShell ISE window
    • PS C:\scripts\lab 1. Troubleshooting Instant Clone line
      • enter Set-ExecutionPolicy Unrestricted
        • with your Keyboard
          • press ENTER
  1. In the Execution Policy Change window
    • select Yes to All
  1. In the Windows PowerShell ISE window
    • PS C:\scripts\Lab 2. Horizon Agent Troubleshooting>... line
    • enter .\
      • with your Keyboard
        • select the down arrow
          • select disable_firewall_ports.ps1
            • press ENTER
            • press ENTER
  1. In the Security Warning window
    • select Run once
  1. In the Windows PowerShell ISE - Input window
    • below Enter password for  horizon-01a.techseals.co
      • enter Pa$$w0rd
        • select OK
  1. In the Windows PowerShell ISE - Input window
    • below Enter password for  horizon-01b.techseals.co
      • enter Pa$$w0rd
        • select OK
  1. In the Windows PowerShell ISE window
    • note that the script has executed successfully for both Horizon-01a and Horizon-01b
Expand or collapse content Part 2. Identifying the broken results in the Horizon Admin console
  1. On the ControlCenter server
    • launch the Chrome Site 1 - Bangalore shortcut
  1. On the Site 1 - Bangalore browser
    • from the Favourites bar
      • select the Horizon Site 1 shortcut
  1. In the Horizon 8 Admin Console
    • enter the following:-
      • username area
        • enter Administrator
      • password area
        • enter Pa$$w0rd
      • select SIGN IN
  1. In the Horizon 8 Admin Console
    • left menu bar
      • expand Inventory
        • select Desktops
  1. In the Desktop Pools area
    • select W11-INST-BLR
  1. In the W11-INST-BLR area
    • select the Machines tab
  1. In the W11-INST-BLR area
    • Machines tab
      • scroll to the right
        • note the Status of Desktops
          • "Agent Unreachable"

You might have to wait up to five minutes, to see "Agent Unreachable" on both virtual machines

use the refresh icon if necessary

  1. In the Horizon 8 Admin Console
    • left menu bar
      • below Inventory
        • select Farms
  1. In the Farms area
    • select RDS-Farm-BLR
  1. In the RDS-Farm-BLR area
    • select the RDS Hosts tab
  1. In the RDS-Farm-BLR area
    • RDS Hosts tab
      • scroll to the right
        • note the Status of  the Servers is
          • "Agent Unreachable"
Expand or collapse content Part 3. Identifying the broken results in the Horizon Connection Server and Desktop Logs
Expand or collapse content Section 1. Analysis of Horizon server logs
  1. On the ControlCenter server
    • open the Remote Desktops shortcut
      • In Remote Desktops folder
        • open  Site1
  1. In the Site 1 folder
    • select  and launch the Horizon-01a.RDP shortcut

note. You should automatically be logged withe Username - administrator and the password - Pa$$w0rd

  1. In the Horizon Connection server
    • from the Taskbar
      • select the File Explorer shortcut
  1. In the File Explorer window
    • from the menu bar
      • select View
    • In the drop menu to the right
      • below Options
        • select the expand Icon
          • select Change folder and search options
  1. In the Folder Options window
    • select the View tab
  1. In  the Folder Options window
    • View tab
    • below Advanced settings:
      • next to Show hidden files, folders or drives
        • select the radio button
      • next to hide extensions for know file types
        • uncheck the checkbox
      • to close the Folder Options window
        • select OK
  1. In the File Explorer window
    • Quick access bar
      • below This PC
        • select Local Disk (C:)
      • browse to ProgramData > Omnissa > Horizon > logs
      • in the logs folder
        • select the Date Modified column
          • the idea is , to have the most up to date log right at the top of the window
  1. In the File Explorer window
    • logs folder
      • select and right-click the latest debug-2025- xxxx.txt file
        • from dropdown select Edit with Notepad++
  1. In the Notepad++ window
    • scroll down to the bottom of the last log
      • in the menu bar,
        • select the Search tab
      • in the dropdown
        • select Find...
  1. In the Find window
    • next to Find what:
      • enter VM Name:W11-INST-1
    • next to Backward direction
      • select the checkbox
    • to the right of the window
      • select Find Next
  1. In the Notepad++ window
    • Note you have an Error, similar to this....
      • " Unable to create a connection to: [[ServerEntry, hostname=horizon-01b.techseals.co, port=4001]]"
      • note the debug log line number and the date DEBUG stamp
  1. In the Notepad++ window
    • look below and possibly above the existing entry
    • Note that there are similar message of being unable to connect
    • note the debug log line numbers and the date DEBUG stamps
Expand or collapse content Section 2. Analysis of Horizon desktop logs
  1. On the ControlCenter server
    • from your Site 1 - Bangalore browser
      • on the Favourites bar
        • select the vcenter-01a shortcut
  1. On the VMware vSphere login
    • in the username area
    • in the password area
      • enter Pa$$w0rd
    • select LOGIN
  1. In the vCenter admin console
    • Hosts & Clusters inventory
      • expand the BLRCapacity Cluster
      • select W11-INST-2
  1. In the vCenter admin console
    • select W11-INST-2 area
      • select LAUNCH WEB CONSOLE
  1. On the W11-INST-2 Desktop
    • in the top right corner
      • select Send Ctrl+Alt+Delete
    • In the password area
      • enter Pa$$w0rd
    • to the right
      • select the Submit icon
  1. On the W11-INST-2 Desktop
    • from the taskbar
      • select the File Explorer shortcut
  1. In the File Explorer window
    • in the Menu bar
      • next to View
        • select the MORE icon
      • from the pop-up
        • select Options
  1. In the Folder Options window
    • select the View tab
  1. In  the Folder Options window
    • View tab
    • below Advanced settings:
      • next to Show hidden files, folders or drives
        • select the radio button
      • next to Hide extensions for know file types
        • uncheck the checkbox
      • to close the Folder Options window
        • select OK
  1. In the File Explorer window
    • Quick access bar
      • below This PC
        • select Local Disk (C:)
      • browse to ProgramData > Omnissa > Horizon > logs
      • in the logs folder
        • select the Date Modified column
          • the idea is , to have the most up to date log right at the top of the window
  1. In the File Explorer window
    • logs folder
      • select and right-click the latest debug-2025- xxxx.txt file
        • from dropdown select Edit in Notepad
  1. In the Notepad window
    • scroll down to the bottom of the log
    • on the Menu bar
      • select Edit
        • from the dropdown
          • select Find
  1. In the Notepad application
    • Find window
      • in the search area
        • enter Unable to create a connection
      • to the right
        • select the UP arrow
  1. In the Notepad application
    • close the FIND window
    • note the agent is " Unable to connect to JMS server .
      • on the next line, the horizon FQDN and port 4001 are shown as what the agent requires to connect to the Broker
  1. On the W11-INST-2 desktop
    • from the Taskbar
      • select and right-click the START button
        • in the pop up
          • select Shut down or sign out > Sign out
Expand or collapse content Part 4. Performing the Fix

we will execute a PowerShell script to facilitate a reverse of the break scenario

  1. On the ControlCenter.techseals.co server
    • on the Desktop
      1. select the START button
        • from the START menu
          1. select and right-click Windows PowerShell ISE
            • from the pop-out
              1. select More > Run as administrator
  1. In the Windows PowerShell ISE window
    • in the Terminal
      • enter cd c:\scripts
        • to select scripts
          • with your keyboard
            • press ENTER
  1. In the Windows PowerShell ISE window
    • PS C:\scripts\ line
      • enter cd .\
      • with your Keyboard
        • select the down arrow to
          • Seselect lab 2. Horizon Agent Troubleshooting
        • press ENTER
        • press ENTER
  1. In the Windows PowerShell ISE window.
    • PS C:\scripts\Lab 2. Horizon Agent Troubleshooting>... line
    • enter .\
      • with your Keyboard
        • select the down arrow
          • select enable_firewall_ports.ps1
            • press ENTER
            • press ENTER
  1. In the Security Warning window
    • select Run once
  1. In the Windows PowerShell ISE - Input window
    • below Enter password for  horizon-01a.techseals.co
      • enter Pa$$w0rd
        • select OK
  1. In the Windows PowerShell ISE - Input window
    • below Enter password for  horizon-01b.techseals.co
      • enter Pa$$w0rd
        • select OK
  1. In the Windows PowerShell ISE window
    • note that the script has executed successfully for both Horizon-01a and Horizon-01b
Expand or collapse content Part 5. Identifying a healthy Horizon Agent in the Horizon Admin console
  1. On the ControlCenter server
    • launch the Chrome Site 1 - Bangalore shortcut
  1. On the Site 1 - Bangalore browser
    • from the Favourites bar
      • select the Horizon Site 1 shortcut
  1. In the Horizon 8 Admin Console
    • enter the following:-
      • username area
        • enter Administrator
      • password area
        • enter Pa$$w0rd
      • select SIGN IN
  1. In the Horizon 8 Admin Console
    • left menu bar
      • expand Inventory
        • select Desktops
  1. In the Desktop Pools area
    • select W11-INST-BLR
  1. In the W11-INST-BLR area
    • select the Machines tab
  1. In the W11-INST-BLR area
    • Machines tab
      • under Machine
        • notice there is now, a green icon next to your VM
      • scroll to the right
        • note the Status of Desktops is now
          • "Available"
  1. In the Horizon 8 Admin Console
    • left menu bar
      • below Inventory
        • select Farms
  1. In the Farms area
    • select RDS-Farm-BLR
  1. In the RDS-Farm-BLR area
    • select the RDS Hosts tab
  1. In the RDS-Farm-BLR area
    • RDS Hosts tab
      • scroll to the right
        • note the Status of the Servers is now
          • "Available"
Expand or collapse content Part 6. Identifying a healthy Horizon Agent in the Connection Server and Desktop Logs
Expand or collapse content Section 1. Analysis of Horizon server logs
  1. On the ControlCenter server
    • switch to the Horizon-01a.RDP session

note. You should still have an RDP session to the Horizon-01a broker established and logged in with the Username - administrator and the password - Pa$$w0rd

  1. On the Horizon-01a server
    • in the Reload window
      • select Yes

note. You should still have Notepad++ open and the debug log active > If you dont go back to Part 3 and reopen your debug log with Notepad++

  1. In the Notepad++ window
    • scroll down to the bottom of the last log
      • in the menu bar,
        • select the Search tab
      • in the dropdown
        • select Find...
  1. In the Find window
    • next to Find what:
      • enter VM Name:W11-INST-1
    • next to Backward direction
      • validate that the checkbox is enabled
        • select Find Next
  1. In the Notepad++ window
    • Note you have no new further Errors, similar to this.... you will still have the old entries, but no new entries
      • " Unable to create a connection to: [[ServerEntry, hostname=horizon-01b.techseals.co, port=4001]]"
      • validate  debug log line number and the date DEBUG stamp from before
  1. In the Notepad++ window
    • validate that there are no further DEBUG logs related to the W11-INST-1 virtual machine.
    • notice that there are no further DEBUG logs for the RDS servers.
    • validate  debug log line number and the date DEBUG stamp from before
Expand or collapse content Section 2. Analysis of Horizon desktop logs
  1. In the vCenter admin console
    • Hosts & Clusters inventory
      • BLRCapacity Cluster
        • select W11-INST-2
  1. In the vCenter admin console
    • select W11-INST-2 area
      • select LAUNCH WEB CONSOLE
  1. On the W11-INST-2 Desktop
    • in the top right corner
      • select Send Ctrl+Alt+Delete
    • In the password area
      • enter Pa$$w0rd
    • to the right
      • select the Submit icon
  1. On the W11-INST-2 Desktop
    • from the taskbar
      • select the File Explorer shortcut
  1. In the Site 1 Bangalore Browser
    • select and switch to the W11-INST-2
  1. On the W11-INST-2 Desktop
    • from the taskbar
      • select the File Explorer shortcut
  1. In the File Explorer window
    • Quick access bar
      • below This PC
        • select Local Disk (C:)
      • browse to ProgramData > Omnissa > Horizon > logs
      • in the logs folder
        • select the Date modified column
          • the idea is , to have the most up to date log right at the top of the window
  1. In the File Explorer window
    • logs folder
      • select and right-click the latest debug-2025- xxxx.txt file
        • from dropdown select Edit in Notepad
  1. In the Notepad window
    • scroll down to the bottom of the log
    • on the Menu bar
      • select Edit
        • from the dropdown
          • select Find
  1. In the Notepad application
    • Find window
      • in the search area
        • enter Unable to connect to JMS server
      • to the right
        • select the UP arrow
  1. In the Notepad application
    • close the FIND window
    • note the agent is " Unable to connect to JMS server " message
      • this was the same message as before
    • note its a ReconnectTask-agent
  1. In the Notepad application
    • scroll down and look out for JMS_STATE_PAIRING
    • a few lines down, look out for
      • "OK response" for HORIZON-01A
        • and
      • "OK response" for HORIZON-01B

Conclustion

What we have seen in this lab is the effect the network can have on communication between the the Horizon Agent and the Broker. We have identified logs we can use and we have seen the nature of messages we can look out for in both a healthy and broken environment

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.