存档

文章标签 ‘端口’,文章数:1

在linux企业版5.4上用两个不同的账号建立了两个sybase数据库服务器。

15.0.3版本的服务器能够正常启动,12.5.4版本的sybase数据库启动时提示:

cannot allocate resources for listener protocol tcp ,host xxx.xxx.xxx.xxx ,port 5000,engine 0.

cannot start any network listeners.

 上网查找原因:

将/etc/hosts中原来的

127.0.0.1 localhost.localdomain localhost

改为:

127.0.0.1 localhost

192.168.2.178 localhost.localdomain

问题解决,能够用端口5000启动数据库服务器了。

将参考文档放在这里以备后来使用。

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

sybase不能访问服务器解决办法

[ 2009-6-5 12:59:00 | By: 梦精灵 ]

不能远程访问fedora平台上的ase的问题

问题的提出:
问题一:
a机:fedora4+ase15
安装后没有修改ase的任何配置(初次使用sybase的东西,全是缺省配置)
b机:win2003+ase125
a机的sybase central可以连接b机的ase
b机不能访问a机的ase
a机的防火墙以及selinux都关闭了
在a机telnet b 5000没问题
在b机或者a机本机上telnet ip 5000:
正在连接到172.20.53.26...不能打开到主机的连接, 在端口 5000: 连接失败
但在a机telnet localhost 5000是可以连接的

问题二:
在interfaces文件中将机器名改为ip地址后
启动服务时出现:
00:00000:00008:2006/04/28 11:32:19.49 kernel ninit: cannot find host 172.20.53.26
00:00000:00008:2006/04/28 11:32:19.49 kernel Cannot allocate resources for listener with protocol tcp, host 172.20.53.26, port 5000, engine 0.
00:00000:00008:2006/04/28 11:32:19.49 kernel Cannot start any network listeners.
但使用hostname、localhost、172.0.0.1都没问题。就是会出现前一个问题,不能远程访问,呵呵。

经过一天的上网搜索,发现了一些好的东西。看来internet还真是个好东西。

问题的解决:

问题最终出在hosts文件上。我个人认为应该是ase利用fedora的hosts文件时,ase的不完美的地方
(因为其它的软件没有出现此类问题。呵呵,个人愚见)
fedora4的hosts文件中有一行:
127.0.0.1 localhost hostname
按照ase的说法,这种写法是incorrect
应该是分为两行:
127.0.0.1 localhost
***.***.***.*** hostname
这里是ip地址对应hostname

这样,前面的问题就解决了。呵呵,就这么简单
还有其它的解决办法。下面是我找到的解决办法的原文:
Can't connect to server from different host You've installed Sybase on your linux machine, and you're certain that it's running. You can ping the host where Sybase is running from other hosts on your net, but you can't connect to the database server itself.
Chances are you are on a Red Hat 6.x system, where the standard installation creates an incorrect /etc/hosts file with the hostname as an alias on the localhost line, instead of on a line by itself. You can use netstat -a -n | grep <sybase port> (where sybase port is the port that Sybase is listening on) to verify that Sybase is listening to the correct IP address.

Check your /etc/hosts file - if it looks like this:

127.0.0.1 localhost my_host

then you have a problem - change your /etc/hosts file to look like this instead:
127.0.0.1 localhost
192.168.0.1 my_host

(obviously you need to use the correct IP address for your host, and the correct host name!)
This should fix the problem.

An alternative solution is to change the hosts: entry in /etc/nsswitch.conf so that DNS or NIS is used before /etc/hosts for hostname lookups. By default /etc/nsswitch.conf has the following:

hosts: files nisplus dns
If you change that to something like
hosts: nisplus dns files
host name lookups should only access /etc/hosts if the information isn't available anywhere else, and therefore give the correct IP address for the hostname.

————————————————————————————————————
——— 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
——— 转载务必注明原始出处 : http://www.dbainfo.net
——— 关键字: ASE 15.0.3 启动 端口 hosts
————————————————————————————————————