Sep 7, 2012

Moving Citrix Data Store & Data Collector

Moving Citrix Data Store & Data Collector

If you only have a small number of Citrix Presentation Servers (now XenApp), you can use a Access database to store farm information instead of rolling a full-scale SQL server. (Citrix only recommends this for small environments!)

There are two types of roles:

  • the Data Collector manages dynamic information about the servers in a zone (e.g. usage and load of servers and published applications, load balancing information, sessions, etc.)
  • the Data Store provides persistent information about the farm (e.g. configuration of farm, published applications, policies, etc.)

Since we had some problems with the server the Data Store was on, we decided to move the database to another server. We also had this server configured to be the most preferred Data Collector.

Changing the most preferred Data Collector

This is the easier part since the information is stored in memory. Changing the most preferred Data Collector is simply done via the "Citrix Presentation Server Console".

Open the properties dialog of the farm and select "Zones":

  • select the server you want to become the new data collector and change the preference to "Most Preferred"
  • select the old Data Collector and set the preference to "Default Preference"

On the command line you can use 'query farm' to verify that the most preferred Data Collector has changed. On the output the current Data Collector (should be the most preferred one) is marked with a "D".

Migrating the data store

Migrating the Access database requires slightly more work. First backup the database on the old Data Store with the following command:

  dsmaint backup C:\Backup\Path  

Copy the resulting "mf20.mdb" and the file "C:\Programs\Citrix\Independent Management Architecture\mf20.dsn" from the old server to "C:\Programs\Citrix\Independent Management Architecture\" on the new server.

Run the following command (replace <new_server> with the name of your server) on all servers except the one which should become the new Data Store:

  dsmaint failover <new_server>  

Finally execute the command below on the new Data Store:

  dsmaint config /dsn:"C:\Programs\Citrix\Independent Management Architecture\mf20.dsn"  

Restart the IMA service on all farm servers to activate the new configuration.

That's it! Every server in the farm - except the new Data Store - should now have a registry key "PSServer" in "HKLM/Software/Citrix/IMA" with the name of the new Data Store.


Regards
Mohamed Rafi
GSM :91-9791133997


Imp Citrix Port No

Some Citrix Port Numbers

Not so long ago someone asked me to mail them a list of ports used by Presentation Server, or I suppose we should get used to calling it Citrix XenApp from now on.

1494

This port is used by any client using the TCP protocol to communicate with the Presentation Server. You will need to open this port on your firewall for inbound connections unless you are using some form of encapsulation or encryption. You can change the port using the ICAPORT command but I find it to be more trouble than it is worth.

1604

Called the ICA Browser port this is a UDP port that can be used by the Program Neighbourhood to enumerate applications. You probably won't use this though.

80

This is the default port used by the XML service and is used by clients who enumerate applications with the TCP+HTTP or XML protocol. You will thus need to open this port on your firewall for inbound connections if clients will be using it to locate servers. You can change the port easily enough using the CTXXMLSS command.

443

This is the default SSL. The SSL Relay will use it to secure communications between the Web Interface and the server farm. You could also use it to secure client communication to the web Interface or use it for client connections to the Presentation Server.

5000

The Presentation Server uses this port to communicate with the IBM Db2 server hosting the data store.

1521

This port is used to communicate with the Oracle data store.

1433

The port used to communicate with a Microsoft SQL data store.

2512

This port is used for server to server communication such as when load information is communicated. The port used to access the data store is saved in the HKLM\SOFTWARE\CITRIX\IMA\IMAPORT key on the server containing the data store. All other servers use the port number saved in HKLM\SOFTWARE\CITRIX\IMA\PSSERVERPORT key in the registry to access the data store.  Have a look at IMAPORT to see how to change it.

2513

This port is used by the Presentation Server Console when connection to a server.  Have a look at IMAPORT to see how to change it.

2598

This is the session reliability port number and needs to be opened on your firewall if the ICA Clients will be using session reliability when communication with the server.

27000 and a random port number

This is the port used for communication between the Citrix License server and the Presentation Servers. Remember that the Citrix vendor daemon running on the license server uses a random port. It tracks license usage.


Regards
Mohamed Rafi
GSM :91-9791133997


Citrix Application Enumeration Process

Application Enumeration Process

The application enumeration process is as follows:

  1. A user launches a Web browser then connects to Web Interface.
  2. The Web Interface returns the logon page.
  3. The user types in credentials.
  4. The user's credentials are forwarded from XML then to IMA service in HTTP (or HTTPS) form.
  5. The IMA then forwards them to local Lsass.exe.
  6. The Lsass.exe encrypts the credentials then passes them to the domain controller.
  7. The domain controller returns the SIDs (user's SID and the list of group SIDs) back to Lsass.exe and to IMA.
  8. IMA used the SIDs to search the Local Host Cache (LHC) for a list of applications and the Worker Group Preference policy for that authenticated user.
  9. The list of the applications together with the user's worker group preference policy are returned to the Web Interface.
  10. The Web Interface returns the web page to the web browser. (This completes the application enumeration process).

The application launch process is as follows:

  1. User selects the application by clicking the application icon (such as Microsoft Word).
  2. The selected application data (Microsoft Word) is passed back to Web Interface.
  3. Web Interface passes the Microsoft Word information together with the user's Worker Group Preference policy back to IMA on the XML broker server.
  4. It then forwards to the IMA service on the Zone Data Collector.
  5. The Zone Data Collector tries to find out a least loaded server according to the Worker Group preference list.
  6. When it finds the least loaded server, it sends a query to the Citrix Service Manager of that server to verify whether the server has the required application installed, if the answer is yes, it then provides this server's host ID to the XML broker.
  7. The XML broker translates this host ID into it's IP address by searching the Local Host Cache.
  8. The IP address is then provided to Web Interface (this completes the application resolution).
  9. Web Interface uses this IP address to create the ICA file.
  10. The ICA file is then returned to Web browser on the client machine.
  11. Citrix online Web plug-in uses the ICA file to launch an ICA connection to the least loaded XenApp server.
  12. The XenApp server launches the application for the user.


Regards
Mohamed Rafi
GSM :91-9791133997