OneClick WebApp

OneClick WebApp
casp1042
2
About OneClick WebApp
From 10.4, instead of launching the WebApp separately, the WebApp is embedded in
DX NetOps Spectrum
. The OneClickWebApp launches in a separate tab with the same port details as
DX NetOps Spectrum
. The OneClickWebApp address is http://<OC-HostName>:<OC-Port>/spectrum/webapp. Manual configuration is not required in the console-menubar.jsp page. Logging out of the WebApp redirects you to the
DX NetOps Spectrum
administration page.
If javaSript is not enabled in your web browser, WebApp does not work. To enable javaSript, see How to enable JavaScript in Windows.
OneClick WebApp Improvements in 10.4.2
The following improvements are done in the current release:
  • Window Undocking is supported. Click the
    UP arrow
    (in the browser's title bar) as shown in the following image to toggle window docking:
    undock window
  • DX NetOps Spectrum
    OneClick WebApp is 508 compliant.
  • The memory footprint of webtomcat is reduced by around 60%, hence the OneClick WebApp is that much lighter.
  • Launch the
    OneClick WebApp in-context
    to open the alarm, explorer, and topology. For more information, see Launch OneClick Clients with Context.
OneClick WebApp Improvements in 10.4.2.2
This release includes the following OneClick WebApp-related enhancements:
OneClick WebApp Audio Alarm
An audio message announces the new alarm in WebApp. For more information, see Alarms Tab Preferences.
OneClick WebApp Security
The OneClick WebApp administrator can use the
Admin
console to view all the open WebApp sessions from multiple machines. When you try to launch an open session, you can see a warning message
Session is mirrored by OneClick WebApp Administrator
.
Memory Requirements for OneClick WebApp Web Server:
For every new session that opens in the client, OneClick WebApp takes around 300 MB to 500 MB of server memory, as it creates a Java process for each client.
DX NetOps Spectrum
now ensures that the OC WebApp port is updated to 9443 if it is available, or to any other available port.
10.3.2 introduces the download and upload option as an improvement to the OneClick WebApp. These upload and download improvements are made where the client file system is made available.
The Service Desk ticket launch now opens in a separate browser.
Configure OneClick WebApp in Docker
This section describes the procedure to configure the OneClick WebApp in Docker. You need the X Windows System virtual framebuffer X server package (
xorg-x11-server-Xvfb)
to start the webswing.
Follow these steps:
  1. While creating the container, create a port mapping like it is done for the OneClick port.
    For OneClick WebApp:
    docker run -e ROOT_PASSWORD=???.qaperf184 -e MAIN_LOCATION_SERVER=719de9a39c46 -e MAIN_LOCATION_SERVER_IP=172.17.0.2 -e TOMCAT_PORT=8080 -p 9090:8080 -p 9443:9443 -e MASTER_NODE=docker-rh74vm2 -it 1032ocimage
    Here 9443 is the port number that WebApp uses, once the OC container is created.
  2. Perform one of the following tasks to install the package.
    1. If the package is
      available
      , follow these steps:
      1. Copy the
        xorg-x11-server-Xvfb
        file to the
        <docker_host>/container
        directory using the ‘docker copy <filename> <containerName:/path>’ command.
      2. Install the package.
    2. If the package is
      not available
      , follow these steps:
      1. In the docker container, go to the
        /etc/yum.repo.d
        directory.
      2. Move all the repo file in this directory except the
        Vi test.repo
        file to a temporary location.
      3. Open the
        Vi test.repo
        file.
      4. Insert the following code chunk:
        [test] name=test baseurl=http://vault.centos.org/<version>/os/x86_64 gpgcheck=0 enabled=1
      5. Save and close the file.
      6. Run the following commands:
        yum clean all yum repolist
      7. Install the package using the yum install
        xorg-x11-server-Xvfb
        command.
  3. When package installation is completed, move the repo files that you put in a temporary location to the current directory.
Steps to Run OneClick WebApp on Windows
This section describes the steps to run OneClick WebApp on Windows.
The OneClick WebApp application runs in a separate tomcat web server, also called as the OneClick WebApp web server. The OneClick WebApp web server runs on a service that is referred to as the SpectrumWebTomcat. By default, the SpectrumWebTomcat service is in a running state.
Following these steps:
  1. To start the SpectrumWebTomcat service, launch
    services.msc
    from your windows machine. Find and select the SpectrumWebTomcat service option (which as mentioned, is in the stopped state) and start it. The OneClick WebApp web server takes a couple of minutes to start.
    The Webtomcat web server and the OneClick web server, run on separate ports.
    DX NetOps Spectrum
    ensures the assigning of the next available port number (by reading the OneClick webserver port number) to the Webtomcat webserver.
    image001 (5).png
    1. Launch the OneClick Admin page and select the OneClick WebApp option (as shown here) to launch the OneClick WebApp application. Directly launching the WebApp URL is not supported. You must launch it from the OneClick Admin page.
      Oneclick WebaPP beta
      To change the port number that has been assigned to the OneClick WebApp web server, navigate to the following location:
      %SPECROOT%Webtomcat>conf>server.xml
      file and look in the connector folder for the HTTP protocol. For example:
      <Connector port="9443" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
      In the example that is given above, the port number that is assigned to the OneClick WebApp web server is 9443.
  2. If the OneClick WebApp web server does not start, analyze, and fetch the webtomcat logs for troubleshooting, from the following log locations:
    %SPECROOT%webtomcat/bin/webswing.log %SPECROOT%webtomcat/logs/stdout.><date-stamp>.log
Steps to Run OneClick WebApp on Linux
This section describes the steps to run OneClick WebApp on Linux. Install the ‘X virtual frame buffer’ (Xvfb) for Linux machines.
Prerequisites
  1. Download and Extract the installation package (xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm) to a temporary directory.
    wget http://vault.centos.org/<version>/os/x86_64/Packages/<package_name> tar <package_name>
  2. Install the package using one of the following methods.
    yum install <package_name> OR yum localinstall <package_name>
  3. Verify that the following Linux packages are available, else install them:
    These packages enable the graphical environment that is required to use the Swing framework.
    DX NetOps Spectrum
    Dependencies:
    • xorg-x11-server-Xvfb
    • libXdmcp
    • xorg-x11-server-common
    • libXfont2
    • libxkbfile
    • xorg-x11-xkb-utils
    OneClick WebApp Dependencies
    • libXext
    • libXi
    • libXtst
    • libXrender
    For more information see the Webswing documentation.
Following are the steps to run OneClick WebApp on Linux:
The OneClick WebApp application runs in a separate tomcat web server, also called as the OneClick WebApp web server. The OneClick WebApp web server runs on a service referred to as the SpectrumWebTomcat.
  1. (Optional) To start the OneClick WebApp web server, navigate to the
    $SPECROOT>webtomcat>bin
    directory and execute the following command:
    ./startWebTomcat.sh
    The OneClick WebApp web server and the OneClick web server, run on separate ports. 10.3.1 ensures the assigning of the next available port number (by reading the OneClick web server port number) to the OneClick WebApp webserver.
  2. Launch the OneClick Admin page and select the OneClick WebApp option (as shown here) to launch the OneClick WebApp application. Directly launching the WebApp URL is not supported. You must launch it from the OneClick Admin page.
    Oneclick WebaPP beta
    To change the port number that has been assigned to the OneClick WebApp web server, navigate to the following location:
    $SPECROOT>webtomcat>conf>server.xml
    file and look in the connector folder for the HTTP protocol.
    For example:
    <Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
    In the above example, the port number that is assigned to the OneClick WebApp web server is 8081.
  3. Troubleshoot any issue in starting the OneClick WebApp web server, analyze, and fetch the web tomcat logs from the following log locations:
    %SPECROOT%webtomcat>logs>Catalina.out
    %SPECROOT%webtomcat/bin/webswing.log
  4. To stop the OneClick WebApp application, run the following command:
    ./stopWebTomcat.sh
SSL Support for OneClick WebApp
The SSL feature is enabled with OneClick and available with previous versions of
DX NetOps Spectrum
. Installation takes care of the client certificates and setting the SSL to true in the configuration. Selecting the link the OneClick administration page loads the
DX NetOps Spectrum
console without errors.
If OneClick is SSL enabled before upgrading, the OneClick WebApp URL appears in
https
.
Enable SSL support
This section discusses the steps to enable SSL support or change the OneClick WebApp URL.
Follow these steps:
  1. Navigate to the
    tomcat >conf>server.xml
    file and copy the connector https ports-related information and paste it in the
    webtomcat>conf folder>server.xml file
    under the
    https connector
    section.
  2. Change the SSL connector
    port entry
    that you pasted in the
    webtomcat/conf/server.xml
    file, so that it does not conflict with the standard OneClick Tomcat SSL
    port
    .
  3. Restart the web tomcat service.
Post Upgrade Tasks
Follow these steps if you have enabled SSL in OneClick after upgrading to the current release or if you have changed the OneClick ports after upgrading to the current release:
  1. Log in to the OneClick WebApp administration page. The default URL is:
    https://<webapp-hostname>:<webapp-port>/spectrum
  2. Log in with the
    spectrum/spectrum
    username/password credentials and select
    Manage
    .
    PostUpgradeTaskWebApp Authentication
  3. Select
    Show Config
    , to view the configuration.
    PostUpgradeTaskWebApp Show Config
  4. Add the following for the JVM Arguments under the
    Application – Java
    section after the
    –Dsun.awt.noerasebackground=true
    entry:
    -Djavax.net.ssl.trustStore=${SPECROOT}/custom/keystore/cacerts-Djavax.net.ssl.trustStorePassword=changeit
    PostUpgradeTaskWebApp JVM Arguments
    Cross verify these values with the OneClick tomcat server.xml configuration (only if SSL is enabled).
    Do not set the ${SPECROOT} to an absolute path. However, change the path/filename of the keystore (the default is cacerts) and password (the default is changeit) if they are not the default entries.
  5. Navigate to the
    Launcher configuration>Main Arguments
    section and select the OneClick Hostname, OneClick port, and the SSL values, if SSL is enabled, change the –ssl to true.
    PostUpgradeTaskWebApp Main Arguments
    These values should be in sync with the OneClick details. The SSL port should be the same as your original Tomcat SSL port, that is 8443 (if SSL is enabled). If you changed the OneClick port, change it.
  6. After you have made the changes, select
    Apply
    on the top left corner and re-launch the OneClick WebApp from the administration page.
    PostUpgradeTaskWebApp Main Arguments
  7. Launch the OneClick Admin page and select the OneClick WebApp option, to launch the OneClick WebApp application.
CAC Support for the OneClick WebApp
After configuring SSL, configure Common Access Cards (CAC) authentication on the OneClick WebApp.
Follow these steps
  1. Configure CAC for
    DX NetOps Spectrum
    OneClick, see How to Configure
    DX NetOps Spectrum
    for SSL and CAC Authentication
    .
  2. Log in to the OneClick WebApp administration page. The default URL is:
    https://<webapp-hostname>:<webapp-port>/spectrum
  3. Log in with the
    spectrum/spectrum
    username/password credentials and select
    Manage
    .
    PostUpgradeTaskWebApp Authentication
  4. Select
    Show Config
    , to view the configuration.
    PostUpgradeTaskWebApp Show Config
  5. Add the following for the JVM Arguments under the
    Application – Java
    section after the
    -Djavax.net.ssl.trustStorePassword=changeit
    entry:
    -Djavax.net.ssl.keyStore=${SPECROOT}/custom/keystore/cacerts -Djavax.net.ssl.keyStorePassword=changeit
    PostUpgradeTaskWebApp JVM Arguments
    Cross verify these values with the OneClick tomcat server.xml configuration (only if SSL is enabled).
  6. Verify that your JVM arguments are as follows:
    -Xmx1024m -Djavaws.cfg.jauthenticator=true -DbrowserIp=${clientIp} -Dsun.awt.noerasebackground=true -Duser.timezone=${clientTimeZone} -Djavax.net.ssl.trustStore=${SPECROOT}/custom/keystore/cacerts -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStore=${SPECROOT}/custom/keystore/cacerts -Djavax.net.ssl.keyStorePassword=changeit
    Do not set the ${SPECROOT} to an absolute path. However, change the path/filename of the keystore (the default is cacerts) and password (the default is changeit) if they are not the default entries.
  7. Navigate to the
    Launcher configuration>Main Arguments
    section and add
    –cacEnabled true
    to the end of the entry.
    PostUpgradeTaskWebApp Main Arguments
  8. After you have made the changes, select
    Apply
    on the top left corner and re-launch the OneClick WebApp from the administration page.
    PostUpgradeTaskWebApp Main Arguments
  9. Launch the OneClick Admin page and select the OneClick WebApp option, to launch the OneClick WebApp application.
(Optional) Configure WebApp User Session Timeout
When a session is inactive for a specific duration, the session automatically logs out after the defined time. You can configure the user session timeout for WebApp users. By default, the session timeout option is disabled. You can enable the session timeout and set the inactive time after which the session must be timed out.
Follow these steps:
  1. Log in to the OneClick WebApp administration page.
    Default URL:
    https://<webapp-hostname>:<webapp-port>/spectrum
  2. Select Manage.
  3. Select Application, Config.
  4. Navigate to the
    Application - Session
    section.
  5. Enter a duration for which session must be active, in the
    Session Timeout
    field.
    Default:
    300 (seconds)
  6. Toggle the
    Timeout if Inactive
    field to ON or OFF.
  7. Click
    Apply
    , to save your changes.
  8. Relaunch the OneClick WebApp.
Troubleshooting OneClick WebApp
This section describes the steps you can take to troubleshoot some common issues that you may face during WebApp configuration.
Troubleshooting Enabling the SSL support
This section discusses the procedure to troubleshoot any error while enabling the SSL Support.
Follow these steps:
  1. Log in to the OneClick WebApp administration page. Refer to the $SPECROOT/webtomcat/conf/server.xml file for webapp port details.
    Default URL
    : https://<webapp-hostname>:<webapp-port>/spectrum
  2. Log in with the spectrum/spectrum as a username/password.
  3. Select Manage.
  4. Check whether the OneClick WebApp is enabled or not. If it is not enabled you see the Enable button on the top right corner.
  5. Select
    Enable
    , if the option is in the disable state.
  6. Select Show Config, If it is already enabled. The JVM arguments contain the trustStore path and password under the application.
  7. Verify the data with OneClick Tomcat server.xml configuration.
  8. Navigate to the Launcher configuration, Main arguments.
  9. Verify that arguments point to the localhost, where the SSL port and the -ssl is be set to true.
Troubleshooting Launching/Starting Webtomcat
Follow these steps:
  1. Check the
    tomcat/conf/server.xml
    and the
    webtomcat/conf/server.xml
    files for any port conflicts (often port conflicts will shut down the port).
  2. For Linux, the webtomcat does not start if the XVFB is not installed. Refer to the section on Steps to run OneClick WebApp on Linux on this page.
Common Errors with OneClick and Action Required
Error:
Spectrum Tomcat is running in SSL mode, Please configure Spectrum WebTomcat also in SSL mode.
Solution:
When OneClick is in HTTPS, WebApp also must be in HTTPS.
Error:
Not able to reach OneClick Webapp. The process might be stopped. Please start the Spectrum WebTomcat Process and re-launch.
Solution:
In case the WebApp process is down, start the WebApp process.
Error:
Request Processing failed. Please refer tomcat log for more details.
Solution:
In case of any other issues, WebApp shows an appropriate error. Refer to the tomcat log for more details and take appropriate action.
Error:
When I launch the WebApp from OneClick administration page, application gets redirected to Administration page. I see the following errror in the tomcat log.
java.lang.reflect.InvocationTargetException Caused by: java.lang.NoClassDefFoundError: org/webswing/ext/services/ImageService
Solution:
The error occurred because the webtomcat jars are not properly loaded. Restart the webtomcat (stop and start) to solve the issue.