Installing the K2 Server in a Distributed Environment
After you have installed all the prerequisites, created the service accounts, you are ready to install the K2 Server.
Installing all K2 components using the K2 Service Account is recommended. Log on to the server as the K2 Service Account before installing.
When installing and using K2 with a Developer license, the account used to run the K2 service is always the currently logged-in user. When using a Developer license, the K2 server runs in console mode as the currently logged-in user, and not as a Windows service. K2 uses the currently logged-in user's credentials to connect to the K2 database (when using integrated authentication), and uses the current user’s credentials for certificates, registry keys, and folders required by the K2 service to run. See the topic Accounts used in a K2 Installation for more information.
When updating an expired Developer license, use the information in the article: How to Obtain and Manage K2 License Keys.
Installation steps
- Launch the K2 Setup Manager.
- On the Welcome page, click Next.
- On the Checking for Latest Version page, the installation will verify the version, click Next.
- On the End User License Agreement page, read through the EULA. You must select the I agree to the terms and conditions of the license option before you can continue with the installation. You can print out the EULA for your records. Once you have read the EULA, click Next.
- On the Installation Type page, select the Custom Installation option and type in an Installation Folder, and click Next.
- On the Select Components page, uncheck everything except the K2 Server and K2 Database, then click Next to continue. You cannot install the K2 Server and K2 Database separately.
- On the License Configuration page, provide K2 licensing information.
- On the K2 Server Configuration page, select the appropriate option for this installation (one of the Farm options if this is a Farm deployment, or the standalone server option if this is a single K2 application server in a distributed environment).
- On the K2 Pass-Through Authentication page, if Kerberos is installed select Kerberos. If not, select Windows and click Next to continue.
- On the second K2 Server Configuration page (server port configuration), take note of the ports that are used for communication. It is strongly recommended to leave the default ports as is.
- On the K2 Site Configuration page, type in the URL to the K2 Site (even though we have not configured the K2 Site yet, enter the URL which you will use to access it). If this is a clustered K2 Site, be sure to enter the URL used to access the cluster. Using the fully qualified URL to your K2 Site is preferable.
- On the Database Configuration page, provide the details for the K2 Database
- On the Service Accounts Configuration page, enter in the user account details for the Administrator and K2 Service, and click Next to continue.
- Use the Exchange Server Configuration page to configure the Exchange Server if you are using one.
- If Exchange is being used, integration is configured on the Exchange Integration page.
- On the SmartActions Configuration page, SmartActions are enabled by default.The SMTP Settings page is displayed in place of SmartActions setup if the Use Exchange for mail integration option was not selected on the Exchange Server Configuration page.
- On the Configuration Summary page, validate the settings. You can go back to make any necessary changes, and you can print this page for reference later or copy it to the Clipboard. Once satisfied with your settings, click Next.
- The Additional Actions page shows if there are additional actions to perform as part of the installation. Click Next to continue.
- The Setup Manager will update and show you the progress of the component installation on the Components page.
- Once the installation is done, the Configuration Analysis tool will be available to help troubleshoot any errors detected during the installation.
- When the installation has completed, you will see a Finished page. There will also be a link to the created configuration log file.
Also note that the graphical interface (GUI) to set SPNs is available and started by executing ADSIedit.msc from the Windows > Start > Run menu. How to use ADSIedit is beyond the scope of this document but the simpler command-line method of setting SPNs has been included.
Set SPNs
There are two sets of SPNs that need to be set up for the K2 Service Account:
- K2Server
- K2HostServer
The following placeholders are used in the commands:
- domain\K2 Service Account - The K2 Service Account that runs the K2 Service.
- MachineName - The name of the computer on which the K2 Service is running.
- MachineName.FQDN - The fully qualified domain name of the computer on which the K2 Service is running.
If you have a K2 Server farm running on a cluster, be sure to use the name of the cluster and the fully qualified cluster name instead of a single node's machine name.
Open a command prompt on a server that has the Windows Support Tools installed, and execute the following commands:
- setspn -S K2Server/MachineName:5252domain\K2 Service Account
- setspn -S K2Server/MachineName.FQDN:5252 domain\K2 Service Account
- setspn -S K2HostServer/MachineName:5555domain\K2 Service Account
- setspn -S K2HostServer/MachineName.FQDN:5555 domain\K2 Service Account
The port number may be left out if using default ports.
After the commands have successfully executed, you can verify the SPNs were set by executing the following command:
- setspn -L domain\K2 Service Account
After installing and configuring the K2 Server component, you can easily validate that the K2 Server is functioning properly by running the K2 Service in console mode. Console mode is a useful troubleshooting tool, as all error and informational messages are sent to the console window so you can watch what is going on. It is important that you run the service as the Service Account in order to accurately troubleshoot permissions and other errors.
To run in console mode, perform the following steps:
- Open the Services manager (Start > All Programs > Administrative Tools > Services).
- Scroll down to the K2 Server service, select it and click the Stop Service button.
- Once the service shows as stopped, you can close the Services manager.
- Right-click on the K2 Server item in the Start menu (under Start > All Programs > K2 ) and select Run as...
- Select The following user option, and type in the domain\K2 Service Account as the User Name and password, and click OK.
The K2 Server will start and initialize. You will see several messages starting the various components.
- Info 7003 SourceCode.SmartObjects.Runtime.SmartObjectClientServer not yet Loaded…
- Error 8060 ProcessPacket Error, Authentication With Server Failed : SEC_E_LOGON_DENIED