linux Enterprise5.4下啟動(dòng)sybase時(shí)不能分配端口的問題解決
2024-07-21 02:45:07
供稿:網(wǎng)友
在linux企業(yè)版5.4上用兩個(gè)不同的賬號(hào)建立了兩個(gè)sybase數(shù)據(jù)庫服務(wù)器。
15.0.3版本的服務(wù)器能夠正常啟動(dòng),12.5.4版本的sybase數(shù)據(jù)庫啟動(dòng)時(shí)提示:
cannot allocate resources for listener PRotocol tcp ,host xxx.xxx.xxx.xxx ,port 5000,engine 0.
cannot start any network listeners.
上網(wǎng)查找原因:
將/etc/hosts中原來的
127.0.0.1 localhost.localdomain localhost
改為:
127.0.0.1 localhost
192.168.2.178 localhost.localdomain
問題解決,能夠用端口5000啟動(dòng)數(shù)據(jù)庫服務(wù)器了。
將參考文檔放在這里以備后來使用。
------------------------------------------------------------------------------------------------------------------------------
sybase不能訪問服務(wù)器解決辦法
[ 2009-6-5 12:59:00 | By: 夢(mèng)精靈 ]
不能遠(yuǎn)程訪問fedora平臺(tái)上的ase的問題
問題的提出:
問題一:a機(jī):fedora4+ase15
安裝后沒有修改ase的任何配置(初次使用sybase的東西,全是缺省配置)
b機(jī):win2003+ase125
a機(jī)的sybase central可以連接b機(jī)的ase
b機(jī)不能訪問a機(jī)的ase
a機(jī)的防火墻以及selinux都關(guān)閉了
在a機(jī)telnet b 5000沒問題
在b機(jī)或者a機(jī)本機(jī)上telnet ip 5000:
正在連接到172.20.53.26...不能打開到主機(jī)的連接, 在端口 5000: 連接失敗
但在a機(jī)telnet localhost 5000是可以連接的
問題二:
在interfaces文件中將機(jī)器名改為ip地址后
啟動(dòng)服務(wù)時(shí)出現(xiàn):
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都沒問題。就是會(huì)出現(xiàn)前一個(gè)問題,不能遠(yuǎn)程訪問,呵呵。
經(jīng)過一天的上網(wǎng)搜索,發(fā)現(xiàn)了一些好的東西??磥韎nternet還真是個(gè)好東西。
問題的解決:
問題最終出在hosts文件上。我個(gè)人認(rèn)為應(yīng)該是ase利用fedora的hosts文件時(shí),ase的不完美的地方
(因?yàn)槠渌能浖]有出現(xiàn)此類問題。呵呵,個(gè)人愚見)
fedora4的hosts文件中有一行:
127.0.0.1 localhost hostname
按照ase的說法,這種寫法是incorrect
應(yīng)該是分為兩行:
127.0.0.1 localhost
***.***.***.*** hostname
這里是ip地址對(duì)應(yīng)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博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/andkylee/archive/2009/12/21/5046192.aspx