免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3277 | 回复: 9
打印 上一主题 下一主题

[FTP] proftpd启动时的错误提示? 已经可以运行,但是困惑中 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-08 22:28 |只看该作者 |倒序浏览
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 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-05-08 23:50 |只看该作者
参考http://bbs.chinaunix.net/viewthread.php?tid=660212
问题已经解决
但紧接着又出现
Starting proftpd.
- getaddrinfo 'gate.zg-net.net' error: Non-recoverable failure in name resolution
这样的错误提示,
请各位大虾指点

论坛徽章:
0
3 [报告]
发表于 2006-05-09 08:57 |只看该作者
你的/etc/host里面是什么内容?好像是proftp没找到'gate.zg-net.net' 这个名字

论坛徽章:
0
4 [报告]
发表于 2006-05-09 09:44 |只看该作者
要不关掉name解析试试
在proftpd.conf里设置
UseReverseDNS off

参考 http://www.castaglia.org/proftpd ... mini-HOWTO-DNS.html

论坛徽章:
0
5 [报告]
发表于 2006-05-09 22:12 |只看该作者
我的/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 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2006-05-09 22:17 |只看该作者
我按照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 proftpdb@localhost 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 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2006-05-10 09:43 |只看该作者
试试在proftpd.conf里加入
DefaultAddress 61.139.104.229

论坛徽章:
0
8 [报告]
发表于 2006-05-10 16:55 |只看该作者
郁闷了,

我再重装了一次系统,还是不行

楼上的方法也试过了,就是不行

真的很郁闷啊

论坛徽章:
0
9 [报告]
发表于 2006-05-10 23:15 |只看该作者
啊哈,可以了!!!!!
将/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 编辑 ]

论坛徽章:
0
10 [报告]
发表于 2009-10-21 20:58 |只看该作者
这个是个严重问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP