Sun GlassFish Enterprise Server v3 Prelude Troubleshooting Guide Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Copyright 2008 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights – Commercial software.
Contents Preface .....................................................................................................................................................7 1 Overview of Enterprise Server Troubleshooting ........................................................................... 13 Identifying the Problem ...................................................................................................................... 13 First Steps ........................................................
Contents Was Application Deployment Successful? ................................................................................ 26 Administrator User Name or Password Not Known ............................................................... 26 Server Will Not Start on Windows (Port Conflict) .......................................................................... 27 Is Another Application Running on the Server's Port? ............................................................
Contents 3 Frequently Asked Questions .............................................................................................................39 Administration FAQs .......................................................................................................................... 39 Which asadmin Commands are Supported? ............................................................................ 39 Application FAQs ...............................................................................
Contents Update Tool FAQs ............................................................................................................................... 45 How Do I Use Update Tool to Extend My Enterprise Server Installation? ........................... 45 Index ......................................................................................................................................................
Preface This guide describes common problems that you might encounter when using Sun GlassFishTM Enterprise Server v3 Prelude and how to solve them. This preface contains information about and conventions for the entire Sun GlassFish Enterprise Server documentation set.
Preface TABLE P–1 8 Books in the Enterprise Server Documentation Set (Continued) Book Title Description Installation Guide Explains how to install the software and its components. Application Deployment Guide Explains how to assemble and deploy applications to the Enterprise Server and provides information about deployment descriptors.
Preface TABLE P–1 Books in the Enterprise Server Documentation Set (Continued) Book Title Description Reference Manual Provides reference information in man page format for Enterprise Server administration commands, utility commands, and related concepts. Related Documentation A JavadocTM tool reference for packages that are provided with the Enterprise Server is located at https://glassfish.dev.java.net/nonav/api/v3-prelude/index.html.
Preface Symbol Conventions The following table explains symbols that might be used in this book. TABLE P–3 Symbol Conventions Symbol Description Example Meaning [] Contains optional arguments ls [-l] and command options. The -l option is not required. {|} Contains a set of choices for a -d {y|n} required command option. The -d option requires that you use either the y argument or the n argument. ${ } Indicates a variable reference. ${com.sun.javaRoot} References the value of the com.sun.
Preface TABLE P–4 Default Paths and File Names (Continued) Placeholder Description Default Value domain-dir Represents the directory in which a domain's configuration is stored. domain-root-dir/domain-name In configuration files, domain-dir is represented as follows: ${com.sun.aas.instanceRoot} Documentation, Support, and Training The Sun web site provides information about the following additional resources: ■ ■ ■ Documentation (http://www.sun.com/documentation/) Support (http://www.sun.
Preface Note – Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources.
1 C H A P T E R 1 Overview of Enterprise Server Troubleshooting This chapter describes the tools, methods, and information sources available for troubleshooting Sun GlassFish Enterprise Server v3 Prelude. Guidelines for evaluating and investigating a problem are included.
Identifying the Problem Verify System Requirements and Configuration Problems are often caused by configuration issues (system, JVMTM, server, or application-level) and by resource issues (such as when a system runs out of memory). Refer to the Sun GlassFish Enterprise Server v3 Prelude Release Notes for the latest information regarding system requirements dependencies. Review Known Issues Your problem might be related to a known issue for the release.
Identifying the Problem Note – Some resources refer to GlassFish v3 Prelude. GlassFish v3 Prelude is the community version of the commercially supported offering, Sun GlassFish Enterprise Server v3 Prelude. The software is the same; the difference is in support. Search the SunSolve Knowledgebase SunSolveSM is Sun's informational and patch database service with a browseable directory of all publicly available Sun Microsystems support documents. SunSolve is available at http://sunsolve.sun.com.
Identifying the Problem ■ Have any patches been applied? If so, what are the product and operating system patch numbers? ■ What other products and technologies are installed and being used in the installation? ■ How many application servers, web servers, and directory servers are installed? What are the products and versions? ■ How is the web server connected to Enterprise Server? On the same system? ■ How is Enterprise Server connected to the directory server? ■ What JDBC driver is being used t
Troubleshooting Tools By default, all Enterprise Server log information is captured in the server.log file, typically located in domain-dir/logs. Log Viewer is not available in Enterprise Server v3 Prelude. You cannot view the server's log file or configure logging using the Administration Console. To view log information, open the server.log file in a text editor. You can also use command-line file viewing commands such as tail, grep, or more. Logging is configured by editing the logging.
Troubleshooting Tools Stack Traces and Thread Dumps A stack trace is a user-friendly snapshot of the threads and monitors in a Virtual Machine for the Java platform (Java Virtual Machine or JVM machine). A thread dump shows what every thread in a JVM is doing at a given time and is useful in debugging. When the application server freezes, hangs, or becomes sluggish for no apparent reason, you should generate and analyze a thread dump. This section explains how to obtain a thread dump for Enterprise Server.
Where to Go for More Information Where to Go for More Information ■ Product page: http://www.sun.com/software/products/glassfishv3_prelude/index.xml ■ Comparison between Sun Java System Application Server 9.1 (GlassFish v2) and Enterprise Server v3 Prelude: https://glassfish.dev.java.net/public/comparing_v2_and_v3.html ■ Support and services: http://www.sun.com/software/products/glassfishv3_prelude/support.xml ■ SunSolve knowledgebase: http://sunsolve.sun.
2 C H A P T E R 2 Specific Issues This chapter lists problems that you might encounter when using Sun GlassFish Enterprise Server v3 Prelude. The following issues are addressed.
Cannot Access Local Server (http://localhost:8080) Did the Server Start? Description If the console window is still open, the expected message is: Domain domain Started where domain is the name of the default domain. This indicates that the default domain was started successfully. If the console window is already closed, check for messages in the log file: as-install/domains/domain1/logs/server.
Cannot Access Remote Server Cannot Access Remote Server When attempting to open the start page of Enterprise Server, the initial screen does not appear. When this error occurs, check the following: ■ ■ “Is the Server Available Locally?” on page 23 “Is the Proxy Setting Causing a Problem?” on page 23 Is the Server Available Locally? Description If the server cannot be accessed from the web, but it is running locally, then the server is actually running. Solution Verify that the server is running locally.
Cannot Access the Administration Console ■ Set the browser to bypass the proxy server when accessing localhost. Refer to the browser's help system for information about how to do this. ■ Use the fully-qualified host name or IP address of your system; for example: http://myhost.mydomain.com:8080/ ■ Create an entry in the system's hosts file (for example, pointing 127.0.0.1 to localhost; 127.0.0.1 is not proxied).
Cannot Access a Server Application Is the Administration Console Running on the Expected Port? Description The default port number for the Administration Console is 4848. However, it could be running on a different port number than expected, either because it was intentionally installed there, or because that port was in use when the server was started.
Cannot Access a Server Application Solution Review the information in “Did the Server Start?” on page 22 to determine if the server is running. The server must be running before a server application can be accessed. Was Application Deployment Successful? Description An application must be successfully deployed before it can be accessed. Solution Check the server's log file: as-install/domains/domain1/server.
Server Will Not Start on Windows (Port Conflict) Note – The commands will still expect a value for --username (or -u) and --password (or -w). But these can be dummy values, since the server side does not impose any security. 4 Start the server. At this point, the server does not have command-line security.
Two Server Instances Bind to Same Port on Windows Is Another Application Running on the Server's Port? If another application is using the server's port, stop the other application, then restart Enterprise Server. Has an Ungraceful Shutdown Occurred on a Previously Running Server? Use the asadmin stop-domain command to stop the server, or explicitly kill the Java process and then restart Enterprise Server.
Issues Related to Applications Cannot Produce a JVM Thread Dump After Server Crash Description If Enterprise Server crashes, the server dumps a core file and, by default, restarts with the -Xrs flag, which prevents the dump of a JVM thread dump.
Issues Related to Applications ■ Forum threads: http://forums.java.net/jive/thread.jspa?messageID=301326 and http://forums.java.net/jive/thread.jspa?messageID=318879 ■ Blog post: “EJB 3.1 in GlassFish v3 Prelude” (http://blogs.sun.com/kensaks/entry/ejb_3_1_in_glassfish) ■ Blog post: “Deployment in GlassFish v3 Prelude” (http://blogs.sun.
Issues Related to asadmin getResource or getResourceAsStream, consider using getClass().getResource, which returns a URL object, then invoke the url.setUseCaches method to turn off caching for that jar file, and use url.getInputStream() to obtain the stream. Although turning off caching for access to the jar file can slow performance, this approach does allow the application to be undeployed or redeployed. Note also that if the getClass().
Issues Related to asadmin Error: Could Not Start Domain Description This message comes from Sun Java System Application Server 8. The full message looks like either: Could not start the domain. There are no domains. or Could not start the domain. No default domain. Need to enter a domain.
Issues Related to Eclipse Using asadmin set Command Might Produce Unexpected Results Description Unexpected results are returned when setting variables in a command, such as: asadmin set name={$a-b} In this case, name is set to b, not {$a-b} because the shell syntax ${a=b} is interpreted as “if the variable a is unset, substitute the value b, otherwise substitute the value of a.” This is standard shell behavior. For example, consider the following: asadmin set default-config.http-service.http-listener.
Issues Related to Installation and Upgrade Solution This problem only occurs on Windows platforms and is related to an HTTP connection socket error. For more information, see the following: ■ ■ Forum threads: http://forums.java.net/jive/thread.jspa?messageID=316148 and http://forums.java.net/jive/thread.jspa?messageID=316905 Issue report: http://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=72 Note – The netstat -ab command shows the PID and might prove useful.
Issues Related to JNDI For information about updating an existing Enterprise Server v3 Prelude installation, see Chapter 2, “Updating an Existing Enterprise Server v3 Prelude Installation,” in Sun GlassFish Enterprise Server v3 Prelude Installation Guide. Issues Related to JavaMail Cannot Configure JavaMail Resources Description You cannot configure JavaMail resources using the Administration Console. Solution JavaMail resources are not supported by Enterprise Server v3 Prelude. The mail.
Issues Related to MySQL Issues Related to MySQL Exception When Creating MySQL Connection Pool Description On Windows, you get an exception when creating a MySQL connection pool using the Administration Console. Solution See “Attempt to Use Administration Console to Create a Connection Pool Fails Even if the Driver Is Present (Issue 6671)” in Sun GlassFish Enterprise Server v3 Prelude Release Notes. Issues Related to Security java.security.
Issues Related to Security grant codeBase "file:/.../build/sparc_SunOS/sec/-" { permission java.util.PropertyPermission "*", "read,write"; }; Mutual Authentication Not Working With the Application Client Description This failure can occur when the keystore and truststore properties are not set properly. Solution Set the following properties on the JVM: javax.net.ssl.keyStore= ;javax.net.ssl.
3 C H A P T E R 3 Frequently Asked Questions This chapter lists Frequently Asked Questions (FAQs) related to Sun GlassFish Enterprise Server v3 Prelude. This list is certain to grow. For the latest FAQs, also see the GlassFish wiki at http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishFAQIndex.
Application FAQs Application FAQs How Do I Debug Applications? See Chapter 3, “Debugging Applications,” in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide. How Do I Change Application Permissions? See “Changing Permissions for an Application” in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide. What Are the Restrictions and Optimizations for Session Beans? See “Session Bean Restrictions and Optimizations” in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.
Extensibility FAQs ■ Download: Download the plugin from within Eclipse using the Download Additional Server Adapters link on the New Server Wizard. See the Downloads page for additional information (https://glassfishplugins.dev.java.net/download/index.html). If you have difficulty downloading the plugin from within Eclipse, you could be experiencing an Eclipse update center network problem. Try again at another time. ■ Release Notes: https://ajax.dev.java.net/eclipse/releasenotes.
Java Persistence FAQs Java Persistence FAQs What Are the Restrictions and Optimizations for the Java Persistence API? See “Restrictions and Optimizations” in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide. What Java Persistence Support Is Available? Java Persistence 1.0 support in Enterprise Server v3 Prelude is available as follows: ■ ■ ■ EclipseLink 1.0 Hibernate EntityManager OpenJPA JDBC FAQs Is JDBC Support Provided? Yes, Enterprise Server v3 Prelude includes JDBC support.
Rails and JRuby FAQs OpenESB FAQs Does Enterprise Server v3 Prelude Support OpenESB? No, OpenESB v2 runs on Sun Java System Application Server 9.1 (GlassFish v2). For more information about OpenESB, see https://open-esb.dev.java.net. Rails and JRuby FAQs Should I Start an Enterprise Server Domain and Deploy My Application Into It, or Should I Use the glassfish_rails Gem? To continue the question: I'm not sure what the second option does, or why I might choose one over the other.
Rails and JRuby FAQs Response: Place them in the domain/lib directory, or in glassfish/lib. If those bundles are OSGi bundles, you should place them in the glassfish/modules directory. If you want to package your own set of jar files with the Rails application, instead of copying the jars in the glassfish/lib or glassfish/modules directory, you might want to use Warbler. The Warbler gem lets you package your own jars and creates a WAR file from your Rails applications.
Update Tool FAQs Security FAQs What Happens When No Server Side Realm Is Configured? When the application is configured (within XML files), but no server side realm is configured, the application is authenticated in the default realm. No error is thrown that indicates “No such realm.” Can I See the TLS/SSL Handshake Information for an SSL Client? Yes. Set the Java debugging property on the JVM.
Update Tool FAQs After you start your Enterprise Server instance, the default location for the Administration Console is http://localhost:4848/ (at least one Enterprise Server domain must be started before you can launch the Administration Console). Unless you declined to check for updates during installation, you will be notified of available updates in the message area. Update Tool can also be accessed on the command line by running the updatetool command in the as-install/bin directory.
Index A E add-on components, developing, 41 admin password, not known, 26-27 admin username, not known, 26-27 Administration Console, cannot access, 24-25 Administration Console, extending, 41 administration FAQs, 39 application, cannot access, 25-27 application FAQs, 40 application issues, 29-31 asadmin issues, 31-33 EAR, cannot deploy, 29-30 Eclipse FAQs, 40-41 Eclipse issues, 33-34 EJB support, 29-30 extensibility FAQs, 41 C cannot access Administration Console, 24-25 cannot access local server, 21-
Index J R Java Persistence FAQs, 42 JavaMail issues, 35 JDBC FAQs, 42 Jersey FAQs, 42 JNDI issues, 35 JRuby FAQs, 43-44 JSR 88, 30 Rails FAQs, 43-44 release contents, 14-15 release resources, 19 remote server, access fails, 23-24 rpm, 17 S K kill processes, 17, 32 known issues, 14 L local server, access fails, 21-23 log files, 16-17 security FAQs, 45 security issues, 36-37 server how default port number can change, 22 will not start on windows, 27-28 showrev, 17 stack traces, 18 SunSolve, 15 system r