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客户端不能连接访问的问题的更多相关文章

  1. 【转】Linux环境搭建FTP服务器与Python实现FTP客户端的交互介绍

    Linux环境搭建FTP服务器与Python实现FTP客户端的交互介绍 FTP 是File Transfer Protocol(文件传输协议)的英文简称,它基于传输层协议TCP建立,用于Interne ...

  2. 在虚拟机上安装redis集群,redis使用版本为4.0.5,本机通过命令客户端可以连接访问,外部主机一直访问不了

    在虚拟机上安装了redis 4 ,启动后本机客户端可以连接访问,但是外部主机一直访问不了,在使用java代码连接redis集群时报:no reachable node in cluster,原因:在r ...

  3. 映射内网ftp服务器到公网后内网访问出错问题

    上文说道映射后外网无法访问解决:https://www.cnblogs.com/Dev0ps/p/9073048.html 添加了ftp的pasv_address的地址 ,内网客户端要设置主动模式(a ...

  4. ftp服务器终端登录后乱码处理方法

    首先在windows上用资源管理器登录看看会不会乱码,如果不会,说明是GBK编码 因为windows默认是GBK(936),linux默认(UTF-8) 因为FTP服务器我们修改不了,如果用linux ...

  5. Linux上的ftp服务器vsftpd之配置满天飞--设置匿名用户访问(不弹出用户名密码框)以及其他用户可正常上传

    一.问题背景 没事谁折腾这鬼玩意哦...还不是因为bug. 我们的应用,用户头像是存在ftp上的.之前的ftp服务器是一台windows,我们后台服务器程序收到用户上传头像的请求时,会用一个ROOT/ ...

  6. 服务器部署网站后,公网ip可以访问,域名不能访问问题(稳)

    出现问题 这几天我网站已经部署到vps上,域名也备好案,想使用域名指向我们公网ip.指完发现用域名访问不了网站,但是公网ip可以.于是看了网上资料,好像是要清除浏览器DNS缓存,我清完没用.然后发现我 ...

  7. Redis Cluster集群搭建后,客户端的连接研究(Spring/Jedis)(待实践)

    说明:无论是否已经搭建好集群,还是使用什么样的客户端去连接,都是必须把全部IP列表集成进去,然后随机往其中一个IP写. 这样做的好处: 1.随机IP写入之后,Redis Cluster代理层会自动根据 ...

  8. 【大话QT之十】实现FTP断点续传(需要设置ftp服务器为“PASV”被动接收方式)

    应用需求: 网盘开发工作逐步进入各部分的整合阶段,当用户在客户端修改或新增加一个文件时,该文件要同步上传到服务器端对应的用户目录下,因此针对数据传输(即:上传.下载)这一块现在既定了三种传输方式,即: ...

  9. 外网访问内网的FTP服务器

    转自 外网访问内网的FTP服务器 首先感谢作者给出的总结,原文是介绍Serv-U的,我针对FileZilla Server进行了稍微修改,仅看操作可直接跳到分割线后第3部分. 1. 背景简介最近研究如 ...

随机推荐

  1. python后端从数据库请求数据给到前端的具体实现

    先来贴一窜代码让大家理解前端/后端/数据库的工作原理, 首先简要说明:前端向后端请求数据,后端根据前端请求数据的类别分析其需求,并连接到数据库获取相应数据: 来一段简单的实例代码模拟淘宝商城: 前端代 ...

  2. Java之@SuppressWarnings

    用了这个,MyEclipse里就不会报那些警告了,看起来漂亮多了 常用的:@SuppressWarnings("unchecked"),泛型@SuppressWarnings(&q ...

  3. mysql存储过程及拼接字符串的用法

    DROP PROCEDURE IF EXISTS insert_historytable;DELIMITER //CREATE PROCEDURE insert_historytable()BEGIN ...

  4. 页面跳转、底部tabs切换页面

    1.页面跳转 import { NavController } from 'ionic-angular'; constructor(public navCtrl: NavController) { } ...

  5. tidb调研

    TiDB是新一代开源分布式 NewSQL 数据库,相比较于我们常见的数据库MySQL,TiDB具有水平伸缩.强一致性的分布式事务.基于 Raft 算法的多副本复制等特性.同时,TiDB兼容MySQL生 ...

  6. bzoj3262: 陌上花开(CDQ+树状数组处理三维偏序问题)

    题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3262 题目大意:中文题目 具体思路:CDQ可以处理的问题,一共有三维空间,对于第一维我们 ...

  7. Centos7 nginx提示错误 Access denied.

    SELinux will cause this error on CentOS/RHEL 7+ by default :( CentOS/RHEL 7+ 系统默认会因为SELinux出现这个报错 To ...

  8. ClassNotFoundException和NoClassDeFoundError

    ClassNotFoundException:反射时(类加载时)类名写错了(属于可捕获的异常) NoClassDeFoundError:编译时依赖的类(jar包)在运行环境机器中不存在(属于无法处理的 ...

  9. 百度统计api 关于搜索引擎返回参数问题

    当 post 的参数: 返回参数为: 很显然没有搜索引擎的相关名称返回,无法分辨相关引擎的数据量: 改:去掉 gran 参数 正常: 关于百度统计文档有很多模糊不清的地方,可以发邮件给官方了解,一般处 ...

  10. Intel Xeon E5-2620 v4参数

    基本参数 CPU系列 Xeon E5 v4系列 制作工艺 14纳米 核心代号 Broadwell 性能参数 核心数量 八核心 线程数量 十六线程 CPU主频 2.1GHz 动态加速频率 3GHz L3 ...