Setting Up Kaazing WebSocket Gateway - HTML5 Edition
This guide helps you set up Kaazing WebSocket Gateway in your environment.
I want to use Kaazing WebSocket Gateway:
Setting Up Kaazing WebSocket Gateway Locally
Setting up Kaazing WebSocket Gateway on your local computer is recommended if you want to quickly try out the Gateway. Let's get started!
To set up the Gateway on your local computer, perform the following steps:
- Ensure your system meets the system requirements.
For specific environment and operating system information, see the README.txt file.
- Download Kaazing WebSocket Gateway - HTML5 Edition for your platform from the Kaazing download page.
What are my download options?
The following matrix shows the download options available for each operating system platform.
Operating System Installer Compressed File (zip or tar.gz)Repository Windows 64-bit(1) or 32-bit(2)
N/ALinux (Debian) All Linux, UNIX, and Mac
N/AN/A1The 64-bit Windows download requires 64-bit requires 64-bit Java JDK or JRE that can be installed only on Windows 64-bit operating systems.
2The 32-bit Windows download requires 32-bit Java JDK or JRE. Note: You can install the 32-bit JVM on a 64-bit or 32-bit operating system. To determine if your JVM is 64-bit or 32-bit, enter java -version at the command-line prompt. Typically, "64-bit" is reported for a 64-bit JVM, but nothing is reported if the JVM is the 32-bit version.
You can choose the Windows or Linux installer to install the Gateway into conventional operating system locations and automatically run the Gateway as a service. If you choose to unpack the .zip for Windows or .tar.gz for Linux, UNIX, or Mac), then you can uncompress the Gateway to any directory location and run it in place. For Debian-based Linux systems, you can choose "Install via repository" from the download page to add the Kaazing repository to your Linux repositories and automatically run the Gateway as a service.
For each option shown in the matrix except Repository, you can download either the Gateway Only or Gateway + Documentation + Demos:
- Gateway Only downloads: Contain only the Gateway for experienced users who are ready to use the Gateway in production.
- Gateway + Documentation + Demos downloads: Contain the Gateway plus documentation and demos and provide a great way to become familiar with the Gateway.
- Install the Gateway for your platform either by unpacking a compressed download of the Gateway or by running one of the the Gateway installers.
You can use the Windows or Linux installer to install the Gateway into conventional operating system locations and automatically run the Gateway as a service. If you choose to unpack the .zip for Windows or .tar.gz for Linux, UNIX, or Mac), then you can uncompress the Gateway to any directory location and run it in place.
How do I unpack the compressed download of the Gateway (.zip for Windows or .tar.gz for Linux, UNIX, or Mac)
- How do I unpack the compressed download?
You can unpack the download into a directory of your choice (for example, C:\kaazing or /home/username/kaazing). Unpacking the download creates a directory containing the Gateway. This directory is referred to as GATEWAY_HOME in the documentation.
On Windows you can unpack the Gateway .zip file using Windows Explorer, and on Linux, UNIX, or Mac you can unpack the .tar.gz file with the following command:
tar xvfz tar-file-name.tar.gz
Standard UNIX Tar does not always handle long path names correctly (this is a known issue), so it is better to use GNU Tar. GNU Tar is the default on Linux but on Solaris and OpenSolaris (or any other non-Linux platforms) it is best to start GNU Tar (gtar) from the directory /usr/gnu/bin/gtar or by using one of its links: /usr/bin/gtar or /usr/sfw/bin/gtar.
- Follow the instructions in steps 4, 5, and 6 to start the demo services, start the Gateway, and verify the Gateway setup.
How do I install the Gateway using the Windows installer?
Windows (32-Bit or 64-Bit) Installation:
- Login to your Windows machine using an account that has administrator privileges.
- Invoke the Kaazing WebSocket Gateway - HTML5 Edition Windows Installer Setup Wizard either by double-clicking the kaazing-websocket-gateway-edition-version-type.msi file that you downloaded or by running it at the command prompt. For example, the following command invokes the 64-bit installer:
msiexec /i kaazing-websocket-gateway-html5-3.5.1-x64.msi
- Follow the on-screen instructions to proceed through the setup wizard and note the following:
- You cannot install both Windows 64-bit and 32-bit of the same Gateway on the same machine.
- The default installation includes the Gateway, the documentation, and the demos. To install the Gateway without documentation and demos, click the down arrow next to "Extras (Demos, Documentation, etc.)" and select Entire feature will be unavailable from the drop-down list as shown in the following figure:
Figure: Installing the Gateway without Installing Documentation and Demos - On the Java Installation Directory page, you are prompted to enter the root directory of your Java JDK or JRE software installation. For example: C:\Program Files\Java\jdk1.6.0_29\. Before the Gateway is installed, the setup wizard verifies that the Java installation directory is valid (for example, C:\temp is invalid), but the wizard does not validate if it is a 64-bit or a 32-bit Java installation. Important: Choose a Java installation that matches the word size (64-bit or 32-bit) of the Windows installer you are running. To verify that the Gateway started correctly as a service, look at the log file in GATEWAY_HOME/log/service.log that is generated when the service is started or stopped.
- You can reenter the setup wizard at any time to change, repair, or remove the Gateway installation.
- The setup wizard installs the Gateway and adds the new files in the GATEWAY_HOME.
GATEWAY_HOME: The installer creates the default GATEWAY_HOME destinations as follows, where edition refers to the product edition (for example, html5 or jms) and version refers to the version number (for example, 3.5):
- For a 64-bit installation on a 64-bit Windows system, or for a 32-bit installation on a 32-bit Windows system:
C:\Program Files\Kaazing\edition\version\Gateway - For a 32-bit installation on a 64-bit Windows system:
C:\Program Files (x86)\Kaazing\edition\version\Gateway
Gateway Service: The Gateway service starts automatically and verifies that the Java installation directory that you supplied to the setup wizard is a valid 64-bit or a 32-bit Java installation. Errors are recorded in the Kaazing service log (C:\Program Files\Kaazing\edition\version\Gateway\log\service.log).
Patching: When running the Windows Installer Setup Wizard to install a Gateway patch (for example, patching 3.5.2 to 3.5.3), the installation process does not overwrite user-modified files under the GATEWAY_HOME/conf directory when the patch is applied. However, any unmodified files might be overwritten by newer replacement files.
Upgrading: When running the Windows Installer Setup Wizard to install the next release of the Gateway (for example, upgrading from release 3.4 to 3.5), the newer software release is installed in a separate directory that is at the same level in the directory structure as the earlier one. Earlier releases of the Gateway are not overwritten or removed. For example, html5\3.4 and html5\3.5 are separate but parallel directories. Note that you cannot run both releases at the same time unless you change the ports on one or the other.
- For a 64-bit installation on a 64-bit Windows system, or for a 32-bit installation on a 32-bit Windows system:
- Continue to step 4 to start the demo services and then to step 6 to verify the Gateway setup.
Because the installation procedure automatically starts the Gateway as a service, you can skip step 5 that starts the Gateway.
How do I install the Gateway using the Debian-based Linux installer?
Debian-based Linux Installation:
- Install the Gateway either by double-clicking the Debian installer for the Gateway, or by entering the dpkg -i kaazing-gateway-package-name.deb command, where package-name is the Gateway package you downloaded. For example:
sudo dpkg -i kaazing-gateway-html5-3.5-3.5.1.5.deb
Notes: For Linux systems, the Documentation and Demos download requires that you install the Gateway Only download first.
sudo dpkg -i kaazing-gateway-html5-3.5-extras-3.5.1.5.deb
- You may choose to install the Gateway Only download and then the Documentation and Demos download, or install both using the Install via repository option. To download and install the Linux repository, click the "Install via repository" button and follow the instructions on the Gateway Download page.
- If you accidentally install Documentation and Demos before you install the Gateway Only download, then the installation stops and displays an error message. For example: dpkg: dependency problems prevent configuration of kaazing-gateway-html5-3.5-extras. If you get this error, then install the Gateway Only download before installing Documentation and Demos.
- The installation creates the Gateway directory structure and starts the Gateway automatically.
The installer creates the Gateway directory structure following the Linux Filesystem Hierarchy Standards.
Directory Description Patches and Upgrades /usr/share/kaazing/edition/version/ This is the GATEWAY_HOME and it contains libraries, such as JAR files and startup scripts required to run the Gateway. It also contains the README.txt file.
This is a read-only directory.
Example: /usr/share/kaazing/html5/3.5/
Files might be overwritten or deleted when a patch is applied. /var/lib/kaazing/edition/version/ Contains web content (/web directory) and the custom library (/lib) used by the Gateway.
This is a writeable directory.
Example: /var/lib/kaazing/html5/3.5/
The subdirectory /var/lib/kaazing/edition/version/web is the root directory for variable content, including the extras folder that contains documentation and demos.
User files are not overwritten or deleted when a patch is applied.
Files (documentation and demos) in the extras folder may be overwritten or deleted when a patch is applied.
/etc/kaazing/edition/version/ Contains configuration files and the license file.
This is a writable directory.
Example: /etc/kaazing/html5/3.5/
The subdirectory /etc/kaazing/html5/3.5/conf/ is the root directory for gateway-config.xml and gateway-config-minimal.xml.
Modified files are not overwritten or deleted when a patch is applied. /var/log/kaazing/edition/version/ Contains the log files.
Example: /etc/kaazing/html5/3.5/
Files are not overwritten when a patch is applied. Patching: When you eventually run the Linux installer to patch your Gateway software to a newer release (for example, from 3.5.2 to 3.5.3), the installation process preserves user-modified files while the configuration is upgraded to the latest release of the Gateway.
Upgrading: To upgrade the Gateway (for example, from 3.4 to 3.5), the newer release is installed in a separate directory that is at the same level in the directory structure as the earlier one. Earlier releases of the Gateway are not overwritten or removed. For example, html5/3.4 and html5/3.5 are separate but parallel directories. Note that you cannot run both releases at the same time unless you change the ports on one or the other.
- Continue to step 4 to start the demo services and then to step 6 to verify the Gateway setup.
Because the installation procedure automatically starts the Gateway as a service, you can skip step 5 that starts the Gateway.
- How do I unpack the compressed download?
- Start the demo services by navigating to the GATEWAY_HOME/bin directory and running the demo-services.start (Linux) or the demo-services.start.bat (Windows) script.
How do I start the demo services?
On Windows:
- In Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
- Either double-click the demo-service.start.bat file in Windows Explorer, or use the following command to start the demo services and substitute the public IP address or the public DNS name for example.com:
demo-services.start.bat udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
On Linux, UNIX, or Mac:
- Navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
In the following example, edition refers to the Product Edition (for example, html5 or jms) and version refers to the version number (for example, 3.5.0):
cd /home/username/kaazing/kaazing-websocket-gateway-edition-version/bin
- Use the following command to start the demo services, and substitute either the public IP address or the public DNS name for example.com:
demo-services.start udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
- Start Kaazing WebSocket Gateway.
Note: If you installed the Gateway using the Windows or Linux Installer, then the installer starts the Gateway service automatically and you can skip to Step 6 to verify the configuration.How do I start and stop the Gateway?
To Start the Gateway on Windows:
Use the Windows Services Manager or use one of the following commands at the command prompt with administrator rights:
- For 64-bit JVM: net start KaazingHTML5v35x64Service
- For 32-bit JVM: net start KaazingHTML5v35x86Service
Alternatively, in Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway and double-click the gateway.start.bat script.
To Start the Gateway on Linux, UNIX, or Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 start
sudo service Kaazing-html5-3.5 restart
sudo start Kaazing-html5-3.5
sudo restart Kaazing-html5-3.5
To include the configuration file on the start command, use the config option. For example: my-config is the name of a Gateway configuration .xml file located in the tmp directory:
sudo start kaazing-html5-3.5 config=/tmp/my-config.xml
- Invoke the gateway.start command by navigating to the GATEWAY_HOME/bin directory (/home/username/kaazing/kaazing-websocket-gateway-edition-version/bin) where you installed the Gateway and then enter the following to run the gateway.start script:
./gateway.start
When you successfully start the Gateway, messages similar to the following example INFO messages display in your shell or command prompt:
INFO Kaazing WebSocket Gateway - HTML5 Edition (3.5.0)
INFO Configuration file: GATEWAY_HOME/conf/gateway-config.xml
INFO Checking license information
INFO Found license: Developer License, Maximum 50 connections, See LICENSE.txt
INFO Starting server
INFO Starting services
INFO http://localhost:8000/
INFO http://localhost:8001/
INFO http://localhost:8001/session
INFO http://localhost:9000/
INFO sse://localhost:8001/sse
INFO ws://localhost:8001/echo
INFO Started services
INFO Starting management
INFO jmx://localhost:2020/
INFO Started management
INFO Started server successfully in 0.321 secs at 2044-06-06 22:22:00Note: The startup message may differ depending on your Gateway configuration. If the server does not start successfully, contact your administrator or see Troubleshoot Kaazing WebSocket Gateway Configuration and Startup topic for more information.
To Stop the Gateway on Windows:
Use the Windows Services Manager, press CTRL + C in the command prompt that was used to start the Gateway or close the command prompt, or use one of the following commands with administrator rights:
- For 64-bit JVM: net stop KaazingHTML5v35x64Service
- For 32-bit JVM: net stop KaazingHTML5v35x86Service
To Stop the Gateway on Linux, UNIX, and Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 stop
sudo stop Kaazing-html5-3.5
- Use the following commands (where process ID is the process ID of the Kaazing process):
ps –ef | grep kaazing
kill process ID
- Verify the Gateway setup by navigating to http://localhost:8000/ in your browser.
How do I verify that the Gateway is running?
To verify that the Gateway is up and running, open a browser and access the Gateway home page at http://localhost:8000/. If you downloaded the Gateway + Documentation + Demos download, then click the Documentation tab to see the documentation library and learn more about the Gateway. Click the Demos tab to view the demos.
A WebSocket Echo demo service is bundled and started by default if you downloaded the Gateway + Documentation + Demos download. If you want to configure your own back-end service, see the Advanced configuration service and the client how-to guides on the Kaazing Documentation home page for more information.
See the Release Notes (online only) for an overview of the certified browser versions for this release of the Gateway.
You are now done setting up Kaazing WebSocket Gateway locally. To uninstall the Gateway, see the Uninstall Kaazing WebSocket Gateway - HTML5 Edition section at the end of this document.
Setting Up Kaazing WebSocket Gateway on a Server
You can override the Gateway default behavior and accept connections on a non-localhost host name or IP address. The following figure shows a server configuration in which multiple browser clients communicate via the Gateway and a back-end application located on a separate host at a different physical location. For HTML5 configurations, the back-end service is optional.
For more information about configuration settings and to perform additional Gateway configuration, see the Administration with Kaazing WebSocket Gateway documentation topics.
To set up a server configuration, perform the following steps:
- Ensure your system meets the system requirements.
For specific environment and operating system information, see the README.txt file.
- Download Kaazing WebSocket Gateway - HTML5 Edition for your platform from the Kaazing download page.
What are my download options?
The following matrix shows the download options available for each operating system platform.
Operating System Installer Compressed File (zip or tar.gz)Repository Windows 64-bit(1) or 32-bit(2)
N/ALinux (Debian) All Linux, UNIX, and Mac
N/AN/A1The 64-bit Windows download requires 64-bit requires 64-bit Java JDK or JRE that can be installed only on Windows 64-bit operating systems.
2The 32-bit Windows download requires 32-bit Java JDK or JRE. Note: The 32-bit JVM can be installed on a 64-bit or 32-bit operating system. To determine if your JVM is 64-bit or 32-bit, enter java -version at the command-line prompt. Typically, "64-bit" is reported for a 64-bit JVM, but nothing is reported if the JVM is the 32-bit version.
You can choose the Windows or Linux installer to install the Gateway into conventional operating system locations and automatically run the Gateway as a service. If you choose to unpack the .zip for Windows or .tar.gz for Linux, UNIX, or Mac), then you can uncompress the Gateway to any directory location and run it in place. For Debian-based Linux systems, you can choose "Install via repository" from the download page to add the Kaazing repository to your Linux repositories and automatically run the Gateway as a service.
For each option shown in the matrix except Repository, you can download either the Gateway Only or Gateway + Documentation + Demos:
- Gateway Only downloads: Contain only the Gateway for experienced users who are ready to use the Gateway in production.
- Gateway + Documentation + Demos downloads: Contain the Gateway plus documentation and demos and provide a great way to become familiar with the Gateway.
- Install the Gateway for your platform either by unpacking a compressed download of the Gateway or by running one of the the Gateway installers.
You can use the Windows or Linux installer to install the Gateway into conventional operating system locations and automatically run the Gateway as a service. If you choose to unpack the .zip for Windows or .tar.gz for Linux, UNIX, or Mac), then you can uncompress the Gateway to any directory location and run it in place.
How do I unpack the compressed download of the Gateway (.zip for Windows or .tar.gz for Linux, UNIX, or Mac)
- How do I unpack the compressed download?
You can unpack the download into a directory of your choice (for example, C:\kaazing or /home/username/kaazing). Unpacking the download creates a directory containing the Gateway. This directory is referred to as GATEWAY_HOME in the documentation.
On Windows you can unpack the Gateway .zip file using Windows Explorer, and on Linux, UNIX, or Mac you can unpack the .tar.gz file with the following command:
tar xvfz tar-file-name.tar.gz
Standard UNIX Tar does not always handle long path names correctly (this is a known issue), so it is better to use GNU Tar. GNU Tar is the default on Linux but on Solaris and OpenSolaris (or any other non-Linux platforms) it is best to start GNU Tar (gtar) from the directory /usr/gnu/bin/gtar or by using one of its links: /usr/bin/gtar or /usr/sfw/bin/gtar.
- Follow the instructions in steps 5, 6, and 7 to start the demo services, start the Gateway, and verify the Gateway setup.
How do I install the Gateway using the Windows installer?
Windows (32-Bit or 64-Bit) Installation:
- Login to your Windows machine using an account that has administrator privileges.
- Invoke the Kaazing WebSocket Gateway - HTML5 Edition Windows Installer Setup Wizard either by double-clicking the kaazing-websocket-gateway-edition-version-type.msi file that you downloaded or by running it at the command prompt. For example, the following command invokes the 64-bit installer:
msiexec /i kaazing-websocket-gateway-html5-3.5.1-x64.msi
- Follow the on-screen instructions to proceed through the setup wizard and note the following:
- You cannot install both Windows 64-bit and 32-bit of the same Gateway on the same machine.
- The default installation includes the Gateway, the documentation, and the demos. To install the Gateway without documentation and demos, click the down arrow next to "Extras (Demos, Documentation, etc.)" and select Entire feature will be unavailable from the drop-down list as shown in the following figure:
Figure: Installing the Gateway without Installing Documentation and Demos - On the Java Installation Directory page, you are prompted to enter the root directory of your Java JDK or JRE software installation. For example: C:\Program Files\Java\jdk1.6.0_29\. Before the Gateway is installed, the setup wizard verifies that the Java installation directory is valid (for example, C:\temp is invalid), but the wizard does not validate if it is a 64-bit or a 32-bit Java installation. Important: Choose a Java installation that matches the word size (64-bit or 32-bit) of the Windows installer you are running. To verify that the Gateway started correctly as a service, look at the log file in GATEWAY_HOME/log/service.log that is generated when the service is started or stopped.
- You can reenter the setup wizard at any time to change, repair, or remove the Gateway installation.
- The setup wizard installs the Gateway and adds the new files in the GATEWAY_HOME.
GATEWAY_HOME: The installer creates the default GATEWAY_HOME destinations as follows, where edition refers to the product edition (for example, html5 or jms) and version refers to the version number (for example, 3.5):
- For a 64-bit installation on a 64-bit Windows system, or for a 32-bit installation on a 32-bit Windows system:
C:\Program Files\Kaazing\edition\version\Gateway - For a 32-bit installation on a 64-bit Windows system:
C:\Program Files (x86)\Kaazing\edition\version\Gateway
Gateway Service: The Gateway service starts automatically and verifies that the Java installation directory that you supplied to the setup wizard is a valid 64-bit or a 32-bit Java installation. Errors are recorded in the Kaazing service log (C:\Program Files\Kaazing\edition\version\Gateway\log\service.log).
Patching: When running the Windows Installer Setup Wizard to install a Gateway patch (for example, patching 3.5.2 to 3.5.3), the installation process does not overwrite user-modified files under the GATEWAY_HOME/conf directory when the patch is applied. However, any unmodified files might be overwritten by newer replacement files.
Upgrading: When running the Windows Installer Setup Wizard to install the next release of the Gateway (for example, upgrading from release 3.4 to 3.5), the newer release is installed in a separate directory that is at the same level in the directory structure as the earlier one. Earlier releases of the Gateway are not overwritten or removed. For example, html5\3.4 and html5\3.5 are separate but parallel directories. Note that you cannot run both releases at the same time unless you change the ports on one or the other.
- For a 64-bit installation on a 64-bit Windows system, or for a 32-bit installation on a 32-bit Windows system:
- Continue to steps 4, 5, and 7 to edit the Gateway configuration, start the demo services and verify the Gateway setup.
Because the installation procedure automatically starts the Gateway as a service, you can skip step 6 that starts the Gateway.
How do I install the Gateway using the Debian-based Linux installer?
Debian-based Linux Installation:
- Install the Gateway either by double-clicking the Debian installer for the Gateway, or by entering the dpkg -i kaazing-gateway-package-name.deb command, where package-name is the Gateway package you downloaded. For example:
sudo dpkg -i kaazing-gateway-html5-3.5-3.5.1.5.deb
Notes: For Linux systems, the Documentation and Demos download requires that you install the Gateway Only download first.
sudo dpkg -i kaazing-gateway-html5-3.5-extras-3.5.1.5.deb
- You may choose to install the Gateway Only download and then the Documentation and Demos download, or install both using the Install via repository option. To download and install the Linux repository, click the "Install via repository" button and follow the instructions on the Gateway Download page.
- If you accidentally install Documentation and Demos before you install the Gateway Only download, then the installation stops and displays an error message. For example: dpkg: dependency problems prevent configuration of kaazing-gateway-html5-3.5-extras. If you get this error, then install the Gateway Only download before installing Documentation and Demos.
- The installation creates the Gateway directory structure and starts the Gateway automatically.
The installer creates the Gateway directory structure following the Linux Filesystem Hierarchy Standards.
Directory Description Patches and Upgrades /usr/share/kaazing/edition/version/ This is the GATEWAY_HOME and it contains libraries, such as JAR files and startup scripts required to run the Gateway. It also contains the README.txt file.
This is a read-only directory.
Example: /usr/share/kaazing/html5/3.5/
Files might be overwritten or deleted when a patch is applied. /var/lib/kaazing/edition/version/ Contains web content (/web directory) and the custom library (/lib) used by the Gateway.
This is a writeable directory.
Example: /var/lib/kaazing/html5/3.5/
The subdirectory /var/lib/kaazing/edition/version/web is the root directory for variable content, including the extras folder that contains documentation and demos.
User files are not overwritten or deleted when a patch is applied.
Files (documentation and demos) in the extras folder may be overwritten or deleted when a patch is applied.
/etc/kaazing/edition/version/ Contains configuration files and the license file.
This is a writable directory.
Example: /etc/kaazing/html5/3.5/
The subdirectory /etc/kaazing/html5/3.5/conf/ is the root directory for gateway-config.xml and gateway-config-minimal.xml.
Modified files are not overwritten or deleted when a patch is applied. /var/log/kaazing/edition/version/ Contains the log files.
Example: /etc/kaazing/html5/3.5/
Files are not overwritten when a patch is applied. Patching: When you eventually run the Linux installer to patch your Gateway software to a newer release (for example, patching release 3.5.2 to 3.5.3), the installation process preserves user-modified files while the configuration is upgraded to the latest release of the Gateway.
Upgrading: To upgrade the Gateway (for example, from release 3.4 to 3.5), the newer release is installed in a separate directory that is at the same level in the directory structure as the earlier one. Earlier releases of the Gateway are not overwritten or removed. For example, html5/3.4 and html5/3.5 are separate but parallel directories. Note that you cannot run both releases at the same time unless you change the ports on one or the other.
- Continue to steps 4, 5 and 7 to edit the Gateway configuration, start the demo services, and verify the Gateway setup.
Because the installation procedure automatically starts the Gateway as a service, you can skip step 6 that starts the Gateway.
- How do I unpack the compressed download?
- Navigate to the GATEWAY_HOME/conf/ directory and edit the Gateway configuration to update the value of the gateway.hostname property by replacing localhost with your host name or IP address.
How do I update my hostname and which gateway configuration file should I edit?
- Edit either of the Gateway configuration file options: gateway-config.xml or gateway-config-minimal.xml, or edit your custom configuration file if you created one. The Gateway configuration files are described in detail in Understanding Kaazing WebSocket Gateway Configuration.
- Replace localhost with your host name or IP address.
For example, the hostname example.com replaces localhost in the "Property defaults" section of the following Gateway configuration file:
<properties> <property> <name>gateway.hostname</name> <value>example.com</value> </property> <property> <name>gateway.base.port</name> <value>8000</value> </property> <property> <name>gateway.extras.port</name> <value>8001</value> </property> </properties>
See the Directory element for more information and examples.
Note: You can optionally specify default values for configuration elements using the properties element in the "Property defaults" section of the Gateway configuration file. Doing so is recommended because it allows you to define a property value once and have its value used throughout the configuration.
- Start the demo services by navigating to the GATEWAY_HOME/bin directory and running the demo-services.start (Linux) or the demo-services.start.bat (Windows) script.
How do I start the demo services?
On Windows:
- In Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
- Use the following command to start the demo services, and substitute either the public IP address or the public DNS name for example.com:
demo-services.start.bat udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
On Linux, UNIX, or Mac:
- Navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
In the following example, edition refers to the product edition (for example, html5 or jms) and version refers to the Release Number (for example, 3.5.0):
cd /home/username/kaazing/kaazing-websocket-gateway-edition-version/bin
- Use the following command to start the demo services, and substitute either the public IP address or the public DNS name for example.com:
demo-services.start udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
- Start Kaazing WebSocket Gateway.
Note: If you installed the Gateway using the Windows or Linux Installer, then the installer starts the Gateway service automatically and you can skip to Step 7 to verify the configuration.How do I start and stop the Gateway?
To Start the Gateway on Windows:
Use the Windows Services Manager or use one of the following commands at the command prompt with administrator rights:
- For 64-bit JVM: net start KaazingHTML5v35x64Service
- For 32-bit JVM: net start KaazingHTML5v35x86Service
Alternatively, in Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway and double-click the gateway.start.bat script.
To Start the Gateway on Linux, UNIX, or Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 start
sudo service Kaazing-html5-3.5 restart
sudo start Kaazing-html5-3.5
sudo restart Kaazing-html5-3.5
To include the configuration file on the start command, use the config option. For example: my-config is the name of a Gateway configuration .xml file located in the tmp directory:
sudo start kaazing-html5-3.5 config=/tmp/my-config.xml
- Invoke the gateway.start command by navigating to the GATEWAY_HOME/bin directory (/home/username/kaazing/kaazing-websocket-gateway-edition-version/bin) where you installed the Gateway and then enter the following to run the gateway.start script:
./gateway.start
When you successfully start the Gateway, messages similar to the following example INFO messages display in your shell or command prompt:
INFO Kaazing WebSocket Gateway - HTML5 Edition (3.5.0)
INFO Configuration file: GATEWAY_HOME/conf/gateway-config.xml
INFO Checking license information
INFO Found license: Developer License, Maximum 50 connections, See LICENSE.txt
INFO Starting server
INFO Starting services
INFO http://localhost:8000/
INFO http://localhost:8001/
INFO http://localhost:8001/session
INFO http://localhost:9000/
INFO sse://localhost:8001/sse
INFO ws://localhost:8001/echo
INFO Started services
INFO Starting management
INFO jmx://localhost:2020/
INFO Started management
INFO Started server successfully in 0.321 secs at 2044-06-06 22:22:00Note: The startup message may differ depending on your Gateway configuration. If the server does not start successfully, contact your administrator or see Troubleshoot Kaazing WebSocket Gateway Configuration and Startup topic for more information.
To Stop the Gateway on Windows:
Use the Windows Services Manager, press CTRL + C in the command prompt that was used to start the Gateway or close the command prompt, or use one of the following commands with administrator rights:
- For 64-bit JVM: net stop KaazingHTML5v35x64Service
- For 32-bit JVM: net stop KaazingHTML5v35x86Service
To Stop the Gateway on Linux, UNIX, and Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 stop
sudo stop Kaazing-html5-3.5
- Use the following commands (where process ID is the process ID of the Kaazing process):
ps –ef | grep kaazing
kill process ID
- Verify the Gateway setup by navigating to the Gateway home page on your server.
How do I verify that the Gateway is running?
To verify that the Gateway is up and running, open a browser and navigate to the Gateway home page on your server (by default port 8000). Click the Documentation tab to see the documentation library and learn more about the Gateway. Click the Demos tab to view the demos.
A WebSocket Echo demo service is bundled and started by default if you downloaded the Gateway + Documentation + Demos download. If you want to configure your own back-end service, see the Advanced configuration service and the client how-to guides on the Kaazing Documentation home page for more information.
See the Release Notes (online only) for an overview of the certified browser versions for this release.
You are done configuring the Gateway on a server. To start building your first application, see the following documentation to learn about adding the client libraries to build your clients:
- For Javascript clients, see Checklist: Build JavaScript Clients Using Kaazing WebSocket Gateway
- For Java clients, see Checklist: Build Java Clients Using Kaazing WebSocket Gateway
- For Flash clients, see Checklist: Build Flash Clients Using Kaazing WebSocket Gateway
- For Microsoft .NET and Silverlight Clients, see Checklist: Build Microsoft .NET and Silverlight Clients Using Kaazing WebSocket Gateway
- For Google Web Toolkit clients, see How to Build Clients with Google Web Toolkit Using Kaazing WebSocket Gateway
To uninstall the Gateway, see the Uninstall Kaazing WebSocket Gateway - HTML5 Edition section at the end of this document.
Setting Up Kaazing WebSocket Gateway on a Cloud Server
The Gateway can be installed and operated on either a local platform or on a remote server. A remote server, commonly referred to as a Cloud Server, is operated by firms specializing in operating and leasing commodity servers and is used for highly reliable and scalable applications.
To set up the Gateway on a cloud server, perform the following steps:
- Ensure your system meets the system requirements.
For specific environment and operating system information, see the README.txt file.
- Create and connect to a cloud server instance.
These instructions assume that you have already set up and connected to a cloud server.
How do I do this?
Refer to the following resources for complete instructions to create and connect to a cloud server instance:
- Download Kaazing WebSocket Gateway - HTML5 Edition.
How do I download the Gateway?
- Download Kaazing WebSocket Gateway software using the wget command on the cloud machine, or download the software from the Kaazing download page to your local machine and then transfer the file to the cloud machine using FTP.
In the following wget command example, edition refers to the Product Edition (for example, html5 or jms), version refers to the version number (for example, 3.5.0.1), and tar-file-name is the complete path to the location of the Gateway Only or Gateway + Documentation + Demos product for your operating system:
wget http://kaazingcorp.cachefly.net/com/download/edition/version/tar-file-name.tar.gz
On Linux, UNIX, or Mac, the wget command would be similar to the following:
wget http://kaazingcorp.cachefly.net/com/download/html5/3.5.0.1/kaazing-websocket-gateway-html5-3.5.0.tar.gz
The Gateway is downloaded with a Development License, which allows for complete functionality for up to 50 connections. Further information about licensing and the different Gateway releases is available from http://www.kaazing.com/download.html.
- Extract the contents of the downloaded file to your home directory. For example:
tar -xf kaazing-websocket-gateway-html5-3.5.0.tar.gz
- Verify that the root user’s home directory contents are similar to the following by running the ls command. The output should look similar to this:
kaazing-websocket-gateway-html5-3.5.0
kaazing-websocket-gateway-html5-3.5.0.tar.gz
- Download Kaazing WebSocket Gateway software using the wget command on the cloud machine, or download the software from the Kaazing download page to your local machine and then transfer the file to the cloud machine using FTP.
- Replace localhost with your host name or IP address.
To do this, perform the following steps:
- Navigate to the GATEWAY_HOME/conf/ directory.
- Edit the Gateway configuration file gateway-config.xml and update the value of the gateway.hostname parameter by replacing localhost with your host name or IP address. See the Directory element for more information and examples.
Which gateway configuration file should I edit?
Edit either of the Gateway configuration file options: gateway-config.xml or gateway-config-minimal.xml, or edit your custom configuration file if you created one. The Gateway configuration files are described in detail in Understanding Kaazing WebSocket Gateway Configuration Files, Elements, and Namespaces.
How do I edit files on a cloud machine?
vi editor users
Open the file using the following command:
vi gateway-config.xml
emacs users
- Install the emacs editor using the following command:
sudo apt-get install emacs
If asked if the size is okay (“Is this ok [y/N]:”), type y and press enter.
- Open the file in emacs using the following command:
emacs gateway-config.xml
For users who are unfamiliar with vi or emacs, the use of a secure FTP client combined with local editing is recommended.
You can also edit files locally and copy them to the cloud machine using FTP. The following steps outline this approach.
- Install one of the following secure FTP clients on your local platform:
- WinSCP (Windows) - http://winscp.net/eng/download.php
- Cyberduck (Mac) - http://cyberduck.ch
- gFTP (Linux) - http://gftp.seul.org/
- Install the vsftpd secure ftp daemon on your EC2 instance using the command:
sudo apt-get install vsftpd
If asked if the size is okay (“Is this ok [y/N]:”), type y and press enter.
- Start the server daemon using the following command:
sudo vsftpd
- Use your secure FTP client to transfer the gateway-config.xml file to your local platform for local editing and transfer the configuration file back to the EC2 instance.
The following example replaced localhost with the hostname example.com:
<properties> <property> <name>gateway.hostname</name> <value>example.com</value> </property> <property> <name>gateway.base.port</name> <value>8000</value> </property> <property> <name>gateway.extras.port</name> <value>8001</value> </property> </properties> - Install the emacs editor using the following command:
- Configure network protocol bindings for all services.
You can specify default values for all network protocol bindings one time in the gateway-config.xml file and have the values apply to all services.
How do I do this?
- Edit the gateway-config.xml file and locate the Service Defaults section.
- Add the
element to the gateway-config.xml file. - Configure the protocol.bind element to specify a default value for each network protocol bindings for all services. Note the following:
- You can bind the address to a specific port, or to a hostname and port. If you specify a hostname, then you must specify a port. If you specify only the port number, it effectively tells the Gateway to listen on all available network interfaces using the specified port number
- If you default values for all services and you then specify values for a particular service, the service accept options supersede the default values with your specified values.
- You must specify the accept options elements before any mime-mapping entries.
The following example shows a portion of the gateway-config.xml file with sample network protocol bindings for the ws and http services.
<service-defaults> <accept-options> <ws.bind>8000</ws.bind> <http.bind>8000</http.bind> </accept-options> <mime-mapping> <extension>html</extension> <mime-type>text/html</mime-type> </mime-mapping> <mime-mapping> <extension>js</extension> <mime-type>text/javascript</mime-type> </mime-mapping> . . . </service-defaults> - Start the demo services by navigating to the GATEWAY_HOME/bin directory and running the demo-services.start (Linux) or the demo-services.start.bat (Windows) script.
How do I start the demo services?
On Windows:
- In Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
- Either double-click the demo-service.start.bat file in Windows Explorer, or use the following command to start the demo services and substitute the public IP address or the public DNS name for example.com:
demo-services.start.bat udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
On Linux, UNIX, or Mac:
- Navigate to the GATEWAY_HOME/bin directory where you installed the Gateway.
In the following example, edition refers to the product edition (for example, html5 or jms) and version refers to the version number (for example, 3.5.0):
cd /home/username/kaazing/kaazing-websocket-gateway-edition-version/bin
- Use the following command to start the demo services, and substitute either the public IP address or the public DNS name for example.com:
demo-services.start udp://example.com:50505
By default the service accepts on udp://localhost:50505. See the documentation for the broadcast element to configure the corresponding broadcast element for a different address.
- Start Kaazing WebSocket Gateway.
Note: If you installed the Gateway using the Windows or Linux Installer, then the installer starts the Gateway service automatically and you can skip to Step 6 to verify the configuration.How do I start and stop the Gateway?
To Start the Gateway on Windows:
Use the Windows Services Manager or use one of the following commands at the command prompt with administrator rights:
- For 64-bit JVM: net start KaazingHTML5v35x64Service
- For 32-bit JVM: net start KaazingHTML5v35x86Service
Alternatively, in Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway and double-click the gateway.start.bat script.
To Start the Gateway on Linux, UNIX, or Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 start
sudo service Kaazing-html5-3.5 restart
sudo start Kaazing-html5-3.5
sudo restart Kaazing-html5-3.5
To include the configuration file on the start command, use the config option. For example: my-config is the name of a Gateway configuration .xml file located in the tmp directory:
sudo start kaazing-html5-3.5 config=/tmp/my-config.xml
- Invoke the gateway.start command by navigating to the GATEWAY_HOME/bin directory (/home/username/kaazing/kaazing-websocket-gateway-edition-version/bin) where you installed the Gateway and then enter the following to run the gateway.start script:
./gateway.start
When you successfully start the Gateway, messages similar to the following example INFO messages display in your shell or command prompt:
INFO Kaazing WebSocket Gateway - HTML5 Edition (3.5.0)
INFO Configuration file: GATEWAY_HOME/conf/gateway-config.xml
INFO Checking license information
INFO Found license: Developer License, Maximum 50 connections, See LICENSE.txt
INFO Starting server
INFO Starting services
INFO http://localhost:8000/
INFO http://localhost:8001/
INFO http://localhost:8001/session
INFO http://localhost:9000/
INFO sse://localhost:8001/sse
INFO ws://localhost:8001/echo
INFO Started services
INFO Starting management
INFO jmx://localhost:2020/
INFO Started management
INFO Started server successfully in 0.321 secs at 2044-06-06 22:22:00Note: The startup message may differ depending on your Gateway configuration. If the server does not start successfully, contact your administrator or see Troubleshoot Kaazing WebSocket Gateway Configuration and Startup topic for more information.
To Stop the Gateway on Windows:
Use the Windows Services Manager, press CTRL + C in the command prompt that was used to start the Gateway or close the command prompt, or use one of the following commands with administrator rights:
- For 64-bit JVM: net stop KaazingHTML5v35x64Service
- For 32-bit JVM: net stop KaazingHTML5v35x86Service
To Stop the Gateway on Linux, UNIX, and Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 stop
sudo stop Kaazing-html5-3.5
- Use the following commands (where process ID is the process ID of the Kaazing process):
ps –ef | grep kaazing
kill process ID
How does the Gateway start and how do I override the default startup method?
By default, the Gateway is started using the properties in the gateway-config.xml or the gateway-config-minimal.xml file in the GATEWAY_HOME/conf directory, as follows:
- If you downloaded the Gateway Only product, then the Gateway is started using the properties in the gateway-config-minimal.xml file.
- If you downloaded the Gateway + Documentation + Demos download, then the Gateway is started using the properties in the gateway-config.xml file, by default. If there is no gateway-config.xml file, then the Gateway looks for and uses the gateway-config-minimal.xml.
To override the default method for starting the Gateway, include the --config command on the gateway.start (Linux) or gateway.start.bat (Windows) command line to start the Gateway and explicitly name the configuration file that should be invoked at startup. The following example starts the Gateway and explicitly specifies the gateway-config-minimal.xml configuration file in the GATEWAY_HOME/conf directory:
./gateway.start --config ../conf/gateway-config-minimal.xml
- Verify the Gateway setup by navigating to the Gateway home page on your cloud server in your browser.
How do I verify that the Gateway is running?
To verify that the Gateway is up and running, open a browser and navigate to the Gateway home page on your cloud server. Click the Documentation tab to see the documentation library and learn more about the Gateway. Click the Demos tab to view the demos.
A WebSocket Echo demo service is bundled and started by default if you downloaded the Gateway + Documentation + Demos download. If you want to configure your own back-end service, see the Advanced configuration service and the client how-to guides on the Kaazing Documentation home page for more information.
See the Release Notes (online only) for an overview of the certified browser versions for this release.
You are done configuring the Gateway on a cloud server. To start building your first application, see the following documentation to learn about adding the client libraries to build your clients:
- For Javascript clients, see Checklist: Build JavaScript Clients Using Kaazing WebSocket Gateway
- For Java clients, see Checklist: Build Java Clients Using Kaazing WebSocket Gateway
- For Flash clients, see Checklist: Build Flash Clients Using Kaazing WebSocket Gateway
- For Microsoft .NET and Silverlight Clients, see Checklist: Build Microsoft .NET and Silverlight Clients Using Kaazing WebSocket Gateway
- For Google Web Toolkit clients, see How to Build Clients with Google Web Toolkit Using Kaazing WebSocket Gateway
Integrating Kaazing WebSocket Gateway with a Web Server
If you are hosting your web application on a separate web server, such as Apache HTTP Server or Microsoft IIS, perform the following steps:
- Navigate to the GATEWAY_HOME/conf/ directory.
- Edit the Gateway configuration to update the value of the gateway.hostname property by replacing localhost with your host name or IP address.
How do I update my hostname and which gateway configuration file should I edit?
- Edit either of the Gateway configuration file options: gateway-config.xml or gateway-config-minimal.xml, or edit your custom configuration file if you created one. The Gateway configuration files are described in detail in Understanding Kaazing WebSocket Gateway Configuration.
- Replace localhost with your host name or IP address.
For example, the hostname example.com replaces localhost in the "Property defaults" section of the following Gateway configuration file:
<properties> <property> <name>gateway.hostname</name> <value>example.com</value> </property> <property> <name>gateway.base.port</name> <value>8000</value> </property> <property> <name>gateway.extras.port</name> <value>8001</value> </property> </properties>
See the Directory element for more information and examples.
Note: You can optionally specify default values for configuration elements using the properties element in the "Property defaults" section of the Gateway configuration file. Doing so is recommended because it allows you to define a property value once and have its value used throughout the configuration.
-
To make your application work in Internet Explorer releases 6 and 7, perform the following steps to integrate your web server with the Gateway. For this example, assume that your source origin web server is serving up content on http://www.example.com and that the Gateway is running on http://www.gateway.com.
- Copy the file GATEWAY_HOME/lib/client/javascript/PostMessageBridge.html and serve it from the source origin web server (http://www.example.com); for example at http://www.example.com/bridge/PostMessageBridge.html.
- Add the following tags (shown in lines 2 and 3) to the head section of your main application page:
<head> <meta name="kaazing:postMessageBridgeURL" content="http://www.example.com/bridge/PostMessageBridge.html" > . . . </head>
What about document.domain?
You are strongly discouraged from setting document.domain in your application pages, because origin-based security supersedes domain-based security. If you must use it in your code, contact Kaazing Support for instructions.
Note: You must ensure that the file PostMessageBridge.html is hosted on the same origin (same scheme, host, and port) as the web server.
- Start Kaazing WebSocket Gateway.
How do I start and stop the Gateway?
To Start the Gateway on Windows:
Use the Windows Services Manager or use one of the following commands at the command prompt with administrator rights:
- For 64-bit JVM: net start KaazingHTML5v35x64Service
- For 32-bit JVM: net start KaazingHTML5v35x86Service
Alternatively, in Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you installed the Gateway and double-click the gateway.start.bat script.
To Start the Gateway on Linux, UNIX, or Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 start
sudo service Kaazing-html5-3.5 restart
sudo start Kaazing-html5-3.5
sudo restart Kaazing-html5-3.5
To include the configuration file on the start command, use the config option. For example: my-config is the name of a Gateway configuration .xml file located in the tmp directory:
sudo start kaazing-html5-3.5 config=/tmp/my-config.xml
- Invoke the gateway.start command by navigating to the GATEWAY_HOME/bin directory (/home/username/kaazing/kaazing-websocket-gateway-edition-version/bin) where you installed the Gateway and then enter the following to run the gateway.start script:
./gateway.start
When you successfully start the Gateway, messages similar to the following example INFO messages display in your shell or command prompt:
INFO Kaazing WebSocket Gateway - HTML5 Edition (3.5.0)
INFO Configuration file: GATEWAY_HOME/conf/gateway-config.xml
INFO Checking license information
INFO Found license: Developer License, Maximum 50 connections, See LICENSE.txt
INFO Starting server
INFO Starting services
INFO http://localhost:8000/
INFO http://localhost:8001/
INFO http://localhost:8001/session
INFO http://localhost:9000/
INFO sse://localhost:8001/sse
INFO ws://localhost:8001/echo
INFO Started services
INFO Starting management
INFO jmx://localhost:2020/
INFO Started management
INFO Started server successfully in 0.321 secs at 2044-06-06 22:22:00Note: The startup message may differ depending on your Gateway configuration. If the server does not start successfully, contact your administrator or see Troubleshoot Kaazing WebSocket Gateway Configuration and Startup topic for more information.
To Stop the Gateway on Windows:
Use the Windows Services Manager, press CTRL + C in the command prompt that was used to start the Gateway or close the command prompt, or use one of the following commands with administrator rights:
- For 64-bit JVM: net stop KaazingHTML5v35x64Service
- For 32-bit JVM: net stop KaazingHTML5v35x86Service
To Stop the Gateway on Linux, UNIX, and Mac:
Use any of the following methods:
- Use Linux or Ubuntu command-line (Upstart) commands. For example:
Linux Command Line Examples Ubuntu (Upstart) Command Line Examples sudo service Kaazing-html5-3.5 stop
sudo stop Kaazing-html5-3.5
- Use the following commands (where process ID is the process ID of the Kaazing process):
ps –ef | grep kaazing
kill process ID
- Verify the Gateway setup by navigating to your web server in your browser and test if you can access Gateway services from there.
How do I verify that the Gateway is running?
To verify that the Gateway is up and running, open a browser and navigate to a page on your web server to ensure you can access the Gateway services from there. Click the Documentation tab to see the documentation library and learn more about the Gateway. Click the Demos tab to view the demos.
A WebSocket Echo demo service is bundled and started by default if you downloaded the Gateway + Documentation + Demos download. If you want to configure your own back-end service, see the Advanced configuration service and the client how-to guides on the Kaazing Documentation home page for more information.
See the Release Notes (online only) for an overview of the certified browser versions for this release.
You are done integrating the Gateway with an HTTP server. To start building your first application, see the following documentation to learn about adding the client libraries to build your clients:
- For Javascript clients, see Checklist: Build JavaScript Clients Using Kaazing WebSocket Gateway
- For Java clients, see Checklist: Build Java Clients Using Kaazing WebSocket Gateway
- For Flash clients, see Checklist: Build Flash Clients Using Kaazing WebSocket Gateway
- For Microsoft .NET and Silverlight Clients, see Checklist: Build Microsoft .NET and Silverlight Clients Using Kaazing WebSocket Gateway
- For Google Web Toolkit clients, see How to Build Clients with Google Web Toolkit Using Kaazing WebSocket Gateway
Setting Up a Secure Kaazing WebSocket Gateway Configuration
By default, the Gateway listens for non-encrypted traffic. Secure communication between the browser and the server is necessary to ensure that only the intended recipient of a message can read the transmitted message and to allow the message recipient to trust that the message is indeed from the expected source.
For secure communication with the Gateway, consider configuring for the following levels of security:
- Secure network traffic Configure Transport Layer Security (TLS, also known as SSL) for secure communications channels to access the Gateway by setting up certificates. See Checklist: Secure Network Traffic with the Gateway for more information.
- Limit access to services Use Cross-Origin Resource Sharing to control access to Gateway services based on the origin of an application by configuring cross-site constraints in the gateway-config.xml file. See About Security with Kaazing WebSocket Gateway for more information.
- Configure authentication and authorization with constraints to limit access to Gateway services to authenticated and authorized users. See Checklist: Configure Authentication and Authorization for more information.
- Configure Kerberos network authentication for network authentication and communication between trusted hosts on untrusted networks. See Configuring Kerberos V5 Network Authentication Overview for more information.
Configuring Kaazing WebSocket Gateway for High Availability
High availability for services is achieved by configuring multiple gateways to be part of a cluster, and balancing the workload across the cluster members.
For complete information about setting up a highly available configuration, see Checklist: Configure Kaazing WebSocket Gateway for High Availability.
Advanced Configuration
For more information about setting up additional, and more advanced configurations, see Checklist: Configure Kaazing WebSocket Gateway.
Uninstall Kaazing WebSocket Gateway - HTML5 Edition
This section helps you uninstall Kaazing WebSocket Gateway.
How do I uninstall the Gateway on Windows systems?
To Uninstall Kaazing WebSocket Gateway on Windows Systems
- Login to your Windows machine using an account that has administrator privileges.
- Back up any files that you modified and want to keep. For example, you might have modified the Gateway configuration in the \conf directory, and any files you modified under the \web directory. Uninstalling the Gateway removes all of your files!
- Invoke the Kaazing WebSocket Gateway - HTML5 Edition Windows Installers Setup Wizard by double-clicking the kaazing-websocket-gateway-edition-version-type.msi file that you downloaded.
- Remove the Gateway.
On the "Change, repair, or remove installation" page, click Remove and then follow the on-screen instructions to proceed through the wizard and remove the Gateway.
- Verify that the Gateway is not running.
Open a browser and access the Gateway home page at http://localhost:8000/. Your browser returns an error indicating that it cannot display the web page.
You are now done uninstalling Kaazing WebSocket Gateway.
How do I uninstall the Gateway on Debian-based Linux systems?
To Uninstall Kaazing WebSocket Gateway on Debian-based Linux Systems
- Back up any files that you modified and want to keep.
- Uninstall the Documentation and Demos first, if that package is installed, and then uninstall the Gateway Only package.
If you installed the Documentation and Demos download, then you must uninstall that package before you uninstall the Gateway. You can perform the uninstallation using Synaptic Package Manager (see the online Help system for instructions) or at the command line using either the Debian package manager dpkg command or the apt-get command.
- To uninstall using the Debian package manager dpkg, enter the dpkg -r
or dpkg --purgekaazing-gateway-package-name.deb command, where package-name is the Gateway package you downloaded and installed. For example:dpkg --purge kaazing-gateway-html5-3.5-extras
dpkg --purge kaazing-gateway-html5-3.5 - To uninstall using the the apt-get command, enter apt-get remove package-name or apt-get purge package-name, where package-name is the Gateway package you downloaded and installed. For example:
apt-get remove kaazing-gateway-html5-3.5-extras-3.5.1.5
apt-get remove kaazing-gateway-html5-3.5-3.5.1.5
Notes: - You can uninstall using either the remove or purge option at the command line. Removing a package removes the program files but retains the Gateway configuration files located in the /etc/kaazing/edition/version/ directory. Purging removes everything. See your Debian documentation to learn more about removing versus purging a package.
- If you accidentally uninstall the Gateway before Documentation and Demos, then the uninstallation stops and displays an error message. For example: dpkg: dependency problems prevent removal of kaazing-gateway-html5-3.5-extras.
- To uninstall using the Debian package manager dpkg, enter the dpkg -r
- Monitor the messages returned by the uninstallation process.
The following figure shows an example of the messages displayed during uninstallation. The messages vary depending on the method you use to uninstall the Gateway.
Figure: Messages Displayed When Uninstalling the Gateway
You are now done uninstalling Kaazing WebSocket Gateway.