Category Archives: Linux - Page 8

adogjf() Unable to generate jar files under JAVA_TOP

Problem:

While applying patch 6502082, the patch completes in error with the following message:

ERROR: Javakey subcommand exited with status 1
Javakey standard output:
Adding entry: META-INF/MANIFEST.MF
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
AD Java Key Generation
Version 11.5.0
NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.
Javakey error output:
Reading product information from file...
Reading language and territory information from file...
Reading language information from applUS.txt ...
Reading language information from applUS.txt ...
Successfully created javaVersionFile.
TEST_hrms not found in database.
java key error:
adjava -ms128m -mx256m sun.security.provider.Main -gs /u0/oracle/prodcomn/java/oracle/apps/pon/jar/ponam.jar.tmp /u0/oracle/prodcomn/java/oracle/apps/pon/jar/ponam.jar.uns
The above Java program failed with error code 1.
Assigned: file adpcpset.pls on worker  1 for product ad  username APPLSYS.

Solution:

  1. Source the apps tier environment (APPSORA.env) and run adjkey –l
[applmgr@ebusiness 6502082]$ adjkey -l
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
AD Java Key Generation
Version 11.5.0
NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.
Reading product information from file...
Reading language and territory information from file...
Reading language information from applUS.txt ...
Successfully created javaVersionFile.
Scope: sun.security.provider.IdentityDatabase, source file: /home/applmgr/identitydb.obj
[Signer]Customer[identitydb.obj][trusted]
[Signer]DEMO_ebusiness[identitydb.obj][trusted]
java key is complete.
  1. Rename the identitydb.obj file in /home/applmgr
  2. Run: adjkey –initialize to create a new certificate
[applmgr@ebusiness 6502082]$ mv /home/applmgr/identitydb.obj /home/applmgr/identitydb.obj.20080909a
[applmgr@ebusiness 6502082]$ adjkey -initialize
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
AD Java Key Generation
Version 11.5.0
NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.
Reading product information from file...
Reading language and territory information from file...
Reading language information from applUS.txt ...
Successfully created javaVersionFile.
AD Java Key will now create a signing entity for you.
Please enter the name of the entity you wish to create [Customer] :
After creating the signing entity, a certificate will
be created for signing jar files locally.  You can specify an
organization to be used in identifying the certificate.
Please specify an organization to be assigned to the certificate [DEFAULT_ORG] :
Created identity [Signer]Customer[identitydb.obj][trusted]
Generated DSA keys for Customer (strength: 512).
Generated certificate from directive file /u0/oracle/prodappl/admin/out/adcert.txt.
Your digital signature has been created successfully and
imported into the javakey identity database. This signature
will now be used to sign Applications JAR files whenever
they are patched.
IMPORTANT: If you have multiple web servers, you must copy
files to each of the remaining web servers on your site.
See the documentation reference for more information.
java key is complete.

References:

Note 141692.1 – How to Install a Digital Certificate in Oracle Applications Release 11i

Note 365735.1 – How to use, create and/or update Digital Certificates for 11i Applications

Grants missing after applying patch 6502082

Problem: The following error occurs when applying patch 6502082 for the second time:

AutoPatch error:

Your database is missing important grants on SYS objects.

To fix this:

1) Log on as the database server owner, and set your environment for maintaining your database server.  Create a directory called $ORACLE_HOME/appsutil/admin and copy $APPL_TOP/admin/adgrants.sql to that directory.

2) Connect to the database as the SYS user and run adgrants.sql passing the name of the schema containing FND tables. For example, if the schema that contains FND tables in your database is called APPLSYS, you would run adgrants.sql as follows:

$ cd $ORACLE_HOME/appsutil/admin

$ sqlplus /nolog

SQL> connect / as sysdba

SQL> @adgrants.sql APPLSYS

Solution: Perform steps listed above

FAILED: file affurgol.sql on worker 1

Problem: When applying patch, the following error appears:

ATTENTION: All workers either have failed or are waiting:
           FAILED: file affurgol.sql on worker  1.
ATTENTION: Please fix the above failed worker(s) so the manager can continue.

Checked log file /u0/oracle/testappl/admin/TEST/log/adwork001.log:

declare
*
ERROR at line 1:
ORA-01653: unable to extend table APPLSYS.WF_LOCAL_ROLES_STAGE by 2362205 in
tablespace APPLSYSD
ORA-06512: at "APPS.WF_LOCAL_SYNCH", line 2380
ORA-06512: at line 55

Solution: Resize the next extent to 40K.

SQL> select table_name, initial_extent, next_extent, min_extents, max_extents, pct_increase, blocks from dba_tables where table_name = 'WF_LOCAL_ROLES_STAGE';
TABLE_NAME                     INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE     BLOCKS
------------------------------ -------------- ----------- ----------- ----------- ------------ ----------
WF_LOCAL_ROLES_STAGE                    40960  1.9351E+10           1  2147483645            0          1

SQL> alter table applsys.WF_LOCAL_ROLES_STAGE storage (next 40K);
Table altered.

SQL> select table_name, initial_extent, next_extent, min_extents, max_extents, pct_increase, blocks from dba_tables where table_name = 'WF_LOCAL_ROLES_STAGE';
TABLE_NAME                     INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE     BLOCKS
------------------------------ -------------- ----------- ----------- ----------- ------------ ----------
WF_LOCAL_ROLES_STAGE                    40960       40960           1  2147483645            0          1

SQL> alter table applsys.WF_LOCAL_ROLES_STAGE allocate extent;
Table altered.

SQL> select table_name, initial_extent, next_extent, min_extents, max_extents, pct_increase, blocks from dba_tables where table_name = 'WF_LOCAL_ROLES_STAGE';
TABLE_NAME                     INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE     BLOCKS
------------------------------ -------------- ----------- ----------- ----------- ------------ ----------
WF_LOCAL_ROLES_STAGE                    40960       65536           1         505           50          5

adpcpset.pls hangs applying patch 6502082

Problem:

While applying patch 6502082, the patch hangs at the line:

Assigned: file adpcpset.pls on worker  1 for product ad  username APPLSYS.

Solution:

  1. Stop and restart database tier services (9.2.0 TNS Listener and database)
  2. Apply patch 3586394 (BRANCHED PATCH FOR BUG 3211492 (ADUTLRCMP.PLS) OVER 3242200 (ADHPCP))

The Parallel Compile step can take about 32 minutes to run.

Configuring Network Routes on Linux

Problem: Newly installed Linux is not able to access the Internet.

Solution: Route not configured to the gateway.

At a Terminal window, enter:

route add default netmask 0.0.0.0 gw 200.65.1.7 eth1

Configuration for PC in Software Services Area

The network port used by Linux is the one on the main board, not the Ethernet card that is used by Windows.

[root@enterprise ~]# route
Kernel IP routing table
Destination  Gateway         Genmask         Flags Metric Ref Use Iface
200.65.1.0   *               255.255.255.0   U     0      0     0 eth1
169.254.0.0  *               255.255.0.0     U     0      0     0 eth1
default      200.65.1.7      0.0.0.0         UG    0      0     0 eth1

Troubleshooting instance after cloning

Situation: After reinstalling Red Hat Enterprise Linux AS 4 on the server and restoring Oracle Applications, the instance is started.

Problem: When accessing page http://ebusiness.support.com:8001/oa_servlets/AppsLogin, the following error is encountered:

Internet Explorer cannot display the webpage

   Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.

   What you can try:
     Diagnose Connection Problems  

     More information 

This problem can be caused by a variety of issues, including: 

Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's domain.
If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section. 

For offline users

You can still view subscribed feeds and some recently viewed webpages.
To view subscribed feeds 

Click the Favorites Center button , click Feeds, and then click the feed you want to view. 

To view recently visited webpages (might not work on all pages) 

Click Tools , and then click Work Offline.
Click the Favorites Center button , click History, and then click the page you want to view.

Solution: Apply patch 4198954. Create a directory 4198954, copy the patch into this directory and extract the patch (two RPMS and README). Install the RPMS using rpm -ivh … . The RPMS install without issue

Then reran patch 3830807. Relink Application files using adadmin, use all defaults for the relink (takes about ten minutes).
Did not work.

Updated /etc/hosts

Checked Apache logs

/u0/oracle/testora/iAS/Apache/Apache/logs/error_log
/u0/oracle/testora/iAS/Apache/Jserv/logs/mod_jserv.log

See Metalink Doc ID: Note: 231137.1 “Troubleshooting the Self Service Framework with Oracle Applications”

Search for: File does not exist: /oa_servlets/AppsLogin
See Metalink Doc ID: Note: 344379.1  “Subject:  File Not Found /oa_servlets/AppsLogin”

http://ebusiness.support.com:8001/pls/TEST/fnd_web.ping

http://ebusiness.support.com:8001/OA_HTML/US/ICXINDEX.htm

ftp /usr/java/j2sdk-1_3_1_11-linux-i586.rpm.bin from 200.65.1.86 into the /usr/java (make this directory if necessary)
chmod a+x j2sdk-1_3_1_11-linux-i586.rpm.bin
Unzips jdk-1.3.1_11.i586.rpm
rpm -ivh jdk-1.3.1_11.i586.rpm

SUCCESS! Page appears.

Installing Oracle Database 10g Release 2 (10.2) for Linux x86

Installing Oracle Database 10g Release 2 (10.2) for Linux x86

1. Download the 10201_database_linux32.zip file from the Oracle web site

22d23ab01a8013500313ff92f65d0fe5  10201_database_linux32.zip  668734007KB

2. Unzip the zip file in an appropriate directory.

3. Open the welcome.html file from the database directory.

4. Click the Documentation tab, then click on the Quick Installation Guide HTML link. Follow the steps to begin installation

———-

1. Log on as root user and execute the commands:

# xhost +

# grep MemTotal /proc/meminfo

# grep SwapTotal /proc/meminfo

# free

# df -k /tmp

# df -k

# grep “model name” /proc/cpuinfo

2. Ensure that the following packages (or later versions) are installed for Red Hat Enterprise Linux 4.0:

* make-3.79.1 [make-3.80-6.EL4 found]
* gcc-3.2.3-34 [gcc-3.4.6-3.1 found]
* glibc-2.3.2-95.20 [glibc-2.3.4-2.25 found]
* compat-db-4.0.14-5 [compat-db-4.1.25-9 found]
* compat-gcc-7.3-2.96.128 [not found]
* compat-gcc-c++-7.3-2.96.128 [not found]
* compat-libstdc++-7.3-2.96.128 [not found]
* compat-libstdc++-devel-7.3-2.96.128 [not found]
* openmotif21-2.1.30-8 [not found]
* setarch-1.3-1 [setarch-1.6-1 found]

To update these packages, navigate to Add or Remove Packages and check Legacy Software Development. Then click Update.

3. Issue more commands:

cat /etc/issue

uname -r

4. Set up Oracle user and groups

# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

# id oracle

# /usr/sbin/useradd -g oinstall -G dba oracle
or
# /usr/sbin/usermod -g oinstall -G dba oracle

# id nobody

5. Update kernel parameters. Edit /etc/sysctl.conf and add the following parameters:

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144

6. Prerequisite Check Errors

Error Encountered:
—————–
Checking operating system package requirements …
Checking for make-3.79; found make-1:3.80-6.EL4.    Passed
Checking for binutils-2.14; found binutils-2.15.92.0.2-21.    Passed
Checking for gcc-3.2; found gcc-3.4.6-3.1.    Passed
Checking for libaio-0.3.96; found Not found.    Failed <<<<
Check complete. The overall result of this check is: Failed <<<<
Problem: Some packages required for the Oracle Database 10g to function properly are missing (see above).

Solution:
——–
Install libaio-0.3.105-2.i386.rpm from CD 3

Error Encountered:
—————–
Checking kernel parameters
Checking for semmsl=250; found semmsl=250.    Passed
Checking for semmns=32000; found semmns=32000.    Passed
Checking for semopm=100; found semopm=100.    Passed
Checking for semmni=128; found semmni=128.    Passed
Checking for shmmax=536870912; found shmmax=2147483648.    Passed
Checking for shmmni=4096; found shmmni=4096.    Passed
Checking for shmall=2097152; found shmall=2097152.    Passed
Checking for file-max=65536; found file-max=65536.    Passed
Checking for VERSION=2.6.9; found VERSION=2.6.9-42.0.0.0.1.EL.    Passed
Checking for ip_local_port_range=1024 – 65000; found ip_local_port_range=1024 – 65000.    Passed
Checking for rmem_default=262144; found rmem_default=110592.    Failed <<<<
Checking for rmem_max=262144; found rmem_max=131071.    Failed <<<<
Checking for wmem_default=262144; found wmem_default=110592.    Failed <<<<
Checking for wmem_max=262144; found wmem_max=131071.    Failed <<<<
Check complete. The overall result of this check is: Failed <<<<
Problem: The kernel parameters do not meet the minimum requirements (see above).
Recommendation: Perform operating system specific instructions to update the kernel parameters.

Solution:
——–
/etc/sysctl.conf should read (last four parameters different):

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Error Encountered:
—————–
Checking available swap space requirements …
Expected result: 2274MB
Actual Result: 1983MB
Check complete. The overall result of this check is: Failed <<<<
Problem: The system does not have the required swap space.
Recommendation: Make more swap space available to perform the install.

Solution:
——–
Create a new swap partition.

fdisk /dev/hdb

Delete old partition, create a new /dev/hdb1 and /dev/hdb2, with /dev/hdb2 at least 2275MB
Edit /etc/fstab and add new swap device
mount -a
swapon -a

Set environment variables for ORACLE_BASE, ORACLE_HOME and SID before starting dbca

SID should be in lowercase e.g. orcl

Set Global Database Identifier same as SID i.e. orcl

After installing, run lab_02_05.sh script to create listener. Or create it manually.
Configure a TNS Listener using netca

Configure orcl entry in tnsnames.ora using netca >

Start dbconsole using emctl start dbconsole: gave error about

Timezone mismatch: The agentTZRegion value (GMT) in
/u1/app/oracle/product/10.2.0/db_1/enterprise.support.com_orcl/sysman/config/emd.properties
does not match the current environment TZ setting().
The dbconsole cannot run with this mismatch.

If GMT is the correct timezone, set your timezone environment variable to GMT and repeat the ’emctl start dbconsole’ operation.

If GMT is not the correct timezone, make sure that the timezone in your environment is correct, and then run the following command in your local Oracle Home: ’emctl resetTZ agent’

The output of this command will include detailed instructions to follow, to correct the mismatch.

[oracle@enterprise admin]$ emctl resetTZ agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Updating /u1/app/oracle/product/10.2.0/db_1/enterprise.support.com_orcl/sysman/config/emd.properties…
Time zone set to America/Anguilla.

To complete this process, you must either:

connect to the database served by this DBConsole as user ‘sysman’, and execute:

SQL> exec mgmt_target.set_agent_tzrgn(‘enterprise.support.com:3938′,’America/Anguilla’)

— or —

connect to the database served by this DBConsole as user ‘sys’, and execute:

SQL> alter session set current_schema = SYSMAN;
SQL> exec mgmt_target.set_agent_tzrgn(‘enterprise.support.com:3938′,’America/Anguilla’)

sqlplus sys/oracle
alter session set current_schema = SYSMAN;

exec mgmt_target.set_agent_tzrgn(‘enterprise.support.com:3938′,’America/Anguilla’);

Error Encountered:
—————–
Unable to connect using service (orcl) as in sqlplus system/oracle@orcl

Solution:
——–
Added the following lines to the listener.ora file:

(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u1/app/oracle/product/10.2.0/db_1/)
(SID_NAME = orcl)
)

The listener.ora file now reads:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u1/app/oracle/product/10.2.0/db_1/)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u1/app/oracle/product/10.2.0/db_1/)
(SID_NAME = orcl)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = enterprise.support.com)(PORT = 1521))
)
)

Answering adadmin Prompts

This section shows the typical responses for an adadmin session. Note that in this example, the VIS2 instance is used. The directories shown may differ for another instance. Note that pressing Enter for the responses uses the default answer, shown in brackets ([]).

[applmgr@appslinux ~]$ cd /u2/oracle/vis2appl/
[applmgr@appslinux vis2appl]$ . APPSORA.env
[applmgr@appslinux vis2appl]$ adadmin logfile=adadmin_20080516a.log
                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA
                     Oracle Applications AD Administration
                                 Version 11.5.0
NOTE: You may not use this utility for custom development
      unless you have written permission from Oracle Corporation.
Your default directory is '/u2/oracle/vis2appl'.
Is this the correct APPL_TOP [Yes] ? <Press Enter> 
************* Start of AD Administration session *************
AD Administration version: 11.5.0
AD Administration started at: Fri May 16 2008 13:30:01
APPL_TOP is set to /u2/oracle/vis2appl
You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ? <Press Enter>
Please enter the batchsize [1000] : <Press Enter>
Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.
The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.
Sample Applications System names are: "prod", "test", "demo" and
"Development_2".
Applications System Name [VIS2] : VIS2 *
NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.
Example 1: If you don't have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.
Example 2: If you don't have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.
Example 3: If you don't have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.
Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *
Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *
Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *
Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *
Please enter the name Oracle Applications will use to identify this APPL_TOP.
The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.
Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".
APPL_TOP Name [appslinux] : appslinux *
You are about to use or modify Oracle Applications product tables
in your ORACLE database 'VIS2'
using ORACLE executables in '/u2/oracle/vis2ora/8.0.6'.
Is this the correct database [Yes] ? <Press Enter>
AD Administration needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.
Enter the password for your 'SYSTEM' ORACLE schema: manager
The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS
Enter the ORACLE password of Application Object Library [APPS] : <Press Enter>
AD Administration is verifying your username/password.
The status of various features in this run of AD Administration is:
                                           <-Feature version in->
Feature                          Active?   APPLTOP    Data model    Flags
------------------------------   -------   --------   -----------   -----------
CHECKFILE                        Yes       1          1             Y N N Y N Y
PREREQ                           Yes       6          6             Y N N Y N Y
CONCURRENT_SESSIONS              No        2          2             Y Y N Y Y N
PATCH_TIMING                     Yes       2          2             Y N N Y N Y
PATCH_HIST_IN_DB                 Yes       6          6             Y N N Y N Y
SCHEMA_SWAP                      Yes       1          1             Y N N Y Y Y
Identifier for the current session is 33937
Reading product information from file...
Reading language and territory information from file...
Reading language information from applUS.txt ...
Reading database to see what industry is currently installed.
Reading FND_LANGUAGES to see what is currently installed.
Currently, the following language is installed:
Code   Language                                Status
----   --------------------------------------- ---------
US     American English                        Base
Your base language will be AMERICAN.
Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt ...
Saving product information.
AD code level : [11i.AD.I.6]

Exception in TimedProcess

Problem: When attempting to start or stop the Oracle instance, the following message is returned:

Executing service control script:

/u3/oracle/vis4comn/admin/scripts/VIS4_appslinux/adcmctl.sh stop

script returned:

****************************************************

ERROR :

Exception in TimedProcess…Failed to  execute command =

/u3/oracle/vis4comn/admin/scripts/VIS4_appslinux/adcmctl.sh stop apps/apps

****************************************************

Solution: You are not logged on as the Oracle user (most likely as root). Log on as the Oracle user (applmgr or oracle)

Configuring VNC to Use Gnome

Problem: On CentOS 4.8, logging into VNC session on server for first time does not show Gnome session.

Solution: Edit the VNC xstartup file.

Edit the ~/.vnc/startup and replace the line

# xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

twm &

with

gnome-session &

When vncserver is first run, the xstartup file should be similar to the following:

[oracle@localhost ~]$ cat .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

After replacing the last line, the xstartup file should now appear as follows:

[oracle@localhost ~]$ cat .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

After running vncserver, if the GNOME desktop GUI does not load when you connect with the VNC viewer, then try replacing the contents of xstartup with the following:

#!/bin/sh
# Add the following line to ensure you always have an xterm available.
( while true ; do xterm ; done ) &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

Note that you need to kill the vncserver session and restart it for the changes to take effect. For example, to kill the vncserver session 1, issue the following command:

vncserver -kill :1

Then rerun ‘vncserver’ to restart the VNC server session and reconnect with the VNC viewer.

Reference:

http://wiki.centos.org/HowTos/VNC-Server