previous next trail start tutorial home feedback openwings.org

Openwings Troubleshooting Tips

Questions and Issues

General

  • How do I turn logging on?

  • Executing the core
  • How can I tell everything is working?

  • Why can't I see my platform in the explorer?

  • Why isn't the installer running?

  • Compilation
  • The ant command does not work!

  • "Class Not Found" during compilation!

  • Installation
  • My component is installed but is not listed!

  • Dialogues keeping popping asking me to insert media on Windows!

  • How do I debug the codebase or classpath?

  • How do I debug properties?

  • I'm getting a "component cannot be installed" message. What can I do to find out why it cannot be installed?

  • Execution
  • How can I check if my codebase and classpath are ok?

  • Why won't my component run?

  • How can I debug my component?

  • Program is getting out of memory errors.

  • Can I attach a debugger to my openwings process?

  • Service Discovery
  • How can I tell what services are out there and what my component is publishing?

  • My service is published but is unusable!

  • Networking
  • Problems running on a standalone machine

  • Things don't behave well when I yank the network cable between two platforms!

  • I change my IP address and running applications quit working!

  • How do I isolate my computer while using Openwings?

  • How can I configure Openwings to use unicast Jini discovery?

  • Miscellaneous
  • Can openwings run in an applet?

  • I modified my installable component descriptor, but it doesn't appear to do anything.
  • I'm getting a messsage: cannot load the jvm.dll.
  • I get an UnsatisfiedLinkError when trying to run a component that uses native code. This problem has been observed whether the component was run as a standalone process, inside a container, or with the "owrun" utility.
  • What if I can't find the answer to my question here?

  • Answers and Explanations

    General

  • How do I turn logging on?

  • There are three ways to turn logging on. You can control logging for each application by using its logging Mbean. Click here for information about how to access the logging MBean's UI from the shell.

    Alternatively, you can turn logging on from the Openwings Explorer. Both methods gives you the Debug Logging Control window so that you can turn logging on for a service. Then you can view the process log file detailing descriptive messages generated when you execute some action on your component.

    Finally, if you are having a startup problem you may want to turn logging on for all of Openwings. This can be done through the openwings LogPolicy.xml file, located in <OW_HOME>/openwings-${VERSION}/policies/. Open the LogPolicy.xml file with a text editor, search for the log levels you want (container for instance), and turn on status and error logs (by setting them to true). The error and status variable values appear near the log level itself.

    Be sure to turn logging off after you're done, since it can consume time and disk space.

    Executing the Core

  • How can I tell everything is working?

  • Openwings has a diagnostic tool that you can use to make sure everything is running properly. The diagnostic tool resides in the bin/ directory under Openwings (the script name is owdiagnostic.bat or owdiagnostic.csh, depending on your platform). Execute the tool from a command line. The following parameters are available to you:

    • "local" - will check the following for the local host
    • "all" - will check the following for all hosts on Openwings
    • <host name> - will check this host name is available on the network

    The following diagnostic information will be displayed:

    • Java executable installed
    • Ant executable installed
    • Openwings core installed
    • Network Functions
      • Hostname
      • IPAddress
    • WebServer Operational
    • Jini Discovery
    • Container Discovered
    • Installer Discovered

    Note: for "all" and <host name> parameters, Java and Ant executable is not checked.

  • Why can't I see my platform in the explorer?

  • Verify that you have a valid IP address. The following commands will work on Unix and from a Windows command-line:

    hostname
    ping <hostname>

    If you cannot ping your own host, then you need to configure your network interface.

    If networking is not the problem, then the container manager must be having a problem. Turn logging on for the container, connector, and component logging levels. Then re-run the container manager (ow.bat/ow.csh). The logging output should give you an idea of what is going on [The Openwings team really appreciates stack traces when you report problems.]. See the release notes for more information.

  • Why isn't the installer running?

  • If you "cd" into a platform and you get an "Installer could not be found on this platform!" error, the installer is probably not running. It is possible that you just need to wait for everything to start up. However, if you have waited several minutes and the message still appears, this is almost always a symptom of the container manager and containers not talking to each other. This can be caused by one of several things: Jini may not be working, or the http server may not be working. Use this tip to see if Jini and the http server are working. If they are working, try launching the installer process manually by typing "process -start installer" from the shell. If all else fails, try restarting the container manager (ow.bat/ow.csh). See the release notes for more information.

    Compilation

  • The ant command does not work!

  • Make sure that ANT_HOME is set correctly and the ant executable has been added to your PATH. (In versions of Openwings prior to the 0.8.2 release, there was a bug where the JAVA_HOME environment variable was set incorrectly. Simply change this variable to point to the top level directory where Java is installed, for instance C:\jdk1.4.1\).

  • "Class Not Found" during compilation!

  • Unfortunately, Java interprets manifest files differently at runtime and compile time. The "java" program uses the classpath in the manifest file while "javac" ignores it. We have provided a gd_openwings.jar file that points to all of the jar files you need for running Openwings components. While this works great at runtime, it leaves something to be desired at compile time. So if you get a "Class Not Found" error and would like to import the class, but you have no clue where the class exists in openwings, use the findclass command in the shell. This command was specifically added to solve this problem.

    Installation

  • My component is installed but is not listed!

  • Typically, this is due to the installer not running. The container manager only keeps track of the things it has run before. This installer keeps the information on every component and tells the container manager what is installed. So if the installer is not up and running, the container may not show up in the list. See this tip to debug this problem further.

  • Dialogues keeping popping asking me to insert media on Windows!

  • This problem should be fixed if you update to Java 1.4.1. If you still have the problem, most likely you are using the autoinstall feature of the installer. For each directory that you've configured in the "net.openwings.install.auto_install=" in the openwings properties.txt file, Openwings will periodically check those directories for autoinst.txt files. If these directories are on removable media, Windows has a nasty habit of popping up dialogues asking you to put the media back in. This can be disabled, through a "registry hack" (refer to Microsoft's online developer documentation).

  • How do I debug the codebase or classpath?

  • Install Service will create a log file in the root directory of your component that will help you to debug codebase and classpath errors. The file is named componentLog.txt. This information is outlined in the tutorial here.

    Some possible causes of errors to consider are:

    • a dependent component is not installed
    • a dependent component is installed but is not in a RESOLVED state
    • a spelling error exists (or a typo; missing a period or using parenthesis instead of a brace)
    • circular dependencies exists
    • for codebase, the URL must be a http URL
    • for classpath, the URL must be a file URL

  • How do I debug properties?

  • Install Service will create a log file in the root directory of your component that will help you to debug property errors. The file is named componentLog.txt. This information is outlined in the tutorial here.

    Some possible causes of errors to consider are:

    • a dependent component is not installed
    • a dependent component is installed but is not in a RESOLVED state
    • a spelling error exists (or a typo; missing a period or using parenthesis instead of a brace)
    • the property key does not exist

  • I'm getting a "component cannot be installed" message. What can I do to find out why it cannot be installed?
    You can turn logging on for the Installer. You can do this via the shell or by using the Openwings Explorer. Both ways give you the Debug Logging Control window so that you can turn logging on for the Installer. Then you can view the process log file. There you will find a descriptive message as to why the component could not be installed. Some possibilities are:
    • the installable image jar file could not be authenticated
    • the uniqueID for the component is not unique
    • the InstallableComponentDescriptorPolicy.xml file is null

    Execution

  • How can I check if my codebase and classpath are ok?

  • After you have installed your component, you can run it with a utility called owrun (located in the <OW_HOME>/openwings-${VERSION}/bin directory). Simply type:

    owrun <InstallableComponentDescriptor XML file>

    This utility will verify that every entry on your classpath and code base can actually be found and opened. This will verify everything you have is functional. If items have been omitted, they will show up as "Class Not Found" errors at runtime.

  • Why won't my component run?

  • If you have a component that has dependencies on other components, it cannot run until those dependencies are resolved by the installer. When you do an "ls" in the shell, components that can be run will have an asterisk next to them and will display the words "resolved" and "executable" in verbose mode.

    If you did not mark your component as executable in your installable component descriptor , the container will not know that it is an executable component. For more information on how to edit your installable component descriptor, click here.

  • How can I debug my component?

  • You can use logging and print statements to debug your programs. The output goes into a file with the name of your component, located in a temp directory on your system (The location is defined by the system property java.io.tmpdir). Several hints in this section describe how to debug specific problems. If it comes to the point that you need to attach a debugger, we recommend you use owrun and the java debugger. See this tip.

  • Program is getting out of memory errors.

  • A program that grows in heap indefinitely will cause this. Or, if your platform has very little memory, you may get this. Finally, the container may be set to a low heap limit (the default is 64MB). To change this, edit the Installable Component Descriptor for the container at <OW_HOME>/openwings-${VERSION}/policies/InstallableComponentDescriptorPolicyopenwings_Container.xml. There are two settings in this file which need to be changed:
    1. First, the Java command should be changed. Search for the java command "java -Xmx64m". (This sets the maximum memory on the JVM to 64MB, which is the default.) Change this line to to have a higher value, such as "-Xmx96m" for 96MB.
    2. The second setting you need to change is the property "com.gd.openwings.container.maxMemory". Search for this text, and change the value of the property to the integer corresponding to the value you set above. For example, 64MB = 67108864. (This property is how the container implementation learns the maximum size of the JVM. This won't be necessary in Java 1.4 virtual machines, since the new Runtime.maxMemory() method will be available.)

    Be sure to run the static installer to re-resolve the ICD, then restart Openwings.

  • Can I attach a debugger to my openwings process?

  • Yes. Sun's JVM allows you configure debugging via non-standard JVM options ("-X..."), as described here. Starting with the 1.0 Reference Implementation, you can pass non-standard JVM options to standalone processes by placing them in the command line. To do this, start Openwings Explorer, locate the component you wish to debug, right click, and select "Run". Then make sure "shared container" is deselected, and enter debugging options in the "Command Line Options" field. We recommend something like the following:

    -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

    You could then attach the simple debugger that comes with the JDK using this simple command:

    > jdb -connect com.sun.jdi.SocketAttach:hostname=<host>,port=8000

    Service Discovery

  • How can I tell what services are out there and what my component is publishing?

  • If you are running your component in a container (via the shell), you can "cd" into the Process and then into its Services. From there you can see all the services you have published. You can even "cd" into these services and launch the user interface for the service (if you provided one). You can also run the jini-browser to see what services can be discovered.

  • My service is published but is unusable!

  • This is most likely caused by your codebase not being interpreted correctly by the user of the service. Since Openwings currently uses hostnames for codebase entries, the hostname must be resolvable on the system trying to use the service. You can check this by doing a "ping <hostname>" on the system trying to use the service. If you use a naming service of some type (like dns) you should get this automatically (this is the preferred method). To get something working quickly you can add an entry to your host table. On Unix this is typically in /etc/hosts. On Windows this is typically in \WINNT\system32\drivers\etc\hosts or \Windows\hosts. For a more elaborate test, run your component with owrun and check out each codebase entry by pasting the address into a browser window on the target system (Codebase entries are URLs).

    Networking

  • Problems running on a standalone machine

  • Openwings requires a valid network identity. This means that it has to have a hostname and valid IP address.

    Windows 2000 introduces a unique issue. When you disconnect the cable from a Windows 2000 box your IP address goes away. How inconvenient! Microsoft provides a "registry hack" to get around this "feature". Run regedit and add a new entry:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\DisableDHCPMediaSense

    This needs to be created as REG_DWORD (boolean) and must be set to 1. Reboot the system. Now Windows 2000 will maintain the IP address when the cable is disconnected. The system must still have a valid IP address before it is disconnected from the network. If you need to get a new address using DHCP when connecting to a network, you must do an "ipconfig /renew".

  • Things don't behave well when I yank the network cable between two platforms!

  • This is actually a bug in Jini 1.1. Certain functions in the helper utilities are not threaded, so an unclean loss of a lookup service (yanking the network cable) causes things to hang for several minutes. This is fixed in Jini version 1.2.

  • I change my IP address and running applications quit working!

  • Very few networking applications are tolerant to changes in IP identity. The current workaround is to restart the container manager.

  • How do I isolate my computer while using openwings?
    1. In the file $OW_HOME/openwings-${VERSION}/policies/JiniComponentPolicy.xml,
      replace the string "openwings" with a name of your own choosing. This tells Component Services to only discover services that are registered in the named group.
    2. In the file $OW_HOME/openwings-${VERSION}/policies/ContainerManagerPolicy.xml,
      search for a section that looks something like this:

      <STRING_FIELD
      fieldName = "commandLineParameters"
      value =
      "D:\Profiles\p27824.NA2\LOCALS~1\Temp\/reggie_log openwings"
      />


      (I'd search for "reggie_log openwings") and then replace "openwings" with the same name you used above. This configures your Jini lookup service to handle your new group.

    If you take these two steps, your services will not be discovered by others, and you will not discover other people's services.
  • How can I configure Openwings to use unicast Jini discovery?
    The Openwings Reference implementation uses the policy file ${OW_HOME}/openwings-${VERSION}/policies/JiniComponentPolicy.xml to configure Jini discovery. Out of the box, Openwings does multicast discovery on the Jini group "openwings", and unicast discovery to the local host. (The unicast discovery to the local host is provided as a convenience - if you don't have multicast configured correctly in your network or are running disconnected, at least you can still discover services on your local host.) If you want to configure unicast discovery to a well-known lookup service, replace "localhost" with the desired hostname in JiniComponentPolicy.xml.
  • Miscellaneous

  • Can Openwings run in an applet?

  • There are ways to do this, however the current release is not set up to support this out of the box. The lib files in the Openwings components and static components have to be added to the web server and your codebase. Then of course there are those security issues. Look for better support for this in the next release (watch the bug list also).

  • I modified my installable component descriptor, but it doesn't appear to do anything.

  • Once your component has been installed on the system, the installer maintains the state of of your installable component descriptor. As a courtesy the installer makes a copy of your installable component descriptor that shows the current resolution state of your component. As things change on the system the installer often has to re-write this file, hence a user modifying this file is not a great idea. A future enhancement to Openwings will provide a way to modify the installable component descriptor after it is installed. Owrun on the other hand will use the ICD you give it to run your component. When debugging your ICD, it is recommend you install once on the system, edit the icd, and use owrun. You can then debug without having to install and uninstall all the time.

  • Cannot load the jvm.dll
  • Uninstall all java programs and reinstall the JDK.

  • I get an UnsatisfiedLinkError when trying to run a component that uses native code. This problem has been observed whether the component was run as a standalone process, inside a container, or with the "owrun" utility.
  • See the Native Code page.

  • What if I can't find the answer to my question here?

  • Check our bug database and our release notes for known issues. If it's not covered there, start a discussion on the Openwings mailing list, submit a bug report, or send your question to us.

    Back to Tutorial Trails

    back to top

    Copyright 2003, General Dynamics Decision Systems. All rights reserved.

    previous next trail start tutorial home feedback openwings.org