6. Troubleshooting Ingres : Troubleshoot Startup, Shutdown, or Configuration Problems : Check Shutdown Problems on UNIX
 
Share this page                  
Check Shutdown Problems on UNIX
If Ingres has problems during shutdown on UNIX, follow these steps:
1. Check environment variables in the local user environment by entering the following commands at the operating system prompt.
a. Verify that II_SYSTEM is set correctly:
echo $II_SYSTEM
/usr/r6 (this varies system by system)
b. Check that you have the full search path to $II_SYSTEM/ingres/bin and $II_SYSTEM/ingres/utility
echo $PATH
2. If there is more than one Ingres installation on this machine, identify your installation code by typing the following command at the operating system prompt:
ingprenv | grep II_INSTALLATION
The two-letter installation code is displayed (for example, the code here is JB):
II_INSTALLATION=JB
Take note of your installation code: ______.
3. Identify if you are shutting down a client installation or a full installation by issuing the following command at the operating system prompt:
ingprenv | grep II_CLIENT
If this displays “II_CLIENT=true”, this is a client installation, and only two processes (iigcn, iigcc) are running on this node.
4. If you are having trouble shutting down a client installation because Ingres believes a Communications server is running locally when there is none, remove this file:
$II_SYSTEM/ingres/files/name/clientname/IICOMSVR_clientname
For troubleshooting details see the Connectivity Guide.
5. Identify whether Ingres is recovering aborted transactions. Details on recovery delays are described in Recovery Process Monitoring. Issue the following command at the operating system prompt and examine the output for the word “RECOVER”:
logstat | grep RECOVER
If Ingres is recovering aborted transactions, wait for this process to finish. Continue reissuing the logstat command and examining the STATUS field. When it says: “ONLINE, ECP DONE,” proceed with normal shutdown.
6. Now shut down the installation:
ingstop
Note:  All users must be logged out of Ingres (that is, no sessions running in the server) for the ingstop script to succeed.
7. Check that all processes are shut down:
a. Display running processes by issuing the following command at the operating system prompt:
BSD:
ps -aux | grep ingres
System V:
ps -ef | grep ingres
b. If shutdown succeeds, none of the following processes are running:
iigcn
iigcc
II_IUSV_nnn
dmfacp
iidbms
iijdbc
iigcd
iistar
rmcmd
iigcb
8. If any of these installation processes are not shut down, note the process ID of the running processes and do the following:
a. Shut them down manually with the operating system command:
kill- QUIT process_id
where:
process_id refers to the process ID of the process to stop.
b. If processes are still not shut down, issue the operating system command:
kill -9 process_id
Important!  If your site has more than one Ingres installation, examine the installation code associated with the iidbms process to make sure you are stopping only the processes associated with the installation you need to shut down.
9. Check that no shared memory segments remain allocated to this installation. Execute the operating system command:
csreport
The following message indicates that shared segments have been properly removed:
!Can’t map system segment
10. If shared memory segments remain for this installation, interactively remove them:
a. To deallocate shared memory resources, issue the operating system command:
ipcclean
b. Use the UNIX command ipcs to verify that the actual segments have been removed:
ipcs
c. If they have not been properly removed, you must delete them manually.
Important!  If your site has more than one Ingres installation, you must take care to only remove shared memory or semaphores for the installation to be shut down. If your machine contains more than one installation, enter the following command from the environment of the installation you need to target:
csreport
The csreport utility displays the shared memory and semaphore segment identifiers for this installation.
To remove the targeted segment(s), use the UNIX command:
ipcrm -mmid
or
ipcrm -ssid
where mid is the shared memory segment identifier and sid is the semaphore identifier.
11. Verify that the following files are not present. If they are still present, you must remove them:
$II_SYSTEM/ingres/files/memory/lockseg.mem
$II_SYSTEM/ingres/files/memory/sysseg.mem
Your installation is now shut down. Instructions on how to check and restart Ingres are described in Check Ingres Installation on UNIX.