Subject : How to resolve "All ports busy" on serial port Solaris 2.x

DETAIL DESCRIPTION:



For Solaris 2.x systems:
-----------------------

1) Port Monitor를 Disable 또는 삭제한후

     tip -9600 /dev/cua/a

   Make sure that you are not trying to access a device that has been 
   incorrectly specified in /etc/remote when using the tip command. 
   Use the device /dev/cua/a, for example, and not /dev/term/a.

2) There could be a permissions problem on the device.
   Change the permissions and owner of the modem port:

   #chmod 666 /dev/cua/a 
   #chgown uucp /dev/cua/a

   To verify the permission bits and owner,  use the following
   options to ls to follow the link to the actual device:

   #ls -Ll /dev/cua/a 

   Note: If cu is abruptly killed, the device will be left
   with an owner of the last user using cu.

3) Check for a lock file in /var/spool/locks. If there is
   a lock file, for example LK.032.028.001, then cat the
   file. The number displayed is the PID of a process.
   Use the ps command above to determine if the process
   is still active. Try removing the lock file. IF you
   still get "All ports busy," then the process must 
   be killed. If the process is defunct, it cannot be
   killed and rebooting will be necessary. This happens
   because the driver is waiting at an unkillable level
   for a device to respond.

4) Another process has the port open. This might be another tip
   session or another program like lp. It could also be a port monitor.

   #ps -ef |grep tip

   Do the following as root: (use appropriate device)

   #fuser /dev/cua/a 
   /dev/cua/a:      652o     651o 
                                 
   #ps -ef | grep 652
   #ps -ef | grep 651

   The process id's, PID's,  are 652 & 651 ( drop the o )

   If the process using the port is /usr/bin/login or ttymon then
   either somebody has dialed into your machine hence the modem 
   will be active or the modem may be asserting DCD all the time. 
   Inwhich case check the jumpers and modem settings. 
 
5) IF the process is "ttymon" there are two ways to kill the
   process. The easiest is to use Admintool and select
   port -> Edit -> Delete Service. You should now
   be able to tip or cu to the port. (The modem is no longer
   configured for dial-in).

   The command to remove the service is:

   #pmadm -r -p zsmon -s 

   (use pmadm -l to determine SVCTAG)

6) Try bringing the system down to single user mode and then back
   up to multiuser mode.

   exit Windows
   init S
   type control-d
   
7) The following removes the devices and recreates them without
   rebooting (do not perform a boot -r if a SparcStorage Array exists):

   a) To determine the physical device name:

   ls -al /dev/term/a
   lrwxrwxrwx   1 root     root          32 Jul 27  1995 /dev/term/a -> 
   ../../devices/obio/zs@0,100000:a

   cd /devices/obio
   ls zs*:a*                     
   zs@0,100000:a     zs@0,100000:a,cu
  
   ls -al zs*:a*
crw-------   1 lp       tty       29,  0 Feb 19 14:01 zs@0,100000:a
crw-rw-rw-   1 uucp     uucp      29,131072 Dec 26 14:08 zs@0,100000:a,cu

   There are two physical devices for a serial port. Each has a different
   minor number which allows the operating system to identify which
   driver to use. The a,cu (/dev/cua/a) device is typically used for
   modem control and outgoing transactions. 

   b) remove the devices:

   rm zs*:a*             

   c) then remove the links

   cd /dev/term
   rm a
   cd /dev/cua
   rm a

   d) Recreate the devices in /devices and then use ports to
      recreate the links.

   /usr/sbin/drvconfig  
   /usr/sbin/ports     

8) 필요하다면 Port를 다시 생성하여 주기위해 Reconfiguration boot이 필요하다.

Revision History

작성일자 : 97.2.4
작성자 : 이민호