歡迎您光臨本站 註冊首頁

proftpd啟動時的錯誤提示? 已經可以運行,但是困惑中

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

proftpd啟動時的錯誤提示? 已經可以運行,但是困惑中

BSD60下PORTS安裝proftpd-mysql
啟動時出現
Starting proftpd.
- getaddrinfo 'gate.zg-net.net' error: hostname nor servname provided, or not known

我的RC.FIREWALL開放了21,22,25,80,110,443埠

請問怎麼解決

[ 本帖最後由 mao1001 於 2006-5-10 23:16 編輯 ]
《解決方案》

參考http://bbs.chinaunix.net/viewthread.php?tid=660212
問題已經解決
但緊接著又出現
Starting proftpd.
- getaddrinfo 'gate.zg-net.net' error: Non-recoverable failure in name resolution
這樣的錯誤提示,
請各位大蝦指點
《解決方案》

你的/etc/host裡面是什麼內容?好像是proftp沒找到'gate.zg-net.net' 這個名字
《解決方案》

要不關掉name解析試試
在proftpd.conf里設置
UseReverseDNS off

參考 http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-DNS.html
《解決方案》

我的/etc/hosts的內容
127.0.0.1               localhost.zg-net.net localhost
61.139.104.229          gate.zg-net.net gate
192.168.0.251           gate.zg-net.net gate


# pw groupadd ftpgrp -g 2001
# pw adduser ftpusr -u 2001 -g 2001 -d /vhost -s /sbin/nologin

# pw groupadd ftp
# pw useradd ftp -g ftp -d /ftp -s /sbin/nologin

# ftp 61.139.104.229
Connected to 61.139.104.229.
421 Service not available, remote server has closed connection.

我現在都把rc.firewall設置成了OPEN了

[ 本帖最後由 mao1001 於 2006-5-9 22:20 編輯 ]
《解決方案》

我按照3樓的提示做了,又出現
Starting proftpd.
- getaddrinfo 'gate.zg-net.net' error: hostname nor servname provided, or not known

順便我把proftpd.conf也貼上來,大家幫幫忙
ServerName "61.139.104.229"
ServerType standalone
DefaultServer on
# 用戶登陸時不顯示ftp伺服器版本信息
ServerIdent off
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
MaxLoginAttempts 3
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900
TimeoutStalled 3600
MaxClients 100
# 設置每台主機最多併發連接數
MaxClientsPerHost 3
AllowOverwrite no
AllowStoreRestart on
UseReverseDNS off
# 設置如果shell為空時允許用戶登錄
RequireValidShell off
# 將用戶限制在自己的主目錄下
DefaultRoot ~
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30
# Set the user and group under which the server will run.
User ftpusr
Group ftpgrp
# Normally, we want files to be overwriteable.
<Directory />
AllowOverwrite on
</Directory>
# A basic anonymous configuration, no upload directories.
# 匿名登錄設置。匿名用戶目錄為/ftp
<Anonymous /ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
MaxClients 10
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
#<Limit WRITE>
# DenyAll
#</Limit>
</Anonymous>
# 資料庫聯接的信息,proftpdb是資料庫名,localhost是主機名,proftpd是連接資料庫的用戶名,
SQLConnectInfo [email protected] proftp proftp
# 資料庫認證的類型
SQLAuthTypes Backend Plaintext
# 資料庫的鑒別
SQLAuthenticate users* groups*
# 指定用來做用戶認證的表的有關信息。
SQLUserInfo ftpuser userid passwd uid gid homedir shell
SQLGroupInfo ftpgroup groupname gid members
# 如果home目錄不存在,則系統會根據它的home項新建一個目錄
SQLHomedirOnDemand on
#這是目錄所有者,我覺得這個很重要。所以我用nobody來做,在此我的nobody為99.
SQLDefaultGID        2001
SQLDefaultUID        2001
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1,accessed=now() WHERE userid='%u'" ftpuser
# Update modified everytime user uploads or deletes a file
SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser
# 啟用磁碟限額
QuotaDirectoryTally on
# 磁碟限額單位 b"|"Kb"|"Mb"|"Gb"
QuotaDisplayUnits "Mb"
QuotaEngine on
# 磁碟限額日誌記錄
QuotaLog "/var/log/quota.log"
# 打開磁碟限額信息,當登陸FTP帳戶后,使用命令 "quote SITE QUOTA" 后可顯示當前用#戶的磁碟限額
QuotaShowQuotas on
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail,bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}'AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

[ 本帖最後由 mao1001 於 2006-5-9 22:21 編輯 ]
《解決方案》

試試在proftpd.conf里加入
DefaultAddress 61.139.104.229
《解決方案》

鬱悶了,

我再重裝了一次系統,還是不行

樓上的方法也試過了,就是不行

真的很鬱悶啊
《解決方案》

啊哈,可以了!!!!!
將/usr/local/etc/proftpd.conf裡面的
UseReverseDNS off修改成#UseReverseDNS off
就可以了

但是原因還是不清楚,有待指點

而且還是要報

getaddrinfo 'gate.zg-net.net' error: hostname nor servname provided, or not known

這樣的錯誤提示

[ 本帖最後由 mao1001 於 2006-5-10 23:22 編輯 ]
《解決方案》

這個是個嚴重問題:em03:

[火星人 ] proftpd啟動時的錯誤提示? 已經可以運行,但是困惑中已經有678次圍觀

http://coctec.com/docs/service/show-post-20255.html