host

No network on host machine when running a Docker container

∥☆過路亽.° 提交于 2020-01-14 04:04:40
问题 I'm on Arch Linux machine, and have no network on the host when running a container with this command: docker run jenkins After stopping the Docker the network is back again. Any suggestions are more than welcome. Edit: It seems that when running with -p option and providing some other port than 80, the network is available for a few minutes, and then it gets lost again. **> docker version** Client: Version: 1.9.1 API version: 1.21 Go version: go1.5.1 Git commit: a34a1d5-dirty Built: Sun Nov

No network on host machine when running a Docker container

本小妞迷上赌 提交于 2020-01-14 04:03:33
问题 I'm on Arch Linux machine, and have no network on the host when running a container with this command: docker run jenkins After stopping the Docker the network is back again. Any suggestions are more than welcome. Edit: It seems that when running with -p option and providing some other port than 80, the network is available for a few minutes, and then it gets lost again. **> docker version** Client: Version: 1.9.1 API version: 1.21 Go version: go1.5.1 Git commit: a34a1d5-dirty Built: Sun Nov

PyCharm安装与配置,python的Hello World

久未见 提交于 2020-01-14 04:02:26
1. 访问 https://www.jetbrains.com/zh/pycharm/download/download-thanks.html, 下载pycharm 安 装包,点击安装. 2. 用记事本打开hosts文件,Windows系统hosts文件路径为:c:\windows\system32\drivers\etc,将0.0.0.0 account.jetbrains.com添加到hosts文件最后 3.打开Pycharm,进入激活界面,选择activation code,填入下面注册码 EB101IWSWD

Nginx 提示host not found in upstream 错误解决方法

好久不见. 提交于 2020-01-14 02:24:54
Nginx DNS resolver配置实例,本文讲解在proxy_pass 和 upstream server 通信的时候需要手动指定 resolver,本文就给出了配置实例. nginx 通过 proxy_pass 和 upstream server 通信的时候需要手动指定 resolver。某些时候 DNS 解析失败就会出现这个错误: domain.com could not be resolved. 可以指定多个 DNS 并重置域名 TTL 延长 nginx 解析缓存来保障解析成功率: resolver 223.5.5.5 223.6.6.6 1.2.4.8 114.114.114.114 valid=3600s; 如果还有解析错误,可以用 dnsmasq 在本地自建 DNS,顺带还有加速解析的好处: #/etc/dnsmasq.conf domain-needed bogus-priv cache-size=51200 listen-address=127.0.0.1 #server=223.5.5.5 resolv-file=/etc/resolv.conf 另外需要注意的是 proxy_pass 并不是每次请求都会进行解析,如果 upstream IP 频繁变动,需要强制解析: # via http://forum.nginx.org/read.php?2

解决Couldn't resolve host 'mirrorlist.centos.org

烂漫一生 提交于 2020-01-14 01:23:22
这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通。或者/etc/resolv.conf的DNS配置出错。或者可以考虑清楚yum缓存影响(yum clean all) vi /etc/resolv.conf nameserver 202.106.0.20(今天又出现此错误,这个nameserver加进去就好了。记得配置静态ip的话DNS也需要加入 然后update yum试试成功就OK了) (下面是网上找到比较有用资料) 今天在linux环境通过yum安装软件报了以下错误: [root@multi-mysql yum.repos.d] # yum install ncurses devel -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http: //mirrorlist .centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist

Pika 连接 rabbitmq 集群

余生颓废 提交于 2020-01-14 00:27:00
使用 Pika 连接 rabbitmq 集群 使用 python 编程经常会用到 pika 来向 rabbitmq 发送消息,单个 rabbitmq 节点连接比较简单,本文介绍使用 rabbitmq 集群情况下的连接方式。 vip 连接方式 在 client 与 rabbitmq server 之间通过 haproxy 等负载均衡来提供 vip,我使用的环境就是采用这种方式,但是遇到某一节点挂掉时再访问 vip 连接 rabbitmq 集群会连接失败,常见 log 如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <URLParameters host=10.10.11.1 port=5672 virtual_host=/ ssl=False> DEBUG:pika.adapters.select_connection:Using EPollPoller DEBUG:pika.callback:Added: { 'callback' : <bound method SelectConnection._on_connection_start of <SelectConnection CLOSED socket=None params =<URLParameters host=10.10.11.1 port=5672

python pip报错:Could not fetch URL...

谁说胖子不能爱 提交于 2020-01-13 19:19:27
python pip报错:Could not fetch URL... 这里使用的是python3.7。安装redis时报错如下: 这时可以考虑用国内的镜像源来加速,方式如下: pip install redis - i http : / / pypi . douban . com / simple / -- trusted - host pypi . douban . com 或者 pip3 install redis - i http : / / pypi . douban . com / simple / -- trusted - host pypi . douban . com 其中redis是要替换的库名 结果: 来源: CSDN 作者: 树上灵溪 链接: https://blog.csdn.net/yezuofenglin/article/details/103962410

访问局域网vue项目

陌路散爱 提交于 2020-01-13 18:12:21
此方法适用于npm run dev方式启动的本地 vue 工程 打开项目根目录的 package.json,然后找到scripts,如果你是希望在 npm run dev 的时候 内网可以方访问,那么你再 scripts下的dev 结尾增加一个参数 --host 192.168.0.0,就可以了。 替换本机ip "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.0",    来源: https://www.cnblogs.com/youji8/p/12188373.html

微人事第二天:使用yml方式进行属性注入

心不动则不痛 提交于 2020-01-13 17:07:53
之前说了使用properties的方式进行属性注入,这次看看yml是否能完成同样的功能 yml和properties的区别: 1.yml是有序的,properties是无序的 2.自定义的yml,目前暂时不支持使用注解直接注入到Spring Boot项目中 1.首先配置实体类RedisCluster package org.javaboy.yaml; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import java.util.List; @Component @ConfigurationProperties("redis") public class RedisCluster { private Integer port; private List<String> hosts; private List<Redis> redisList; public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port; } public List<String>

Tomcat线程模型分析及源码解读

拥有回忆 提交于 2020-01-13 16:09:52
1 四种线程模型 配置方法:在tomcat conf 下找到server.xml,在<Connector port="8080" protocol="HTTP/1.1"/> BIO: protocol =" org.apache.coyote.http11.Http11Protocol" NIO: protocol ="org.apache.coyote.http11.Http11NioProtocol" AIO: protocol ="org.apache.coyote.http11.Http11Nio2Protocol" APR: protocol ="org.apache.coyote.http11.Http11AprProtocol" 2 Connector 结构 3 三种请求接受方式 Tomcat支持三种接收请求的处理方式:BIO、NIO、APR 1.BIO模式 阻塞式I/O操作,表示Tomcat使用的是传统Java I/O操作(即Java.io包及其子包)。Tomcat7以下版本默认情况下是以bio模式运行的,由于每个请求都要创建一个线程来处理,线程开销较大,不能处理高并发的场景,在三种模式中性能也最低。 启动tomcat看到如下日志,表示使用的是BIO模式: 2.NIO模式 是java SE 1.4及后续版本提供的一种新的I/O操作方式(即java.nio包及其子包)