Home > Database > Mysql Tutorial > body text

Nimbulainstance上进行orion测试遇到的错误一例

WBOY
Release: 2016-06-07 15:28:11
Original
1177 people have browsed it

今天因为要在 nimbula 实例上测试 Oracle Database 12c DBaas 的 IO 性能,因为 nimbula 实例不方便安装 Oracle Database 软件,就从一台已经安装了该软件的机器上copy过来一个 Oracle Home 目录,但是无论怎么设置环境变量,始终都报如下错误: export ORAC

今天因为要在 nimbula 实例上测试 Oracle Database 12c DBaas 的 IO 性能,因为 nimbula 实例不方便安装 Oracle Database 软件,就从一台已经安装了该软件的机器上copy过来一个 Oracle Home 目录,但是无论怎么设置环境变量,始终都报如下错误:

export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH

-bash-4.1# orion
orion: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
 

在 nimbula 实例上查找 libaio.so.1 发现在拷贝的 Oracle Home 目录下,也确实存在该目录,只是没有添加到 LD_LIBRARY_PATH 中,将该路径加入变量中后

/u01/app/oracle/product/12.1.0/dbhome_1/lib/stubs/libaio.so.1

export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/u01/app/oracle/product/12.1.0/dbhome_1/lib/stubs:$LD_LIBRARY_PATH

可是在执行 orion 测试命令时又遇到另一个错误,提示 stubs 下的 lib 只是一个 link ,这个路径不应包含在 LD_LIBRARY_PATH 中。

于是又将该路径从变量中移除。感觉此问题可能和这里的 Oracle Home 是从其他机器拷贝而来有关。对比一下原机器和现有 nimbula 实例发现。

在 google 搜索到一个很有用的link对解决此问题有很大帮助:http://www.pipperr.de/dokuwiki/doku.php?id=dba:oracle_io_last_werkzeug_orion

在 nimbula 实例上进入 orion 所在路径然后执行 ldd 命令查看 orion 所调用的模块发现缺少两个 libaio.so1 包,而前面的find命令已经在Oracle Home/lib下已经找到该

lib包,这里只有一种可能这里所缺的libaio.so.1和上面的其他的lib包一样,可能只是一个link指向 Oracle Home/lib 下的文件。

-bash-4.1# cd $ORACLE_HOME/bin
-bash-4.1# ldd ./orion
linux-vdso.so.1 => (0x00007fffa5b96000)
libclntsh.so.12.1 => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1 (0x00007fbe55d1e000)
libclntshcore.so.12.1 => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntshcore.so.12.1 (0x00007fbe557cd000)
libcell12.so => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libcell12.so (0x00007fbe55531000)
libskgxp12.so => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libskgxp12.so (0x00007fbe55236000)
libaio.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007fbe5502d000)
libm.so.6 => /lib64/libm.so.6 (0x00007fbe54da9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbe54b8b000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fbe54972000)
librt.so.1 => /lib64/librt.so.1 (0x00007fbe5476a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbe543d6000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbe58a0e000)
libnnz12.so => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libnnz12.so (0x00007fbe53cc0000)
libons.so => /u01/app/oracle/product/12.1.0/dbhome_1/lib/libons.so (0x00007fbe53a7c000)
libaio.so.1 => not found
libaio.so.1 => not found

在拷贝 Oracle Home 的源主机上发现,果然是 nimbula 实例缺少相应的包。

-bash-3.2# hostname
slcn06cn13
-bash-3.2# find / -name libaio.so.1
/usr/lib64/libaio.so.1
/usr/lib/libaio.so.1

-bash-3.2# cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
-bash-3.2# ldd orion
linux-vdso.so.1 => (0x00007fff043ff000)
libclntsh.so.12.1 => not found
libclntshcore.so.12.1 => not found
libcell12.so => not found
libskgxp12.so => not found
libaio.so.1 => /usr/lib64/libaio.so.1 (0x00007f08dd3fa000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000363a800000)
libm.so.6 => /lib64/libm.so.6 (0x000000363a000000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000363ac00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x000000363e000000)
librt.so.1 => /lib64/librt.so.1 (0x000000363b000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003639c00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003639800000)

这下终于知道原因了,尝试将源主机上的 /usr/lib64/libaio.so.1 和 /usr/lib/libaio.so.1 拷贝到 nimbula 实例上对应的目录问题立即解决。

转载请注明作者出处及原文链接,否则将追究法律责任:

作者:xiangsir

原文链接:http://blog.csdn.net/xiangsir/article/details/18262689

QQ:444367417

MSN:xiangsir@hotmail.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template