加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

AIX:"Too many open files"的处理(Socket timeout)

(2012-06-07 09:26:25)
标签:

it

分类: linux
原文地址:http://linux.52zhe.info/go.php/category/8/1/1/

一顿搜索得知如下:"Too many open files"的产生是操作系统对于一个进程所能打开的文件数进行了限制。在AIX里面相关的东西如下:命令ulimit,文件/etc/security/limits
这里注意一个问题。系统默认值default是个最大值,如果用户本身做了相应设定,是不能超过系统的默认值的(超过也无效),需要修改放大系统的默认值。才能真正生效。同时说明如果想让修改生效,需要重新启动系统。

追加:仅仅系统还不够还要修改Weblogic的初始化参数脚本./weblogic92/common/bin/commEnv.sh。如下:
    maxfiles=`ulimit -H -n`
    if [ "$?" = "0" -a  `expr ${maxfiles} : '[0-9][0-9]*$'` -eq 0 ]; then
        ulimit -n 1024 (放大它到32768)
    fi






引用的一个链接:http://blog.chinaunix.net/u/10516/showart.php?id=475961


AIX 用户使用的系统资源限制包括两个概念 --- 硬限制(hard limits) 和软限制(soft limits)。

hard limits自AIX 4.1版本开始引入。hard limits 应由AIX系统管理员设置,只有security组的成员可以将此值增大,用户本身可以减小此限定值,但是其更改将随着该用户从系

统退出而失效。使用下列命令可以查看hard limits的限定值:

    ulimit -Ha

soft limits 是AIX核心使用的限制进程对系统资源的使用的上限值。此值可由任何人更改,但不能超出hard limits值。这里要注意的是只有security组的成员可使更改永久生效

,普通用户的更改在其退出系统后将失效。使用以下命令可以查看soft limits的设置:

    ulimit -a

下面为系统的soft limits的默认值:
3.2   4.1-4.3
===============   =================
fsize = 2097151   fsize = 2097151
core = 2048   core = 2048
cpu = 3600   cpu = -1
data = 131072   data = 262144
rss = 65536   rss = 65536
stack = 8192   stack = 65536
nofiles = 2000*   nofiles=2000 *


* 该值(nofiles)只能在AIX 4.3.1 或以后的版本中更改。

上述定义作为默认值存放在文件 /etc/security/limits 中,在新用户被加进系统后生效。直接更改此文件中的定义值需要将系统重新启动以便使更改生效。将相应值该为"-1" 表

示不受 soft limits的限制(unlimited)。

下面我们将就各字段逐一进行介绍:

fsize 用户创建的文件大小限制。此定义值(512字节为单位)为该用户可以生成的最大文件的大小。
core 生成的core文件大小的限制(512字节为单位)。
cpu 用户进程可用cpu的限定值(以秒为单位)。普通用户只能将此值减小,root可以将此值增大。这里要注意的是进程使用CPU的时间取决于AIX Kernel(核心程序)进程调度算

法,该值在此仅做参考。
data 进程数据段大小的限定值(以字节为单位)。
stack 进程堆栈段大小的限定值(以字节为单位)。
rss 进程常驻内存段的限定值(以字节为单位)。AIX核心并不参考此限定。
nofiles 进程中打开文件的最大数量。此限定在AIX 4.3.1之前的版本中固定为2000。在AIX 4.3.1及其之后的版本中可将此值增大至32767。

下面介绍三种修改上述限定值的方法:

1. 编辑文件/etc/security/limits,直接修改各定义值。此更改在系统重新启动后生效。

2. 使用命令ulimit修改默认值。例如:

    ulimit -f value
    ulimit -c <value>
    ulimit -t <value>
    ulimit -d <value>
    ulimit -s <value>
    ulimit -m <value>
    ulimit -n <value>

将修改fsize, core, cpu,data, stack, rss和nofiles的soft limit值。

3. 使用命令chuser修改某用户的限定值。例如:

    chuser fsize=<value> <username>
    chuser core=<value> <username
    chuser cpu=<value> <username>
    chuser data=<value> <username>
    chuser limit=<value> <username>
    chuser rss=<value> <username>
    chuser nofiles=<value> <username>

将用户“username”的soft limits改为值“value”。

    chuser hard_fsize=<value> <username>
    chuser hard_core=<value> <username>
    chuser hard_cpu=<value> <username>
    chuser hard_data=<value> <username>
    chuser hard_limit=<value> <username>
    chuser hard_rss=<value> <username>
    chuser hard_nofiles=<value> <username>
    将用户“username”的hard limits改为值“value”。



我做了如下修改:

vi /etc/security/limits
default:
        fsize = 2097151
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000 (修改放大到32768)

然后重启系统。真想知道,如果不启动系统,怎样可以立即生效呢。Linux可以让内核参数立即生效的。不知道AIX如何处理。




追加:查看进程打开的文件的个数。AIX下面默认没有这个命令。Linux下面有。

lsof -p pid | wc -l

[root@kook ~]# man -k lsof
lsof                 (8)  - list open files
lsof                (rpm) - A utility which lists open files on a Linux/UNIX system.
AIX 5.3 安装 weblogic 9.2 中文版本 Oracle10g R2中文版本安装记录。含自启动部分。

操作系统:aix5.3        
硬件:IBM,9110-51A
主机名:fundoa.glfsoft.com
ip: 192.168.101.248     mac:0.11.25.c5.a1.20

逻辑卷 rootvg 使用 2个物理卷PV 大小均为146800 MB
初步调整逻辑卷LV,如下:
/home  10000M
/usr   10000M
/opt   80000M
/tmp    5000M

安装说明:
安装系统后,通过xmanager远程管理AIX主机,图形化安装weblogic和oracle,安装过程时可以另外开1个root的文本终端.下个版本提供完全文本类型的安装方法。
AIX的安装选择全新安装。其它选择默认即可。

所需软件及文档:
1:jdk的下载,如果Oracle中使用EM,请下载64位的JDK版本
http://www.ibm.com/developerworks/java/jdk/aix/service.html
2:weblogic 9.2 中文版本 for aix 5.3
http://commerce.bea.com/showallversions.jsp?family=WLSCH
3:oracle下载
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201aixsoft.html
4:oracle的参考文档
http://www.oracle.com/pls/db102/homepage


########################################################################################################
# weblogic server 9.2 安装部分
########################################################################################################
安装思路:创建weblogic的用户,以此用户安装相应的程序,未来的使用中以此用户管理weblogic相应的服务。
具体步骤:
1:添加组、用户,用root创建密码,并以此用户进行一次登录,并依照提示进行首次登录的密码修改。
# mkgroup bea
# useradd -g bea -m weblogic
# passwd weblogic

cmd> telnet 192.168.101.248
AIX Version 5
(C) Copyrights by IBM and by others 1982, 2005.
login: weblogic
weblogic's Password:
[compat]: 3004-610 You are required to change your password.
       Please choose a new one.

weblogic's New password:
Enter the new password again:

2:修改LV大小,并创建weblogic Server的安装目录。
# chfs -a size=10000M /home  
# chfs -a size=10000M /usr
# chfs -a size=80000M /opt
# chfs -a size=5000M /tmp
# cd /opt
# mkdir bea
# chown weblogic.bea bea

3:上传文件,通过FTP,以用户weblogic,传至其主目录。
自己选择适合的方式。文件2个.
如下:server921_ccjk_generic.jar和Java5.sdk.tar.gz

4:以用户welogic解压文件,以root安装JRE。
# gunzip Java5_64.sdk.tar.gz
# tar xvf Java5_64.sdk.tar
以root安装smitty install 选择解压包的位置,安装JDK5.记得选择“ACCEPT new license agreements?”,修改为“yes”.


5:修改/etc/environment,修改PATH和添加JAVA_HOME变量,如下:
vi /etc/environment
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5_64/jre/bin:/usr/java5_64/bin
JAVA_HOME=/usr/java5_64
为保障变量生效,请重新登录。如果有source命令,可以执行一次source /etc/environment
测试一下,是否成功:
$ echo $JAVA_HOME
/usr/java5_64
至此,OK。

6:以用户weblogic安装weblogic server 9.2中文版
$ java -jar -Xmx2048m  server921_ccjk_generic.jar
以下图形化,略。记得修改安装路径:/opt/bea
附注:如果以字符模式安装,加上参数 -mode=console
下面的就不多说了。跟普通安装weblogic没有什么区别。
安装后,无需执行quickstart.sh,
直接创建新的域吧/opt/bea/weblogic92/common/bin/config.sh

创建域:fundoa.glfsoft.com  user/pw : weblogic/weblogic


7:以weblogic创建日志,以root添加自启动vi /etc/inittab。
$ mkdir /home/weblogic/bin
$ mkdir /home/weblogic/log
$ touch /home/weblogic/bin/start.sh /home/weblogic/log/weblogic.log

# vi /etc/inittab
# weblogic:2:respawn:/opt/bea/user_projects/domains/fundoa.glfsoft.com/startWebLogic.sh > /home/weblogic/log/weblogic.log 2>&1



########################################################################################################
# Oracle 10g  安装部分
########################################################################################################
安装思路:依照英文文档,首先检查安装前的硬件要求,软件要求,添加Oracle用户组,执行相关Oracle命令。

1:扩展SWAP,并将物理卷PV加入卷组rootvg中
# extendlv hd6 5
# extendlv paging00 5
# lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type
paging00        hdisk0            rootvg        1536MB     2   yes   yes    lv
hd6             hdisk1            rootvg        1536MB     1   yes   yes    lv
# extendvg rootvg hdisk1
# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c0586000004c0000000114aa1415f8
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (279552 megabytes)
MAX LVs:            256                      FREE PPs:       1076 (275456 megabytes)
LVs:                10                       USED PPs:       16 (4096 megabytes)
OPEN LVs:           9                        QUORUM:         2
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512                                    
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
# lspv
hdisk0          000108bea5cd4a82                    rootvg          active
hdisk1          00c05860ab525174                    rootvg          active

2:检验所需的安装包
# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat  bos.perf.libperfstat bos.perf.proctools  bos.adt.prof  bos.cifs_fs.rte
 Fileset                      Level  State      Description        
 ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
 bos.adt.base              5.3.0.60  COMMITTED  Base Application Development
                                                Toolkit
 bos.adt.lib               5.3.0.60  COMMITTED  Base Application Development
                                                Libraries
 bos.perf.libperfstat      5.3.0.60  COMMITTED  Performance Statistics Library
                                                Interface
 bos.perf.perfstat         5.3.0.60  COMMITTED  Performance Statistics
                                                Interface
 bos.perf.proctools        5.3.0.60  COMMITTED  Proc Filesystem Tools

Path: /etc/objrepos
 bos.perf.libperfstat      5.3.0.60  COMMITTED  Performance Statistics Library
                                                Interface
 bos.perf.perfstat         5.3.0.60  COMMITTED  Performance Statistics
                                                Interface
lslpp: Fileset bos.adt.libm not installed.
lslpp: Fileset bos.adt.prof not installed.
lslpp: Fileset bos.cifs_fs.rte not installed.

缺三个。安装吧。将CD1放在光驱中
installp -a -d/dev/cd0 bos.adt.prof bos.cifs_fs.rte bos.adt.libm

再检查一次。
# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat  bos.perf.libperfstat bos.perf.proctools  bos.adt.prof  bos.cifs_fs.rte
 Fileset                      Level  State      Description        
 ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
 bos.adt.base              5.3.0.60  COMMITTED  Base Application Development
                                                Toolkit
 bos.adt.lib               5.3.0.60  COMMITTED  Base Application Development
                                                Libraries
 bos.adt.libm              5.3.0.60  COMMITTED  Base Application Development
                                                Math Library
 bos.adt.prof              5.3.0.60  COMMITTED  Base Profiling Support
 bos.cifs_fs.rte           5.3.0.60  COMMITTED  Runtime for SMBFS
 bos.perf.libperfstat      5.3.0.60  COMMITTED  Performance Statistics Library
                                                Interface
 bos.perf.perfstat         5.3.0.60  COMMITTED  Performance Statistics
                                                Interface
 bos.perf.proctools        5.3.0.60  COMMITTED  Proc Filesystem Tools

Path: /etc/objrepos
 bos.cifs_fs.rte           5.3.0.60  COMMITTED  Runtime for SMBFS
 bos.perf.libperfstat      5.3.0.60  COMMITTED  Performance Statistics Library
                                                Interface
 bos.perf.perfstat         5.3.0.60  COMMITTED  Performance Statistics
                                                Interface

3:创建oracle用户,组,Oracle程序的主目录。
# mkgroup dba
# mkgroup oinstall
# useradd -g oinstall -G dba -m oracle
# passwd oracle
Changing password for "oracle"
oracle's New password:
Re-enter oracle's new password:

# mkdir /opt/oracle
# chown oracle.oinstall /opt/oracle

4:以Oracle用户登录,创建.profile,定义Oracle_home相关内容。并以root用户修改oracle用户相关权限的限制。
$ vi .profile
#--------------------------------------
# Set for Oracle10g Install ;
#--------------------------------------
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=fundoa
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022
#------------------- Set Over

$ vi .dtprofile 修改最后1行,去掉注释#号。目的是让图形界面,引入.profile的变量。
DTSOURCEPROFILE=true

以root用户,修改oracle的属性
smitty user,选择oracle

Soft FILE size -1 (Unlimited)
Soft CPU time -1 (Unlimited)
Note: This is the default value.
Soft DATA segment -1 (Unlimited)
Soft STACK size -1 (Unlimited)


使用smitty chgsys修改“Maximum number of PROCESSES allowed per user”最小2048。

5:通过FTP上传安装文件,并且重新登录一次。解压。
文件:10gr2_aix5l64_database.cpio.gz
gunzip 10gr2_aix5l64_database.cpio.gz
cpio -idcmv < 10gr2_aix5l64_database.cpio

6:以Oracle用户登录,进行安装。./runInstaller ;dbca;netgmr。
以root执行
# cd /home/oracle/Disk1/rootpre;./rootpre.sh
./rootpre.sh output will be logged in /tmp/rootpre.out_07-08-28.05:56:20
Saving the original files in /etc/ora_save_07-08-28.05:56:20....
Copying new kernel extension to /etc....
Loading the kernel extension from /etc

Oracle Kernel Extension Loader for AIX
      Copyright (c) 1998,1999 Oracle Corporation


Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x3f0c100
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x3f0c100
The kernel extension was successfuly loaded.

Configuring Asynchronous I/O....

Configuring POSIX Asynchronous I/O....

Checking if group services should be configured....
Nothing to configure.

以Oracle用户
$ ./runInstaller
**************************************************************************
******

Your platform requires the root user to perform certain pre-installation
OS preparation.  The root user should run the shell script 'rootpre.sh' be
fore
you proceed with Oracle installation.  rootpre.sh can be found at the top
level
of the CD or the stage area.

Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle
installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.

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

Has 'rootpre.sh' been run by root? [y/n] (n)
y

Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-08-28_05-58-51AM. Please wait ...$ Aug 28, 2007 5:59:24 AM

java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
Aug 28, 2007 5:59:31 AM java.util.prefs.FileSystemPreferences$3 run
INFO: Created system preferences directory in java.home.

##################################################################################################################################
以root,新开窗口。执行

# /opt/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/oracle/oraInventory to 775.
Changing groupname of /opt/oracle/oraInventory to oinstall.
The execution of the script is complete

#  /opt/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
   ORACLE_OWNER= oracle
   ORACLE_HOME=  /opt/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
  Copying dbhome to /usr/local/bin ...
  Copying oraenv to /usr/local/bin ...
  Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.







7:修正dbstart启动错误,添加开机自启动脚本和关机脚本。

默认安装好后Oracle的启动脚本dbstart会报一个错误监听,咱们先搞定它。如下:
$ dbstart
Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr

vi `which dbstart`

ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME
再执行dbstart,一切OK

修改/etc/oratab,将“N”改为“Y”,使之支持开机启动。如下:
fundoa:/opt/oracle/product/10.2.0/db_1:Y

创建启动脚本,并赋予相关权限
$ mkdir /home/oracle/bin
$ mkdir /home/oracle/log
$ touch /home/oracle/bin/dbora
$ touch /home/oracle/log/initora.log
$ chmod 700 /home/oracle/bin/dbora


$ vi  /home/oracle/bin/dbora
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=fundoa
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022

echo "Start Oracle instance: fundoa"
su oracle -c dbstart
su oracle -c "emctl start dbconsole"
su oracle -c "isqlplusctl start"

最后将脚本添加如inittab,使之自启动。
vi /etc/inittab
oracle:2:wait:/home/oracle/bin/dbora > /home/oracle/log/initora.log 2>&1

关机脚本
vi  /etc/rc.shutdown
echo "Stop Oracle instance: fundoa"
su - oracle -c dbshut
su oracle -c "emctl stop dbconsole"
su oracle -c "isqlplusctl stop"
2007年9月20日添加结论部分:

1:错误产生的原因?
系 统时区,与数据库指定的时区不一致。系统时区的设定在安装完系统后的“设置助手处”,将时区设定为TZ=BEIST-8BEIDT,关于时区也夏令时的问 题,不在这里说明了。但是Oracle在DBCA产生的时区agentTZRegion=+08:00显然是没有夏令时的问题。也许是没有注意到,反正你 要让他们一致,也许下一步的问题是,仔细研究一下AIX的时区处理问题和程序使用的时区设置,同时要研究一下Oracle的时区支持问题。下面的描述中有 个列表是Oracle支持的问题。列表在文件supportedtzs.lst中。

2:解决
将系统时区和数据库调整为一致。
我的解决办法是。
echo $TZ 和查看/opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/config/emd.properties文件内
的字段agentTZRegion
至于谁适应谁,请自行决定。

3:深入分析、待解决问题。
a:AIX的时区问题。
b:EM可以启动了,但是发现新的问题。关于EM上的按钮无法正确显示中文,都是方块。(已解决,是产品语言选择问题。)






2007年9月19日追加,事实上这个错误,我修改为64位的JDK仍然存在。所以以前是错误的论断,一定是有些东西,我没有注意到的。

检录追踪过程如下:
1:执行命令 emctl start dbconsole 提示无法启动。让我检查日志。这个命令足足执行了10分钟以上。
$ emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://fundoa.glfsoft.com:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ............................................................................................. failed.
------------------------------------------------------------------
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/log


去上面提供的路径下面查查。发现下列重要字样。
cat emdb.nohup

----- Wed Sep 19 13:47:55 2007::Console Launched with PID 393228 at time Wed Sep 19 13:47:55 2007 -----
07/09/19 12:47:58 Error starting ORMI-Server.  Unable to bind socket: Address already in use
----- Wed Sep 19 13:49:30 2007::The agentTZRegion value in /opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/config/emd.properties is not in ag
e.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
If you modified the timezone setting in the environment, please stop the agent and exectute 'emctl resetTZ agent' and also execute the script 'mgmt_target.set
to repository -----


看到个命令,执行一下再说。
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 /opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/config/emd.properties...
resetTZ failed.
The agentTZRegion in:
/opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/config/emd.properties
is not in agreement with what the agent thinks it should be.
Fix your environment.
Pick a TZ value that corresponds to time zone settings listed in:
/opt/oracle/product/10.2.0/db_1/sysman/admin/supportedtzs.lst

好像意思是关于时区的事情,这个变量有问题agentTZRegion,TZ的列表在/opt/oracle/product/10.2.0/db_1/sysman/admin/supportedtzs.lst,找个合适的。去看看那个变量。
vi  /opt/oracle/product/10.2.0/db_1/fundoa.glfsoft.com_fundoa/sysman/config/emd.properties
目前是这样的。
agentTZRegion=+08:00
去列表里面看了一下。修改为下面的。
agentTZRegion=Asia/Shanghai
继续失败,我靠,咋回事呢?

以下这点被忽略了。

需要修改自己的系统时区。vi /etc/enviroment
TZ=BEIST-8
系统时区要一致。再研究一下吧。目前还有EM的中文显示的问题。稍后再整理。




引用
以下是错误的论断,不删除了,留下“罪证”
发现一个问题。当采用JDK为32位时。EM无法正常启动。如果已经DBCA过了,请重新创建。
必须用JDK64位的。其实这个已经写在那个Oracle官方指导里面。我当时没有注意。犯错了。
重新使用了Java5_64.sdk.tar.gz,再次DBCA就可以了,正常使用EM了。

下面的这个画面是dbca执行后,最后出现的em的出错信息画面。如果遇到了。建议干掉这个库,然后重新安装JDK后,编辑变量,通常是/etc/environment,让oracle引用新的变量,再次进行dbca创建就好了。
http://linux.52zhe.info/images/add/em.error.jpg

后续补充,在后来的使用过程中用emctl start dbconsole提示无法启动,但是可以通过web访问出现如下错误。
http://linux.52zhe.info/images/add/emerr.jpg

曾在CentOS安装过很多次Oracle 10g,但是从未配置过监听,但是也好用。这次在Oracle上说什么也无法在client获取。监听未侦测到服务。继而简单查了一下资料。自己 google一下:sqlnet.ora listener.ora tnsnames.ora
C/S架构中。
服务器必配的:listener.ora
客户端必配的:tnsnames.ora
多的不说了,看别人介绍吧。但是10g之后,这个服务器端的监听文件就简略了,不需要配也好用的。我试验过很多次了。但是这次AIX上的安装,就必需配。让我很是头痛!

AIX上的出错。无非是1158:em无法访问。客户端提示找不到监听。
监听状态如下:
引用

$ lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 30-AUG-2007 09:54:10

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date                30-AUG-2007 09:52:09
Uptime                    0 days 0 hr. 2 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Log File         /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fundoa.glfsoft.com)(PORT=1521)))
The listener supports no services
The command completed successfully


我用netmgr配置过监听后,就可以找到服务了。
引用

$ lsnrctl start

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 30-AUG-2007 10:33:50

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /opt/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.101.248)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.248)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
Start Date                30-AUG-2007 10:33:50
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /opt/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.101.248)(PORT=1521)))
Services Summary...
Service "fundoa.glfsoft.com" has 1 instance(s).
  Instance "fundoa", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


相应的查看一下文件。
引用

$ cat listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = fundoa.glfsoft.com)
      (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
      (SID_NAME = fundoa)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.101.248)(PORT = 1521))
  )


http://linux.52zhe.info/images/add/lsn.1.jpg
http://linux.52zhe.info/images/add/lsn.2.jpg
http://linux.52zhe.info/images/add/lsn.3.jpg
简要描述如下:安装好系统后,hdisk1被rootvg使用,hdisk0为空。操作想让hdisk0加入rootvg,因为hdisk1只有17364M,而hdisk0则有70007M。

错误如下:
引用

# extendvg rootvg hidsk0
0516-306 extendvg: Unable to find physical volume hidsk0 in the Device
       Configuration Database.
0516-792 extendvg: Unable to extend volume group.

中途:google,有人说:加参数 -f

# extendvg -f rootvg hdisk0
0516-1162 extendvg: Warning, The Physical Partition Size of 32 requires the
       creation of 2187 partitions for hdisk0.  The limitation for volume group
       rootvg is 1016 physical partitions per physical volume.  Use chvg command
       with -t option to attempt to change the maximum Physical Partitions per
       Physical volume for this volume group.
0516-792 extendvg: Unable to extend volume group.

错误不一样了。呵呵。再google,稍安毋躁
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.baseadmn/doc/baseadmndita/physpartlimit.htm
再找到
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp
搜索chvg下的参数 -t的描述,再看下面的示例。进而解决。


急着解决问题的人,直接看解决方法吧,至于有时间的人可以看看下段的前因后果。


解决方法:
# chvg -t 3 rootvg
0516-1164 chvg: Volume group rootvg changed.  With given characteristics rootvg
       can include upto 10 physical volumes with 3048 physical partitions each.

# extendvg  rootvg hdisk0
至此,成功。

# lspv
hdisk0          000604df45d6359e                    rootvg          active
hdisk1          000604df91a01156                    rootvg          active

# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  000604df00004c000000011445087796
VG STATE:           active                   PP SIZE:        32 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      2729 (87328 megabytes)
MAX LVs:            256                      FREE PPs:       2663 (85216 megabytes)
LVs:                9                        USED PPs:       66 (2112 megabytes)
OPEN LVs:           8                        QUORUM:         2
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     30480                                    
MAX PPs per PV:     3048                     MAX PVs:        10
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable




详解如下,先把先前的出错环境列示出来,逐步操作解释说明:


# lspv
hdisk0          000604df45d6359e                    None            
hdisk1          000604df91a01156                    rootvg          active

# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  000604df00004c000000011445087796
VG STATE:           active                   PP SIZE:        32 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      542 (17344 megabytes)
MAX LVs:            256                      FREE PPs:       476 (15232 megabytes)
LVs:                9                        USED PPs:       66 (2112 megabytes)
OPEN LVs:           8                        QUORUM:         2
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512                                    
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

# bootinfo -s hdisk1
17364

# bootinfo -s hdisk0
70007


操作步骤如下:

# extendvg -f rootvg hdisk0
0516-1162 extendvg: Warning, The Physical Partition Size of 32 requires the
       creation of 2187 partitions for hdisk0.  The limitation for volume group
       rootvg is 1016 physical partitions per physical volume.  Use chvg command
       with -t option to attempt to change the maximum Physical Partitions per
       Physical volume for this volume group.
0516-792 extendvg: Unable to extend volume group.

# chvg -t 2 rootvg
0516-1164 chvg: Volume group rootvg changed.  With given characteristics rootvg
       can include upto 16 physical volumes with 2032 physical partitions each.

# extendvg -f rootvg hdisk0
0516-1162 extendvg: Warning, The Physical Partition Size of 32 requires the
       creation of 2187 partitions for hdisk0.  The limitation for volume group
       rootvg is 2032 physical partitions per physical volume.  Use chvg command
       with -t option to attempt to change the maximum Physical Partitions per
       Physical volume for this volume group.
0516-792 extendvg: Unable to extend volume group.

# chvg -t 3 rootvg
0516-1164 chvg: Volume group rootvg changed.  With given characteristics rootvg
       can include upto 10 physical volumes with 3048 physical partitions each.


引用


0516-1162 extendvg: Warning, The Physical Partition Size of 32 requires the
       creation of 2187 partitions for hdisk0.  The limitation for volume group
       rootvg is 1016 physical partitions per physical volume.  Use chvg command
       with -t option to attempt to change the maximum Physical Partitions per
       Physical volume for this volume group.
0516-792 extendvg: Unable to extend volume group.

试译如下:

0516-1162 extendvg: 警告,hdisk0的物理分区大小(pps)是32M,需要建立2187个分区。超出了卷组rootvg
默认的1016个物理分区的限制。用chvg命令-t参数尝试改变卷组的每个物理卷(PV)的最大的物理分区数。

如果英文好,真省事,我英文不好,郁闷,看了半天。还好是自己看着词霸解决的。不求人,挺爽的!

结论如下:
卷组本身对于物理卷有着,最大的物理分区数的限制。就是说1个磁盘,在被加入到卷组中,要受到其默认参数,PP  
size 和MAX PPs per PV的影响。看命令lsvg里面吧。所以这次要加的硬盘是70007M。原来默认的MAX PPs per PV是1016,故而不够,所以我逐次递增。其实应该自己算一下的。70007/32约等于2187,自己看看提示刚才那个英文翻译。呵呵,AIX已经帮 你算过了。那你问我那个3是怎么来的??好吧。都告诉你。如下:

引用

打开http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp,搜索chvg。找到-t参数如下:
-t [factor]    更改每个物理卷的物理分区数的限制,由 factor 指定。对于 32 个磁盘卷组,factor 应该在 1 和 16 之间,对于 128 个磁盘卷组,则在 1 和 64 之间。

如果未提供 factor,则它设置到最低值,以便卷组中的最大磁盘的物理分区数小于 factor x 1016。

如果指定了 factor,则对于此卷组,每个物理卷的物理分区的最大数更改为 factor x 1016。
注:

  1. 对于可伸缩类型的卷组,该选项将被忽略。
  2. 如果违背每个物理卷限制的 1016 个物理分区,在 AIX 4.1.2 中创建卷组,则此标志可用于将卷组转换为受支持的状态。这将确保分区的正确的旧/新的标记。
  3. 如果卷组中有任何旧文件物理分区,则不能更改 factor。
  4. 一旦转换了卷组,则它不能导入到 AIX 4.3 或更低版本。
  5. 如果卷组在并行方式下联机,则不能使用此标志。
  6. 可能包括在此卷组中的物理卷的最大数将减少为(MAXPVS/factor)。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有