- 论坛徽章:
- 0
|
CDE无法启动问题
PROBLEM
Users are unable to log into CDE (Common Desktop Environment). The system returns to the CDE login banner and no error messages are being displayed by the system.
RESOLUTION
NOTE: This document assumes that the CDE login banner (dtgreet) appears, the login process fails for each user and no "Unable to initialize or connect to the Desktop messaging system." ToolTalk error messages are being displayed.
GENERAL CDE LOGIN TROUBLESHOOTING CHECKLIST
1. Determine whether or not the root user or any other user is able to successfully login through the CDE login banner.
NOTE: If root is able to login, but NO other users are able to login, please refer to the ONLY THE ROOT USER IS ABLE TO LOGIN; section below for more information on troubleshooting this issue; otherwise, please refer to the following troubleshooting steps.
2. From the CDE login select, Options ->; Session ->; Failsafe Session (or Command Line Login) and login as the root user.
NOTE: If the user is unable to login through the command-line or failsafe mode, this indicates that the problem is not specific to CDE and the problem may be related to something within the user's environment (i.e., $HOME/.profile, $HOME/.cshrc, $HOME/.login, permissions on the user's $HOME directory, etc.). These issues must be resolved before the user will be able to successfully log into CDE.
3. Run: /usr/contrib/bin/X11/dr_dt
At the end of the output from this script a summary will appear:
Dr_dt finished with:
[num] ERROR messages
[num] WARNING messages
The ERROR and WARNING messages must be resolved before CDE will run properly.
NOTE: Exception to WARNING messages:
The /usr/contrib/bin/X11/dr_dt script checks for exact permission matches. If the permission on /etc/hosts, are 644 (rw-r--r--), a WARNING will be given that permissions should be 444 (r--r--r--). Messages indicating that the system has greater than require permissions can usually be ignored.
4. Check for errors in the CDE log files:
NOTE: You may want to check the date on each file to verify that it is current.
o /var/dt/Xerrors
o $HOME/.dt/errorlog
o $HOME/.dt/startlog
Compare the $HOME/.dt/startlog against that of a working user or to that of this user on a working system. The contents should be similar to the following:
o --- /usr/dt/bin/Xsession starting...
o --- Xsession started by dtlogin
o --- sourcing /root/.dtprofile...
o --- sourcing /usr/dt/config/Xsession.d/0010.dtpaths...
o --- sourcing /usr/dt/config/Xsession.d/0020.dtims...
o --- sourcing /usr/dt/config/Xsession.d/0030.dttmpdir...
o --- sourcing /usr/dt/config/Xsession.d/0040.xmbind...
o --- sourcing /usr/dt/config/Xsession.d/0060.srcsysenv...
o --- starting /usr/dt/bin/dthello &
o --- starting /usr/dt/bin/dtsearchpath -ksh
o --- starting /usr/dt/bin/dtappgather &
--- execing /usr/dt/bin/dtsession...
NOTE: Verify that "execing /usr/dt/bin/dtsession" appears near the end of this $HOME/.dt/startlog file. This line indicates that the start-up sequence is not hanging on a specific start-up script.
If any additional scripts are being sourced (in the user's $HOME directory or in the /etc/dt/config/Xsession.d/ directory), please check the contents of these scripts to ensure that the commands within these scripts can be successfully executed at the command line.
5. Check the file systems for lack of space (i.e., at or close to 100%):
/usr/bin/bdf
NOTE: Commonly, the system will run out of file space when a large core file is in the file system's $HOME directory or one of its subdirectories (i.e., /var/adm/crash/core). Therefore, you will need to remove any CORE files or other large files to decrease the file system usage to allow the users to login.
6. Rename the user's CDE-specific files:
mv $HOME/.dtprofile $HOME/.dtprofile.orig
mv $HOME/.dt $HOME/.dt.orig
mv $HOME/.profile $HOME/.profile.orig (sh or ksh users)
mv $HOME/.login $HOME/.login.orig (csh or tsch users)
mv $HOME/.cshrc $HOME/.cshrc.orig (csh or tcsh users)
7. Exit Command Line mode and log into the standard CDE session.
NOTE: If the user is able to log into CDE, this indicates that there is something specific within the user's CDE environment that is causing this problem to occur. Compare the user's environment files (noted above) to the environment files for a working user or selectively move the files back into place to isolate the cause of the problem.
Common problems in the user's $HOME/.profile file include:
o Sourcing scripts that are failing or hanging.
o Setting the DISPLAY environment variable outside of the following code segment within this file:
if [ ! "$DT" ] ; then
NOTE: CDE takes care of setting the DISPLAY environment variable; therefore, it should NEVER be set manually. Refer to the comments in the $HOME/.dtprofile file for more information.
o Executing commands that require user input (such as menus or stty settings) outside of the following statement:
if [ ! "$DT" ] ; then
NOTE: Refer to the comments in the $HOME/.dtprofile file for more information.
o Using undefined variables and using set -u for the sh and ksh shells.
NOTE: Verify that if set -u is being used, all environment variables are defined BEFORE they are referenced with a $<ENV_VAR_NAME>;; command otherwise, the set +u command needs to be inserted around the blocks of code.
For example, do NOT define:
SHLIB_PATH=/usr/somedirectory/lib SHLIB_PATH'
when $SHLIB_PATH is initially unset. This generates an error, which exits the shell and returns the user to the login banner.
SPECIFIC LOGIN FAILURES
ONLY THE ROOT USER IS ABLE TO LOGIN
1. Check the permission/ownership on the following files:
2. -r--r--r-- 1 bin bin 616 Jul 1 16:03 /etc/hosts
3.
4. (The following files may or may not exist
5. -rw-r--r-- 1 root sys 833 Jun 8 1999 /etc/nsswitch.conf
6. -rw-r--r-- 1 root sys 159 Jun 8 1999 /etc/resolv.conf
-r--r--r-- 1 root sys 1010 Jun 25 18:22 /var/adm/inetd.sec
7. Determine whether or not a non-root user is able to resolve the name of the system:
/usr/bin/nslookup <hostname>;
/usr/bin/nslookup <IP address>;
where <hostname>; is the hostname and <IP address>; is the IP address for this system.
NOTE: These commands check for duplicate IP addresses or hostnames as well as any problems that may exist with the name resolution on the system.
If nslookup fails then CDE will fail to start.
If the new hostname and/or IP address cannot be resolved, please refer to document KBRC00008083: "Resolving a system's hostname and IP address locally" for more information on how to set-up the system to resolve the hostname locally.
8. Check the /var/adm/inetd.sec file for the following contents:
9. dtspc allow [hostnames or '*'. No aliases]
10. spc allow [hostnames or '*'. No aliases]
mserve allow [hostnames or '*'. No aliases]
If these lines are NOT already contained within this file, add them and execute the following command to force the system to re-read the file:
/usr/sbin/inetd -c
11. Check the NFS mounted home directories:
o Login as a non-root user via Command Line mode and verify that the user can create new files or write to existing files in his/her $HOME directory.
o If the user is unable to create new files or write to existing files within his/her $HOME directory, this indicates that the NFS server has dropped the write permissions for this directory. Therefore, you will need to fix the permissions and execute the following command on the NFS server:
/usr/sbin/exportfs
o If you continue to experience problems, create a new user with a $HOME directory on a local file system in an effort to isolate the problem.
12. Reaching Disk Quotas (if using quotas):
Use the following command to increase the quotas or remove files:
/usr/bin/quota -v username
13. If a sub-set of the users are unable to log into CDE, you may want to try identifying similarities among these users by moving their CDE customization files as detailed in the GENERAL TROUBLESHOOTING section above.
14. Verify that the $LANG environment variable is set correctly.
NOTE: This $LANG environment variable should be set to "C" or un-set on an American English system.
FAILSAFE LOGIN WORKS, STANDARD LOGIN HANGS AT THE BLUE COPYRIGHT SCREEN
1. Check the /var/adm/syslog/syslog.log file for any RPC error messages.
2. Check the user's $HOME/.dt/startlog and $HOME/.dt/errorlog files for any RPC error messages.
3. Run /usr/bin/rpcinfo -p and verify that rpc is able to connect to the portmapper (HP-UX 10.20) or rpcbind (HP-UX 11.0) and list the registered services.
NOTE: CDE utilizes ToolTalk services, which are RPC-based. Therefore, if the RPC services are not functioning, CDE will not work as expected.
STANDALONE (NOT ON THE NETWORK) HP-UX 11.0 SYSTEMS
1. Login via Command Line Mode.
2. Check the user's $HOME/.dt/startlog and $HOME/.dt/errorlog files for any MIT-MAGIC-COOKIE error messages.
NOTE: These messages are due to changes in X authentication at 11.X.
3. Copy the Xconfig file from the /usr/dt/config/ directory to the /etc/dt/config/ directory:
cp -p /usr/dt/config/Xconfig /etc/dt/config/Xconfig
NOTE: If this file already exists in the /etc/dt/config/ directory, these modifications can be made to the existing file.
4. Edit the /etc/dt/config/Xconfig file and turn off MIT-MAGIC-COOKIE authorization by uncommenting the following line within this file:
# Dtlogin*authorize: False
5. Add the '-ac' option to the last line of the /etc/dt/config/Xservers file:
From:
* Local local@console /usr/bin/X11/X :0
To:
* Local local@console /usr/bin/X11/X :0 -ac
6. Force CDE to re-read the configuration files:
/usr/dt/bin/dtconfig -reset'
7. Log out of command line mode and allow CDE to start-up.
HP-UX 10.20: "INCORRECT LOGIN: WHEN LOGGING IN THROUGH STANDARD CDE
1. The /etc/pam.conf file may have become corrupt; therefore, replace this file with default configuration file:
cp -p /usr/newconfig/etc/pam.conf /etc/pam.conf
2. Check the permission and ownership on the following files:
3. -r--r--r-- 1 root sys 892 Jun 8 1998 /etc/pam.conf
4. dr-xr-xr-x 24 bin bin 1024 Jan 12 1998 /usr
5. dr-xr-xr-x 9 bin bin 1024 Aug 14 1997 /usr/dt
6. dr-xr-xr-x 2 bin bin 2048 Jan 13 2000 /usr/dt/bin
7. dr-xr-xr-x 37 bin bin 8192 May 20 1997 /usr/lib
8. -r-xr-xr-x 1 bin bin 28672 May 30 1996 /usr/lib/libpam.1
9. dr-xr-xr-x 2 bin bin 1024 Jun 8 1998 /usr/lib/security
10. -r-xr-xr-x 1 root sys 90300 Feb 5 1999 /usr/lib/security/libpam_unix.1
NOTE: The /var/adm/syslog/syslog.log file may contain "load_modules: cannot open module /usr/lib/security/libpam_unix.1" error messages indicating permission or ownership problems.
Too much or too little permission can prevent the user from logging into CDE.
CDE LOGIN FAILS FOR XTERMINALS OR PCS
1. Determine whether or not a non-root user is able to resolve the name of the system:
/usr/bin/nslookup <hostname>;
/usr/bin/nslookup <IP address>;
where <hostname>; is the hostname and <IP address>; is the IP address for this system.
NOTE: These commands check for duplicate IP addresses or hostnames as well as any problems that may exist with the name resolution on the system.
If nslookup fails then CDE will fail to start.
If the new hostname and/or IP address cannot be resolved, please refer to document KBRC00008083: "Resolving a system's hostname and IP address locally" for more information on how to set-up the system to resolve the hostname locally.
2. Set up a font server on the HP-UX host, which includes the fonts necessary for CDE to function properly.
NOTE: Detailed steps for setting up a font server on an HP system can be found in document KBRC00007794: "Configuring and setting up a font server". Please refer to the ADDITIONAL INFORMATION section below for more information on how to access this document.
HP-UX 11.00: "CLIENT NOT AUTHORIZED" ERRORS IN $HOME/.DT/STARTLOG FILE
This error message will occur if the system has multiple network cards installed. This problem was resolved in the latest CDE patch; however, it can be resolved with the following workaround until this patch can be installed:
1. Create an Xsession.d script in the /etc/dt/config/Xsession.d/ directory (i.e., 0000.xauth) with the following contents:
2. #!/usr/bin/ksh
3. # HP-UX 11.0 temporary fix for multiple LAN interfaces
4. # to guarantee that MIT-MAGIC-COOKIE is added to Xauthority.
5. # for hostname:0
6. #
7.
8. if [ "$DISPLAY" = "$(hostname):0" ]; then
9. xauth add "$(hostname):0" . \
10. $(xauth l "$(hostname)/unix:0" | awk '{print $3}')
fi
NOTE: This script extracts the cookie that has been added for the UNIX socket (hostname/unix:0), and adds the cookie back as hostname:0.
11. Change the permissions on this file to be executable by all users:
chmod 755 /etc/dt/config/Xsession.d/0000.xauth
TIPS
NOTE: Each user should be logged out of the system before executing these commands:
1. Stop and re-start CDE:
/sbin/init.d/dtlogin.rc stop
/sbin/init.d/dtlogin.rc start
2. Re-read the CDE configuration files:
/usr/dt/bin/dtconfig -reset
ADDITIONAL INFORMATION
· DOCUMENTS
o KBRC00008083: Resolving a system's hostname and IP address locally
o KBRC00007794: Configuring and setting up a font server
o KBRC00004164: Unable to initialize or connect to the Desktop messaging system
o KBRC00000037: libtt: ttdt_Xt_input_handler(): TT_ERR_NOMP errors in syslog
o KBRC00004659: TT_ERR_NO_MATCH errors in syslog
o KBRC00000054: Enabling Debug Logging from CDE (dtlogin)
To view each of these documents on-line:
7. Go to: http://www.itrc.hp.com.
8. Click on 'search technical knowledge base'.
9. Log into the ITRC.
10. Change the 'Search By' drop list box to 'Search by Doc. Id'.
11. Enter the document ID into the space provided.
· MAN PAGES
o dtwm dtconfig dtlogin
o nslookup inetd rpcinfo
o bdf exportfs quota
o sh mv
· MANUALS
o "X Window System User's Guide", Chapter 6 "Font Specification", by O'Reilly & Associates, Inc. (ISBN: 1-56592-015-5)
o "CDE User's Guide", page 299.
o "CDE Advanced User's & System Administrator's Guide", pages 261-264, 278-279. |
|