由于某些原因(我还无法确定),昨天上午,我们网络服务器上的网络服务(运行Ubuntu8.04.2LTS- hardy)无法启动,我们的网站也瘫痪了。
在试图重新启动它时,我注意到了以下错误消息:
* Reconfiguring network interfaces...
/etc/network/interfaces:6: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"
...fail!/etc/network/interfaces文件中的第6行涉及一个MODPROBE命令,它(我相信)加载在ip_conntrack_ftp模块中,这样我就可以在FTP服务器(Vsftpd)上使用PASV:(断开下面注释掉的modprobe命令)
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# The loopback network interface
auto lo
iface lo inet loopback
#MODPROBE=/sbin/modprobe
#$MODPROBE ip_conntrack_ftp
pre-up iptables-restore < /etc/iptables.up.rules
# The primary network interface
# Uncomment this and configure after the system has booted for the first time
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
gateway xxx.xxx.xxx.1
dns-nameservers xxx.xxx.xxx.4 xxx.xxx.xxx.5我已经验证了/sbin中有一个名为modprobe的文件。
就像我前面说的,直到昨天早上,这个设置才完美无缺(尽管我的老板说,网站实际上是在前一天晚上11点美国东部时间)。
有人能说明一下(A)为什么会出现故障吗?(B)我如何重新启用ip_conntrack_ftp模块?
发布于 2011-12-12 21:27:53
有人能说明一下为什么这个坏了吗,
我认为您不能只从/etc/networking/interfaces执行you探测。您可能需要使用pre-up指令:
来自接口(5)手册:
pre-up command Run command before bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface as configured, prints an error message, and exits with status 0. This behavior may change in the future.
但是,最好将模块的名称添加到/etc/modules中,以便在启动时加载。(请注意,如果命令pre-up命令无法执行您的接口-即使配置的其余部分非常好)。
来自单元(5)手册:
The /etc/modules file contains the names of kernel modules that are to be loaded at boot time, one per line. Arguments can be given in the same line as the module name. Lines beginning with a ’#’ are ignored.
发布于 2010-09-10 18:48:07
您可以通过将其名称添加到/etc/模块来重新启用该模块。
发布于 2011-11-12 11:36:39
尝试运行命令:
modprobe探针ip_conntrack_ftp
如果它工作正常,这意味着模块正在加载良好。然后,不要每次重新启动接口时都添加模块,而是将上面的命令添加到/etc/rc.local
然后,模块将始终加载到系统中。(相反,它试图在网络服务启动时加载自己)
另外,为了进行测试,您可以在注释为"MODPROBE“的两行的位置添加此命令”/sbin/mod探针ip_conntrack_ftp“,然后尝试它是否有效。
https://serverfault.com/questions/126320
复制相似问题