docker    2017-07-19 21:06:10    805

Docker原错误:

ERROR: rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: not a directory"


分析原因:
应该是本地映射的目录在container中不存在导致的
看到github上有相同的错误:https://github.com/docker/docker/issues/23474

解决办法:
   检查本地映射的目录与container中的目录一致性(或者是否存在)
 
 

 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/

docker consul registrator    2017-07-19 21:01:41    1108

参考文章:http://gliderlabs.com/registrator/latest/user/quickstart/

 

Consul是强一致性的数据存储,使用gossip形成动态集群。它提供分级键/值存储方式,不仅可以存储数据,而且可以用于注册器件事各种任务,从发送数据改变通知到运行健康检查和自定义命令,具体如何取决于它们的输出

Registrator通过检查容器在线或者停止运行状态自动注册和去注册服务,它目前支持etcd、Consul和SkyDNS 2

 

单机运行 consul服务


# docker run -d -p 8400:8400 -p 8500:8500 -p 8600:53/udp --name node4  gliderlabs/consul-server:0.6 -bootstrap -advertise 192.168.10.138

通过http API 查看consul服务

 

# curl 192.168.10.138:8500/v1/catalog/services 

{"consul":[]}

运行 Registrator

# docker run -d  --name=registrator  --net=host  --volume=/var/run/docker.sock:/tmp/docker.sock   gliderlabs/registrator:latest  consul://192.168.10.138:8500

 

Running Redis


# docker run -d -P --name=redis redis

测试Registrator配置是否有效


 
# curl 192.168.10.138:8500/v1/catalog/services 
 
{"consul":[],"redis":[]}


# curl 192.168.10.138:8500/v1/catalog/service/redis

[{"Node":"23dcba46458b","Address":"192.168.10.138","ServiceID":"localhost.localdomain:redis:6379","ServiceName":"redis","ServiceTags":[],"ServiceAddress":"","Servi
OpenVPN 网络 VPN    2017-07-19 20:59:48    5613

经过尝试,使用server的push命令,windows常常报错,比较无奈,配置如下
push "route 192.168.100.0 255.255.255.0 10.8.10.254"


Thu Jan 28 11:52:39 2016 NOTE: --user option is not implemented on Windows
Thu Jan 28 11:52:39 2016 NOTE: --group option is not implemented on Windows
Thu Jan 28 11:52:39 2016 OpenVPN 2.3.4 i686-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Jun  5 2014
Thu Jan 28 11:52:39 2016 library versions: OpenSSL 1.0.1h 5 Jun 2014, LZO 2.05
Thu Jan 28 11:52:39 2016 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Thu Jan 28 11:52:39 2016 Need hold release from management interface, waiting...
Thu Jan 28 11:52:39 2016 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Thu Jan 28 11:52:39 2016 MANAGEMENT: CMD 'state on'
Thu Jan 28 11:52:39 2016 MANAGEMENT: CMD 'log all on'
Thu Jan 28 11:52:39 2016 MANAGEMENT: CMD 'hold off'
Thu Jan 28 11:52:39 2016 MANAGEMENT: CMD 'hold release'
Thu Jan 28 11:52:40 2016 Control Channel 
GateWay restful TYK    2017-07-19 20:58:01    895

源文件:https://github.com/TykTechnologies/tyk-swagger-definitions/blob/master/tyk_gateway_api.yml


 

swagger: '2.0'

info:
  version: "1.9"
  title: Gateway REST API

paths:
  /tyk/keys/:
    get:
      description: |
        Gets a list of *key* IDs (will only work with non-hashed installations)
      parameters:
        -
          name: api_id
          in: query
          description: Back-end to target
          required: true
          type: string
          format: string
        -
          name: x-tyk-authorization
          in: header
          description: tyk gateway shared secret
          required: true
          type: string
          format: string

      responses:
        200:
          description: Successful response
          schema:
            type: object
            properties:
              keys: 
                type: array
                items: 
                  type: string
                  
  /tyk/keys/create:
    post:
      description: |
        Create a n
golang    2017-07-19 20:56:40    1133
错误信息:

imports golang.org/x/tools/go/vcs: unrecognized import path "golang.org/x/tools/go/vcs"


原因:
   国内无法访问到golang.org/x/tools/go/vcs这个地址


解决办法:
    我使用翻墙工具在本机建立了代理,在centos端修改代理配置,执行如下命令   
export http_proxy=http://172.17.42.1:8118 
export https_proxy=$http_proxy 
export ftp_proxy=$http_proxy 
export rsync_proxy=$http_proxy 
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" 
source /etc/profile

    网上还有其他解决办法,但是我试验失败了:
    
 


    参考地址:https://github.com/tools/godep/issues/154


 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

33/48