随笔 - 53, 文章 - 0, 评论 - 3, 引用 - 0
数据加载中……

2010年8月16日

java.sql.BatchUpdateException: IO Error: Connection reset

during analysis of "IO Error: Connection reset", many articles mentioned that it could be caused by java security code (accessing /dev/random) used in JDBC connection. However it is not the root cause in my case. In my environment, Java already use /dev/urandom. 1. $JAVA_HOME/jre/lib/security/java.security securerandom.source=file:/dev/./urandom 2. check with strace. only -Djava.security.egd=file:/dev/../dev/urandom will trigger system call (read on /dev/urandom) all other other path format like below are OK. -Djava.security.egd=file:/dev/./urandom -Djava.security.egd=file:///dev/urandom 3. Keep checking the retropy size, I have never seen it is exhaused. while [ 1 ]; do cat /proc/sys/kernel/random/entropy_avail sleep 1 done usually the avail is in the range from 1000 to 3000. so far, there is no clue about the root cause of "IO Error: Connection reset".

posted @ 2017-02-20 09:28 InPractice 阅读(1290) | 评论 (0)编辑 收藏

Lessons learned - Oracle GI and Database Installation on SUSE 12

I encountered many issue during installation of Oracle Grid Infrastructure(GI) and Database; with the help of ariticle and documents found through Google search engine, I finally made it. for records, here is the details issues encountered and solutions applied. Major issues were encountered during GI installation. Pre-installation tasks. Issue 1: swapspace is not big enough; (1.3.1 Verify System Requirements) grep MemTotal /proc/meminfo 264G grep SwapTotal /proc/meminfo 2G during OS installation, I take default option and swap space is only 2G. Oracle recommend to have more than 16G swap space in case of more that 32G RAM. dd if=/dev/zero of=/home/swapfile bs=1024 count=33554432 33554432+0 records in 33554432+0 records out 34359738368 bytes (34 GB) copied mkswap /home/swapfile mkswap /home/swapfile chmod 0600 /home/swapfile lessons learned: setup swap space properly according to DB requirement when installing OS. Issue 2: cannot find oracleasm-kmp-default from Oracle site. (1.3.6 Prepare Storage for Oracle Automatic Storage Management) install oracleasmlib and oracleasm-support is easy, just download them from Oracle and install them; Originally oracleasm kernel is provided by Oracle, but now I cannot find it from Oracle; finally I realized that oracleasm kernel is now provided by OS vendor; In my case, it should be installed from SUSE disk; a. to get its name oracleasm-kmp-default zypper se oracle b. map dvd and install zypper in oracleasm-kmp-default rpm -qa|grep oracleasm oracleasm-kmp-default-2.0.8_k3.12.49_11-3.20.x86_64 oracleasm-support-2.1.8-1.SLE12.x86_64 oracleasmlib-2.0.12-1.SLE12.x86_64 asm configure -i asm createdisk DATA /dev/<...> asm listdisks --DATA ls /dev/oracleasm/disks Installation tasks: Issue 3: always failed due to user equivalence check after starting installer OUI with user oracle. however if I manully check with runcluvfy, no issue found at all. ./runcluvfy.sh stage -pre crsinst -n , -verbose I worked around it by using another user to replace user oracle. but it triggered next issue. Issue 4: cannot see ASM disks in OUI. no matter how I change the disk dicovery path. the disk list is empty. but I can find disk manully. /usr/sbin/oracleasm-discover 'ORCL:*' Discovered disk: ORCL:DATA Root cause is that the ASM is configured and created with user oracle. and I aming installing GI with different user other than oracle; so I cannot see the Disk created. change owner of disk device file solved the issue. ls /dev/oracleasm/disks chown /dev/oracleasm/disks -R Issue 5: root.sh execution failed. Failed to create keys in the OLR, rc = 127, Message: clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory fixed the issue with command below: zypper in libcap1 ohasd failed to start Failed to start the Clusterware. Last 20 lines of the alert log follow: 2016-07-24 23:10:28.502: [client(1119)]CRS-2101:The OLR was formatted using version 3. I found a good document from SUSE, Oracle RAC 11.2.0.4.0 on SUSE Linux Enterprise Server 12 - x86_64, it make it clear that SUSE 12 is supported by Oracle GI 11.2.0.4, it also mentioned Patch 18370031. "During the Oracle Grid Infrastructure installation, you must apply patch 18370031 before configuring the software that is installed. " The patch 18370031 is actually mentioned in "Oracle quick installation guide on Linux", but not mentioned in "Oracle quick installation guide on Linux". I majored followed up with later one and missed Patch 18370031. issue disappeared after I installed the patch 18370031. ./OPatch/opatch napply -oh -local /18370031 Errors in file : ORA-27091: unable to queue I/O ORA-15081: failed to submit an I/O operation to a disk ORA-06512: at line 4 solved by change owner of disk DATA related file ls -l /dev/oracleasm/iid chown on folder /dev/oracleasm/iid and some .* hidden file. Issue during DB installation Issue 6: report error: in invoking target 'agent nmhs' vi $ORACLE_HOME/sysman/lib/ins_emagent.mk Search for the line $(MK_EMAGENT_NMECTL) Change it to: $(MK_EMAGENT_NMECTL) -lnnz11 refer to https://community.oracle.com/thread/1093616?tstart=0

posted @ 2016-07-28 16:55 InPractice 阅读(249) | 评论 (0)编辑 收藏

卸载Ubuntu需要注意的地方

很多年前装了UbuntuWindows的双系统,最近因为有了专门的电脑来装Ubuntu,所以把原先电脑上的Ubuntu卸载了,结果系统不能引导了。因为GRUB的原理是控制权从MBRUbuntu系统盘,然后Ubuntu系统盘再提供对windows的引导。现在Ubuntu系统被卸载了。这个启动的链条也就断了。

这个问题本身不难解决,借了一个
Windows安装盘,恢复一下MBR即可。但是这个需要windows系统的Administrator密码。而我的系统不是我装的,我根本不知道这个密码。

有的帖子提到破解
Administrator密码,试了一下,觉得太麻烦了。因为电脑上有数据,也不能重装。 

最后的解决方案是在原先的
Ubuntu分区上安装一个新的Windows。这样变成了windows的双系统。安装完重启之后可以进入任何一个系统(新的或者旧的Windows)。安装的过程中MBR被自动更新了。再下来就改一下老系统的Administrator密码,删除掉多于的Windows新系统即可。

posted @ 2011-04-11 18:19 InPractice 阅读(631) | 评论 (1)编辑 收藏

使用GMail的困惑

用Gmail的时候不小心点了"存档"按钮,一封重要的邮件就此消失了好几天,今天才机缘巧合找到。

在网络上查到的解释是:
        存档会将邮件从收件箱移至所有邮件,这样您不必删除邮件就可以整理收件箱。

难以理解,坦率地说,这个功能对我来说是徒增烦恼。看来任何工具都需要你去适应,磨合。

posted @ 2011-02-11 11:02 InPractice 阅读(240) | 评论 (0)编辑 收藏

华容道游戏的解决

最近买了一个叫做“华容道”的玩具给儿子晚。这个游戏虽然号称是中国四大古典智力游戏之一。其实不过百年历史,而且是从国外引进的。不过本地化做得非常好,也算是创造性地吸收国外文明。

手工解决这个游戏有点难度,当然已经有人给出了解法;不过我还是自己用编程的方式解决了一遍。发现自己在这方面的编程还是比较弱。大部分时间花在了调试上。

刚开始是用的深度优先搜索。大致知道了答案应该长什么样。后来改进为广度优先搜索,得到了最优的解法。还有一个就是原先只考虑每次最多移动一格。后来发现传统的定义是一个块的所有连续移动都算作一步。相应地修改了实现算法。

最难的是做界面。为了调试,随便写了个Applet。但是给我儿子玩,就觉得拿不出手了。



posted @ 2010-08-16 13:49 InPractice 阅读(315) | 评论 (0)编辑 收藏