oninit -vy 出错: Fatal error in shared memory creation 以及 shared memory already exists

oninit -vy 出错: Fatal error in shared memory creation 以及 shared memory already exists[@more@]

使用 onmode -ky 关闭 informix 后,再重启,不成功:
[19] % oninit -vy
Checking group membership to determine server run mode...succeeded
Reading configuration file '/informix/ids2/etc/onconfig.wnms'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...FAILED
oninit: Fatal error in shared memory creation

WARNING: server initialization failed, or possibly timed out (if -w was used).
Check the message log, online.log, for errors.
[20] % onstat -m

IBM Informix Dynamic Server Version 11.50.FC6WE -- On-Line -- Up 1 days 19:22:33 -- 1267556 Kbytes

Message Log File: /informix/ids2/online.log

16:50:13 Checkpoint Completed: duration was 0 seconds.
16:50:13 Sun Feb 28 - loguniq 5, logpos 0x3f8e018, timestamp: 0x6f759 Interval: 348

16:50:13 Maximum server connections 1
16:50:13 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 2, Llog used 2

17:05:22 Checkpoint Completed: duration was 0 seconds.
17:05:22 Sun Feb 28 - loguniq 5, logpos 0x3f90018, timestamp: 0x6f769 Interval: 349

17:05:22 Maximum server connections 1
17:05:22 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 2, Llog used 2

17:07:49 IBM Informix Dynamic Server Started.
17:07:49 Warning: The IBM IDS Workgroup Edition license restriction limits
17:07:49 the total shared memory size for this server to 16777216 KB.
17:07:49 The size has been reset to the limit to bring up the database server.
17:07:49 shmget: [EEXIST][17]: key 52584801: shared memory already exists
17:07:49 mt_shm_init: can't create resident segment

http://www.dbmonster.com/Uwe/Forum.aspx/informix/3336/shmget-EEXIST-17-key-52584801-shared-memory-already-exists 得知:
onmode -ky 后 informix 仍占有共享内存

一、解决过程如 http://bbsanwei.javaeye.com/blog/370745 所述

wx-dev% ipcs -m |grep -v grep |grep informixm 16385 0x52594801 --rw-rw---- root informix
m 16386 0x52594802 --rw-rw---- root informix
m 16387 0x52594803 --rw-rw---- root informix
m 16388 0x52594804 --rw-rw---- root informix
m 16389 0x52594805 --rw-rw---- root informix
m 21512 0x52594806 --rw-rw---- root informix
m 7181 0x52594807 --rw-rw---- root informix
m 7182 0x52594808 --rw-rw---- root informix
m 7183 0x52594809 --rw-rw-rw- root informix

wx-dev% ipcrm -m 16385 16386 16387 16388 16389 21512 7181 7182 7183

二、
在文章: http://bbs3.chinaunix.net/archiver/tid-1572199.html 中提到:在 IDS 11.5 xC4 后提供了 onclean 命令来清除共享内存。
(The onclean utility attempts to clean up shared memory, semaphores, and stops database server virtual processes. )
以及使用 onshutdown.sh(unix) 或 onshutdown.bat(windows) 来停止 informix 服务。
(The onshutdown script first runs the onmode -ky command, and then after a specified wait time, runs the onclean -ky command.)
但是,我使用 onclean 不能清除共享内存。

三、
我以前看过一篇文章,上面曾经给出用配置参数 SERVERNUM 计算共享内存地址的方法,但现在找不到那篇文章了。所以我认为通过修改配置参数 SERVERNUM 也应该可以重启informix 的。(试验没成功,估计是内存重叠的原因)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22565551/viewspace-1031513/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22565551/viewspace-1031513/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值