host

20200311_解决Could not resolve host: mirrorlist.centos.org

戏子无情 提交于 2020-03-11 09:14:38
[root@localhost ~]# yum -y install wget 已加载插件:fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" --看起来这个错误报的很明显了 One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the

tcpdump抓包问题

岁酱吖の 提交于 2020-03-11 02:44:50
使用tcpdump抓取某个IP地址的包来分析TCPIP协议的握手过程, sudo tcpdump i 7 "tcp[tcpflags] != 0 and host 127.0.0.1" -c 3 也就是前三个包,发现TCP的Flags的标记位为Flags[.],这个Flags[.]中的点就代表ACK标记为1. 来源: CSDN 作者: GJQI12 链接: https://blog.csdn.net/GJQI12/article/details/104747682

HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

狂风中的少年 提交于 2020-03-10 21:50:14
  今天用pip安装第三方库时总报超时,可能是网络不稳定地原因。          解决方法:将超时时间延长,重新下载。   命令:1.pip --default-timeout=100 install -U pip      2.pip --default-timeout=100 install -U +第三方库名        如:pip --default-timeout=100 install -U echarts-china-cities-pypkg    来源: https://www.cnblogs.com/qilin20/p/12348103.html

TCP Flag Options - Section 4

▼魔方 西西 提交于 2020-03-10 13:13:04
TCP Flag Options - Section 4 https://packetlife.net/blog/2011/mar/2/tcp-flags-psh-and-urg/ http://www.tcpipguide.com/free/t_TCPSlidingWindowAcknowledgmentSystemForDataTranspo.htm As we have seen in the previous pages, some TCP segments carry data while others are simple acknowledgements for previously received data. The popular 3-way handshake utilises the SYNs and ACKs available in the TCP to help complete the connection before data is transferred. Our conclusion is that each TCP segment has a purpose, and this is determined with the help of the TCP flag options, allowing the sender or

python操作多台服务器

前提是你 提交于 2020-03-10 11:56:01
"""主代码 "" import settings import paramiko import threading class wang(object): def __init__(self, host, port, username, password, cmd): self.host = host self.port = port self.username = username self.password = password self.cmd = cmd def commad(self): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname=self.host, port=self.port, username=self.username, password=self.password) stdin, stdout, stderr = ssh.exec_command(self.cmd) res, err = stdout.read(), stderr.read() result = res if res else err print(result.decode()) ssh.close() def show

zabbix 监控 tomcat

こ雲淡風輕ζ 提交于 2020-03-10 11:52:55
zabbix提供了一个java gateway的应用去监控jmx(Java Management Extensions,即Java管理扩展)是一个为应用程序、设备、系统等植入管理功能的框架。JMX可以跨越一系列异构操作系统平台、系统体系结构和网络传输协议,灵活的开发无缝集成的系统、网络和服务管理应用。 服务端配置 zabbix server安装java gateway [root@zabbix ~]# yum install -y java java-devel zabbix-java-gateway [root@zabbix ~]# java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode) [root@zabbix ~]# service zabbix-java-gateway status Redirecting to /bin/systemctl status zabbix-java-gateway.service ● zabbix-java-gateway.service - Zabbix Java Gateway Loaded:

nginx-vts + prometheus 监控nginx

这一生的挚爱 提交于 2020-03-10 11:36:51
nginx是我们常用反向代理软件,它的监控对于我们来说十分重要,今天介绍一些怎样利用nginx-vts模块和prometheus来实现对nginx的详细监控。 在使用vts之前,我们想要获取nginx 状态码统计,访问量,响应时间等都是通过es分析nginx访问日志得到的,受限于公司es集群的规模,我们没办法做时间跨度过大的统计。后来调研vts模块,发现我们这个模块可以完全满足我们的需求,并且查询速度非常快,查询半年数据也能很快展示出来(我们prometheus只保留半年数据) 安装 1、下载模块 https://github.com/vozlt/nginx-module-vts/releases 2、编译 编译参数添加--add-module=/path/to/nginx-module-vts 然后编译 3、替换现有bin文件 4、reload nginx 通过 nginx -V 来查看模块是否添加成功 ###配置 1、配置状态访问接口 在default server里添加状态查看location,并做好相关访问限制 location /status{ allow 127.0.0.1; deny all; vhost_traffic_status_display; vhost_traffic_status_display_format html; } 2、开启vts统计

Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpa

让人想犯罪 __ 提交于 2020-03-10 07:45:33
ASK [ Gathering Facts ] ********************************************************* fatal: [ 10.22.60.204 ] : FAILED ! = > { "msg" : "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host." } to retry, use: --limit @/data/ansible/workspace/AFFIN_ICORE/DIT/ICORE_CBS2/DEPLOY/sys_role.retry PLAY RECAP ********************************************************************* 10.22.60.204 : ok = 0 changed = 0 unreachable = 0 failed = 1 解决方案 在ansible所在主机

Docker学习笔记2

纵然是瞬间 提交于 2020-03-09 19:10:48
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。 官网: https://www.docker.com/ 相关资料: 1、Docker入门教程 http://dockone.io/article/111 2、Docker_百度百科 http://baike.baidu.com/view/11854949.htm 3、史上最全Docker资料集粹 http://special.csdncms.csdn.net/BeDocker/ 4、Docker - 话题精华 - 知乎 http://www.zhihu.com/topic/19950993/top-answers 5、docker 简明教程 | 简果网 http://www.simapple.com/docker-tutorial Docker与虚拟机比较 作为一种轻量级的虚拟化方式,Docker在运行应用上跟传统的虚拟机方式相比具有显著优势: Docker容器很快,启动和停止可以在秒级实现,这相比传统的虚拟机方式要快得多。 Docker容器对系统资源需求很少,一台主机上可以同时运行数千个Docker容器。 Docker通过类似Git的操作来方便用户获取、分发和更新应用镜像

docker里的centos 安装sshd服务

[亡魂溺海] 提交于 2020-03-09 17:31:44
docker里的centos 安装sshd服务 sa 发布于 2018-01-12 分类: 未分类 阅读(3405) 评论(0) 1、 yum install openssh - server 2、启动sshd 报错 需要绝对路径 [root@0463226081ca src]# sshd sshd re-exec requires execution with an absolute path 3、用绝对路径 再次报错 [root@0463226081ca src]# /usr/sbin/sshd Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key sshd: no hostkeys available -- exiting. 4、执行 少什么生成什么key ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key 5、再次执行 成功 [root@0463226081ca src]#