处理ftp服务器 在重启后ftp客户端不能连接访问的问题
1:环境:centos7
2:当在重启centos7 linux服务器后,再连接ftp客户端不能链接
此时需要检查以下几点:
2-1:核查ftp服务是否启动正常:
[root@localhost ~]# service vsftpd status
Redirecting to /bin/systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2017-08-25 09:20:59 CST; 30s ago
Process: 4517 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
Main PID: 4520 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─4520 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf Aug 25 09:20:59 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...
Aug 25 09:20:59 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.
如果是ftp服务没有启动起来:则需要执行启动命令
service vsftpd restart
或者是设置ftp服务开机自动启动;如何设置请参考《CentOS7 搭建FTP服务器》的“七:解决 linux系统重启后 用ftp工具无法访问的问题”的内容
2-2:核查firewall防火墙是否启动正常:
[root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2017-08-25 09:00:20 CST; 25min ago
Docs: man:firewalld(1)
Main PID: 803 (firewalld)
CGroup: /system.slice/firewalld.service
└─803 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid Aug 25 09:00:13 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 25 09:00:20 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
如果是firewall 服务没有启动起来,则需要手动启动
[root@localhost ~]# systemctl restart firewalld.service
#并核查下 启动的端口情况
[root@localhost ~]# firewall-cmd --zone=public --list-ports
80/tcp 8080/tcp
#如果没有自己想要的端口,则添加端口,然后在重启firewall
[root@localhost ~]# firewall-cmd --zone=public --add-port=21/tcp --permanent
success
[root@localhost ~]# systemctl restart firewalld.service
[root@localhost ~]# firewall-cmd --zone=public --list-ports
21/tcp 80/tcp 8080/tcp
2-3:核查iptables 的状态是否启动正常。
[root@localhost ~]# service iptables status
Redirecting to /bin/systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: inactive (dead)
[root@localhost ~]#
如果 没有正常启动,则需要手动启动该服务。
[root@localhost ~]# service iptables restart
设置正常开机启动该服务:
[root@localhost ~]# cd /etc/rc.d
[root@localhost rc.d]# ls
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rc.local
[root@localhost rc.d]# cat rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot. touch /var/lock/subsys/local /etc/init.d/nginx start
[root@localhost rc.d]# vi rc.local
在rc.loal 文件中添加 service iptables restart 确定命令
以下是 红色标注的内容是 添加的启动iptables服务的内容
[root@localhost ~]# cd /etc/rc.d/
[root@localhost rc.d]# ls
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rc.local
[root@localhost rc.d]# cat rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot. touch /var/lock/subsys/local #开机默认启动nginx服务
/etc/init.d/nginx start
#开机重启 ip 防火墙
service iptables restart
[root@localhost rc.d]#
如果以上3个服务都启动正常,则ftp客户端连接应该是正常的。若还有问题,则需要仔细核查
处理ftp服务器 在重启后ftp客户端不能连接访问的问题的更多相关文章
- 【转】Linux环境搭建FTP服务器与Python实现FTP客户端的交互介绍
Linux环境搭建FTP服务器与Python实现FTP客户端的交互介绍 FTP 是File Transfer Protocol(文件传输协议)的英文简称,它基于传输层协议TCP建立,用于Interne ...
- 在虚拟机上安装redis集群,redis使用版本为4.0.5,本机通过命令客户端可以连接访问,外部主机一直访问不了
在虚拟机上安装了redis 4 ,启动后本机客户端可以连接访问,但是外部主机一直访问不了,在使用java代码连接redis集群时报:no reachable node in cluster,原因:在r ...
- 映射内网ftp服务器到公网后内网访问出错问题
上文说道映射后外网无法访问解决:https://www.cnblogs.com/Dev0ps/p/9073048.html 添加了ftp的pasv_address的地址 ,内网客户端要设置主动模式(a ...
- ftp服务器终端登录后乱码处理方法
首先在windows上用资源管理器登录看看会不会乱码,如果不会,说明是GBK编码 因为windows默认是GBK(936),linux默认(UTF-8) 因为FTP服务器我们修改不了,如果用linux ...
- Linux上的ftp服务器vsftpd之配置满天飞--设置匿名用户访问(不弹出用户名密码框)以及其他用户可正常上传
一.问题背景 没事谁折腾这鬼玩意哦...还不是因为bug. 我们的应用,用户头像是存在ftp上的.之前的ftp服务器是一台windows,我们后台服务器程序收到用户上传头像的请求时,会用一个ROOT/ ...
- 服务器部署网站后,公网ip可以访问,域名不能访问问题(稳)
出现问题 这几天我网站已经部署到vps上,域名也备好案,想使用域名指向我们公网ip.指完发现用域名访问不了网站,但是公网ip可以.于是看了网上资料,好像是要清除浏览器DNS缓存,我清完没用.然后发现我 ...
- Redis Cluster集群搭建后,客户端的连接研究(Spring/Jedis)(待实践)
说明:无论是否已经搭建好集群,还是使用什么样的客户端去连接,都是必须把全部IP列表集成进去,然后随机往其中一个IP写. 这样做的好处: 1.随机IP写入之后,Redis Cluster代理层会自动根据 ...
- 【大话QT之十】实现FTP断点续传(需要设置ftp服务器为“PASV”被动接收方式)
应用需求: 网盘开发工作逐步进入各部分的整合阶段,当用户在客户端修改或新增加一个文件时,该文件要同步上传到服务器端对应的用户目录下,因此针对数据传输(即:上传.下载)这一块现在既定了三种传输方式,即: ...
- 外网访问内网的FTP服务器
转自 外网访问内网的FTP服务器 首先感谢作者给出的总结,原文是介绍Serv-U的,我针对FileZilla Server进行了稍微修改,仅看操作可直接跳到分割线后第3部分. 1. 背景简介最近研究如 ...
随机推荐
- MySQL相关信息之数据库操作(三)
1.创建数据库 CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] DB_NAME [DEFAULT] CHARACTER SET [=] charset ...
- Linux静默安装matlab
对linux系统不是很熟,所有装起来有点费劲.来来回回折腾了二三天,查了很多攻略,但按照步骤老是报错,大体上各人设备不同.系统不同.环境设置不同,总是会多多少少略有差异. 一 基本配置 linux系统 ...
- [C++]PAT乙级1001.害死人不偿命的(3n+1)猜想(15/15)
/* 1001.害死人不偿命的(3n+1)猜想 (15) 卡拉兹(Callatz)猜想: 对任何一个自然数n,如果它是偶数,那么把它砍掉一半:如果它是奇数,那么把(3n+1)砍掉一半.这样一直反复砍下 ...
- python中的Process
from multiprocessing import Process import time import os # # def acb(n): # print(n) # # # if __name ...
- javaweb简单的实现文件上传
java代码: // @RequestMapping(value = "/upload.do", method = RequestMethod.POST) @RequestMapp ...
- 分页插件通用处理,以asp.net mvc为例
Model: public class PaggerModel { public PaggerModel() { BarSize = ; } public PaggerModel(int total, ...
- kotlin中“==”和“===”的区别
code 1 fun main(args: Array<String>) { val a : Int = 1000 println(a == a) //true println(a === ...
- 新语法11. – LINQ
LINQ分组: IEnumerable<IGrouping< group dog by dog.Age; 遍历分组: foreach (IGrouping<int, Dog> ...
- linux系统 之 curl命令
1,curl命令 在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可以说是一款很强大的http命令行工具.它支持文件的上传和下载,是综合传输工具,但按传统,习惯称url为下载工 ...
- shellb编程 之 实践出真知
1.查询file1 里面空行的所在行号 纯空行:awk ‘{if($0~/^$/)print NR}’ file 空行和带空格,制表符等的行:awk '$0~/^\s*$/' file 2.查询fil ...