linux Enterprise5.4下啟動sybase時不能分配端口的問題解決
2024-07-21 02:45:07
供稿:網友
在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都沒問題。就是會出現前一個問題,不能遠程訪問,呵呵。
經過一天的上網搜索,發現了一些好的東西??磥韎nternet還真是個好東西。
問題的解決:
問題最終出在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 hostYou'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.
本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/andkylee/archive/2009/12/21/5046192.aspx