dbvisualizer连接linux下的informix

2012CSDN博客之星火热出炉!     2013年全国百所高校巡讲讲师招募

dbvisualizer连接linux下的informix       

576人阅读 评论(0) 收藏 举报
我的informix是安装在VM的linux下的,由于便于学习,于是我在
win7里弄了个dbvisualizer,没想到接下来的连接让整了我一下午啊...


我的informix的网络配置是
/etc/hosts:
   zyl zyl
/etc/services最后一行加入
   sqlexecl 9888
$/INFORMIXDIR/etc/sqlhost最后一行加入
   ol_informix1170 onsoctcp zyl sqlexecl
$/INFORMIXDIR/etc/onconfig
   NETTYPE soctcp,2,50,CPU


一切看起来是那么的和谐啊···
结果一点dbvisualizer上的Reconnect便2了,总是出现:
Product:  DbVisualizer Personal 7.0.6
Build:  #1499 (2010/04/21 08:23)
Java VM:  Java HotSpot(TM) Client VM
Java Version:  1.6.0_30
Java Vendor:  Sun Microsystems Inc.
OS Name:  Windows 7
OS Arch:  x86
OS Version:  6.1


An error occurred while establishing the connection:
   Type: java.sql.SQLException   Error Code: -908   SQL State: 08004
Message:
   com.informix.asf.IfxASFException: Attempt to connect to database server (ol_informix1170) failed.


上网找了,也没什么结果。于是只能硬着头皮想办法了···
我先是在linux里面用netstat -atl看了监听状态,发现也是我要的结果,
zyl:sqlexecl *.* LISTEN,
郁闷了,于是我打开了tcpdump命令,在Reconnect一把,看看输出结果:
17:21:18.996285 arp who-has zyl tell 192.168.1.101
17:21:19.005074 arp reply zyl is-at 00:0c:29:53:f7:0d (oui Unknown)
17:21:18.997389 IP 192.168.1.101.7803 > zyl.cyborg-systems: S 3728156627:3728156627(0) win 8192
17:21:18.997402 IP zyl.cyborg-systems > 192.168.1.101.7803: R 0:0(0) ack 3728156628 win 0
17:21:19.503326 IP 192.168.1.101.7803 > zyl.cyborg-systems: S 3728156627:3728156627(0) win 8192
17:21:19.503370 IP zyl.cyborg-systems > 192.168.1.101.7803: R 0:0(0) ack 1 win 0
17:21:20.003366 IP 192.168.1.101.7803 > zyl.cyborg-systems: S 3728156627:3728156627(0) win 8192
17:21:20.003411 IP zyl.cyborg-systems > 192.168.1.101.7803: R 0:0(0) ack 1 win 0
17:21:23.996509 arp who-has 192.168.1.101 tell zyl
17:21:24.997100 arp who-has 192.168.1.101 tell zyl
17:21:25.996849 arp who-has 192.168.1.101 tell zyl
看到的却是192.168.1.101.7803 > zyl.cyborg-systems,而非到zyl.sqlexecl,奇怪了啊!
后来去/etc/service看个明白,原来9888这个端口在前面就被cyborg-systems用了,真坑了我一把。
后面就改了88310这个端口。怀着喜悦的心去点Reconnect,结果还是惨不忍睹啊,
郁闷了,于是我打开了tcpdump命令,在Reconnect一把,看看输出结果:
17:21:18.996285 arp who-has zyl tell 192.168.1.101
17:21:19.005074 arp reply zyl is-at 00:0c:29:53:f7:0d (oui Unknown)
17:21:18.997389 IP 192.168.1.101.7803 > zyl.sqlexecl: S 3728156627:3728156627(0) win 8192
17:21:18.997402 IP zyl.sqlexecl > 192.168.1.101.7803: R 0:0(0) ack 3728156628 win 0
17:21:19.503326 IP 192.168.1.101.7803 > zyl.sqlexecl: S 3728156627:3728156627(0) win 8192
17:21:19.503370 IP zyl.sqlexecl > 192.168.1.101.7803: R 0:0(0) ack 1 win 0
17:21:20.003366 IP 192.168.1.101.7803 > zyl.sqlexecl: S 3728156627:3728156627(0) win 8192
17:21:20.003411 IP zyl.sqlexecl > 192.168.1.101.7803: R 0:0(0) ack 1 win 0
17:21:23.996509 arp who-has 192.168.1.101 tell zyl
17:21:24.997100 arp who-has 192.168.1.101 tell zyl
17:21:25.996849 arp who-has 192.168.1.101 tell zyl
在第4行处linux直接给了dbvisualizer一个R复位,存在此种情况无外乎是1,到不存在的端口连接请求;
2,异常终止一个连接;3,检测半打开连接。2和3在这里肯定不成立的,于是就只能看1的情况了,
到不存在的端口连接,想想很奇怪啊,我明明用了netstat -atl看了的zyl:execl *.* LISTEN是处于
监听状态的,并且tcpdump过来的也是17:21:18.997389 IP 192.168.1.101.7803 > zyl.sqlexecl: S 3728156627:3728156627(0) win 8192
,难道是sqlexecl有问题,于是我又修改了sqlexecl为8810。
但又不知该如何检测是不是sqlexecl的问题,后来想到了netstat原来还有个
-n的选项,是用来显示点分制ip的,一试netstat -altn,果然看到192.168.1.108:88310,原来端口还未改过来,
不管了,直接重启了一把机器,再点Reconnect,果然OK了。

你可能感兴趣的:(dbvisualizer连接linux下的informix)