Chinaunix首页 | 论坛 | 博客
  • 博客访问: 241648
  • 博文数量: 13
  • 博客积分: 3327
  • 博客等级: 中校
  • 技术积分: 525
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-22 11:36
文章分类

全部博文(13)

文章存档

2012年(2)

2011年(10)

2010年(1)

我的朋友

分类: 数据库开发技术

2011-11-18 01:06:25

210机器上的几个altibase都连接不上,报如下错:

ocsdev@OCSTEST[/ocsdev]> isql -u sys -p manager -port 20304 -s 127.0.0.1

-----------------------------------------------------------------

     Altibase Client Query utility.

     Release Version 4.3.9.165

     Copyright 2000, ALTIBASE Corporation or its subsidiaries.

     All Rights Reserved.

-----------------------------------------------------------------

ISQL_CONNECTION = TCP, SERVER = 127.0.0.1, PORT_NO = 20304

[ERR-50032 : Client unable to establish connection]

 

但使用unix domain方式可以连接:

ocsdev@OCSTEST[/ocsdev]> export ISQL_CONNECTION=UNIX

ocsdev@OCSTEST[/ocsdev]> isql -u sys -p manager -port 20304 -s 127.0.0.1

-----------------------------------------------------------------

     Altibase Client Query utility.

     Release Version 4.3.9.165

     Copyright 2000, ALTIBASE Corporation or its subsidiaries.

     All Rights Reserved.

-----------------------------------------------------------------

ISQL_CONNECTION = UNIX, SERVER = 127.0.0.1, PORT_NO = 20304

 

这样就确定一个问题:altibase使用TCP方式不能连接

 

但在2.190上使用TCP可以连接:

[altibase@bssdev ~]$/data/altibase/bin/isql -s 10.200.2.210 -u sys -p manager -port 20303

-----------------------------------------------------------------

     Altibase Client Query utility.

     Release Version 4.3.9.0

     Copyright 2000, ALTIBASE Corporation or its subsidiaries.

     All Rights Reserved.

-----------------------------------------------------------------

Write NLS_USE (default US7ASCII) :

ISQL_CONNECTION = TCP, SERVER = 10.200.2.210, PORT_NO = 20303

iSQL>  

 

 

怀疑可能是TCP端口被占用了

 

统计一下TCP连接情况

ocsdev@OCSTEST[/ocsdev]> netstat -an|grep tcp|wc

205 1230 15863

发现tcp连接并不多

 

莫非有一些非正常的连接,看看文件句柄数

bash-4.0# lsof | grep TCP |wc

18170 181700 1699884

 

 

然后发现有非常多的如下程序

……

RemindApp   610    scdev  179u  IPv4 0xe0000005cc703f80         0t0     TCP *:64644 (CLOSING)

RemindApp   610    scdev  180u  IPv4 0xe0000005cc704580         0t0     TCP *:64664 (CLOSING)

RemindApp   610    scdev  181u  IPv4 0xe0000005cc707880         0t0     TCP *:64701 (CLOSING)

RemindApp   610    scdev  182u  IPv4 0xe0000006db59c980         0t0     TCP *:64733 (CLOSING)

RemindApp   610    scdev  183u  IPv4 0xe0000005caf70f80         0t0     TCP *:64762 (CLOSING)

RemindApp   610    scdev  184u  IPv4 0xe00000060fad0f80         0t0     TCP *:64782 (CLOSING)

RemindApp   610    scdev  185u  IPv4 0xe0000005b9d5f080         0t0     TCP *:64799 (CLOSING)

RemindApp   610    scdev  186u  IPv4 0xe000000552718800         0t0     TCP *:64818 (CLOSING)

RemindApp   610    scdev  187u  IPv4 0xe00000055271b200         0t0     TCP *:64837 (CLOSING)

RemindApp   610    scdev  188u  IPv4 0xe0000005820fde80         0t0     TCP *:64864 (CLOSING)

RemindApp   610    scdev  189u  IPv4 0xe0000006248cb480         0t0     TCP *:64891 (CLOSING)

RemindApp   610    scdev  190u  IPv4 0xe0000005590e6d00         0t0     TCP *:64918 (CLOSING)

RemindApp   610    scdev  191u  IPv4 0xe000000551c32500         0t0     TCP *:64939 (CLOSING)

RemindApp   610    scdev  192u  IPv4 0xe0000006248cf380         0t0     TCP *:64961 (CLOSING)

RemindApp   610    scdev  193u  IPv4 0xe0000005d573c080         0t0     TCP *:64980 (CLOSING)

RemindApp   610    scdev  194u  IPv4 0xe0000006248cd580         0t0     TCP *:65001 (CLOSING)

RemindApp   610    scdev  195u  IPv4 0xe00000019ff9ed80         0t0     TCP *:65020 (CLOSING)

RemindApp   610    scdev  196u  IPv4 0xe000000552711000         0t0     TCP *:65041 (CLOSING)

RemindApp   610    scdev  197u  IPv4 0xe0000006248cb780         0t0     TCP *:65066 (CLOSING)

RemindApp   610    scdev  198u  IPv4 0xe000000552711600         0t0     TCP *:65090 (CLOSING)

RemindApp   610    scdev  199u  IPv4 0xe0000006db59bd80         0t0     TCP *:65108 (CLOSING)

RemindApp   610    scdev  200u  IPv4 0xe0000005cc703980         0t0     TCP *:65130 (CLOSING)

RemindApp   610    scdev  201u  IPv4 0xe0000005cc702d80         0t0     TCP *:65149 (CLOSING)

RemindApp   610    scdev  202u  IPv4 0xe0000005cc70fc80         0t0     TCP *:65169 (CLOSING)

RemindApp   610    scdev  203u  IPv4 0xe0000005cc703680         0t0     TCP *:65189 (CLOSING)

RemindApp   610    scdev  204u  IPv4 0xe0000005cc702180         0t0     TCP *:65206 (CLOSING)

RemindApp   610    scdev  205u  IPv4 0xe0000005cc706080         0t0     TCP *:65226 (CLOSING)

RemindApp   610    scdev  206u  IPv4 0xe00000053c392180         0t0     TCP *:65248 (CLOSING)

RemindApp   610    scdev  207u  IPv4 0xe0000005cc70f080         0t0     TCP *:65269 (CLOSING)

RemindApp   610    scdev  208u  IPv4 0xe0000006db598d80         0t0     TCP *:65289 (CLOSING)

RemindApp   610    scdev  209u  IPv4 0xe00000053c392a80         0t0     TCP *:65308 (CLOSING)

RemindApp   610    scdev  210u  IPv4 0xe0000005cc70c680         0t0     TCP *:65327 (CLOSING)

RemindApp   610    scdev  211u  IPv4 0xe0000005cc70bd80         0t0     TCP *:65352 (CLOSING)

RemindApp   610    scdev  212u  IPv4 0xe0000005cc707280         0t0     TCP *:65379 (CLOSING)

RemindApp   610    scdev  213u  IPv4 0xe0000006db59ea80         0t0     TCP *:65398 (CLOSING)

RemindApp   610    scdev  214u  IPv4 0xe0000006db599080         0t0     TCP *:65425 (CLOSING)

RemindApp   610    scdev  215u  IPv4 0xe00000053c397280         0t0     TCP *:65443 (CLOSING)

RemindApp   610    scdev  216u  IPv4 0xe0000005cc70de80         0t0     TCP *:65460 (CLOSING)

RemindApp   610    scdev  217u  IPv4 0xe0000005cc704880         0t0     TCP *:65479 (CLOSING)

RemindApp   610    scdev  218u  IPv4 0xe0000006db598780         0t0     TCP *:65499 (CLOSING)

RemindApp   610    scdev  219u  IPv4 0xe0000005cc703080         0t0     TCP *:65517 (CLOSING)

RemindApp   610    scdev  220u  IPv4 0xe0000005cc702780         0t0     TCP *:49159 (CLOSING)

RemindApp   610    scdev  221u  IPv4 0xe00000053c396f80         0t0     TCP *:49189 (CLOSING)

RemindApp   610    scdev  222u  IPv4 0xe00000053c397880         0t0     TCP *:49209 (CLOSING)

RemindApp   610    scdev  223u  IPv4 0xe0000005cc702480         0t0     TCP *:49231 (CLOSING)

RemindApp   610    scdev  224u  IPv4 0xe0000005cc702a80         0t0     TCP *:49251 (CLOSING)

RemindApp   610    scdev  225u  IPv4 0xe0000005cc701b80         0t0     TCP *:49275 (CLOSING)

RemindApp   610    scdev  226u  IPv4 0xe0000005cc701880         0t0     TCP *:49305 (CLOSING)

RemindApp   610    scdev  227u  IPv4 0xe0000005cc701580         0t0     TCP *:49324 (CLOSING)

RemindApp   610    scdev  228u  IPv4 0xe0000005cc701280         0t0     TCP *:49344 (CLOSING)

RemindApp   610    scdev  229u  IPv4 0xe0000005cc700680         0t0     TCP *:49364 (CLOSING)

RemindApp   610    scdev  230u  IPv4 0xe0000005cc700f80         0t0     TCP *:49395 (CLOSING)

RemindApp   610    scdev  231u  IPv4 0xe0000005cc700c80         0t0     TCP *:49413 (CLOSING)

RemindApp   610    scdev  232u  IPv4 0xe0000006db599c80         0t0     TCP *:49444 (CLOSING)

RemindApp   610    scdev  233u  IPv4 0xe0000006db599380         0t0     TCP *:49461 (CLOSING)

RemindApp   610    scdev  234u  IPv4 0xe0000005a68fe780         0t0     TCP *:49480 (CLOSING)

RemindApp   610    scdev  235u  IPv4 0xe0000005a68fe180         0t0     TCP *:49500 (CLOSING)

RemindApp   610    scdev  236u  IPv4 0xe0000005a68fde80         0t0     TCP *:49519 (CLOSING)

RemindApp   610    scdev  237u  IPv4 0xe0000005a68fe480         0t0     TCP *:49538 (CLOSING)

RemindApp   610    scdev  238u  IPv4 0xe00000053c394e80         0t0     TCP *:49558 (CLOSING)

RemindApp   610    scdev  239u  IPv4 0xe0000006db597e80         0t0     TCP *:49577 (CLOSING)

RemindApp   610    scdev  240u  IPv4 0xe0000005cc700380         0t0     TCP *:49595 (CLOSING)

……

 

很可能是RemindApp异常引起,导致tcp端口被占光。但为了证明这个问题,还是查看了系统的TCP参数

root@OCSTEST[/altibase/ocstest]# ndd -get /dev/tcp tcp_largest_anon_port  

65535   --匿名分配的最大的端口号

 

root@OCSTEST[/altibase/ocstest]# ndd -get /dev/tcp tcp_smallest_anon_port

49152   --匿名分配的最小的端口号

 

65535-49152=16383  < 18170

说明匿名端口已被占光了

 

因此在本机使用TCP方式就无法连接了,而在2.190上可以。

 

bash-4.0# ps -ef|grep RemindApp

   scdev   610   609  0  Apr 22  ?         6:38 /svn/scdev/r7code/bin/RemindApp -c/svn/scdev/r7code/etc/rent_remind.conf

   scdev   609     1  0  Apr 22  ?         0:01 /svn/scdev/r7code/bin/RemindApp -c/svn/scdev/r7code/etc/rent_remind.conf

    root 23195 23086  1 18:45:40 pts/20    0:00 grep RemindApp

   scdev   613   609  0  Apr 22  ?         6:51 /svn/scdev/r7code/bin/RemindApp -c/svn/scdev/r7code/etc/rent_remind.conf

 

bash-4.0# kill -9 610 609 613

bash-4.0# ps -ef|grep RemindApp

    root 23208 23086  0 18:46:30 pts/20    0:00 grep RemindApp

bash-4.0# lsof | grep TCP |wc -l

225

 

把程序杀掉后,TCP连接恢复正常

 

ocsdev@OCSTEST[/ocsdev]> isql -u sys -p manager -port 20304 -s 127.0.0.1

-----------------------------------------------------------------

     Altibase Client Query utility.

     Release Version 4.3.9.165

     Copyright 2000, ALTIBASE Corporation or its subsidiaries.

     All Rights Reserved.

-----------------------------------------------------------------

ISQL_CONNECTION = TCP, SERVER = 127.0.0.1, PORT_NO = 20304

iSQL>
阅读(1811) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~