openstack docker build error

1. 

    _proto_tcp = socket.getprotobyname('tcp')
OSError: protocol not found

you should have a /etc/protocols file. It must have been deleted somehow. It comes from the netbase package.

apt install -y netbase

 

2.

  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 191, in _do_create_plugin
    raise exceptions.DiscoveryFailure('Could not determine a suitable URL '
DiscoveryFailure: Could not determine a suitable URL for the plugin

keystone token 环境变量设置错误,比如用户名、密码、AUTH_URL等

 

3.

python setup.py install
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pbr/core.py", line 111, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 249, in cfg_to_args
    pbr.hooks.setup_hook(config)
  File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/__init__.py", line 25, in setup_hook
    metadata_config.run()
  File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/base.py", line 27, in run
    self.hook()
  File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/metadata.py", line 26, in hook
    self.config['name'], self.config.get('version', None))
  File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 750, in get_version
    name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name device was given, but was not able to be found.

安装git, 并确保该目录下有.git文件夹

 

4.

pip安装报SSLError: The read operation timed out的问题

增加--default-timeout=100,加大超时时间

 

 
  
$ pip install -r requirements.txt 
......
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

解决办法:

$ pip --default-timeout=100 install -r requirements.txt  

 

5.

$ docker run -dti ...
docker: Error response from daemon: service endpoint with name XXX already exists.

解决办法:

$ docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
c9a224034aaa        bridge              bridge              local
b30c2e0dccc6        host                host                local

$ docker network disconnect -f c9a224034aaa XXX

 

6.

CRITICAL keystonemiddleware.auth_token  Unable to validate token: Identity server rejected authorization necessary to fetch token data

 解决办法:

1)确认XXX.conf中的keystone_authtoken配置是否正确,主要检查用户名、密码、工程名等。

2)问题依旧未解决,必须查看keystone的日志进一步确认。

我在排查问题时犯了一个严重的错误,想当然的认为配置就是对的,忙糊涂啦。

 

7. 

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

解决办法:

for scrapy with Python 3, you'll need

sudo apt-get install python3 python-dev python3-dev \
     build-essential libssl-dev libffi-dev \
     libxml2-dev libxslt1-dev zlib1g-dev \
     python-pip

with Python 2, you'll need

sudo apt-get install python-dev  \
     build-essential libssl-dev libffi-dev \
     libxml2-dev libxslt1-dev zlib1g-dev \
     python-pip

8.
$ curl 127.0.0.1:9200
curl: (52) Empty reply from server

 解决办法:

docker container 的/etc/hosts不能配置127.0.0.1 或者192.168.0.1

否则宿主机器将无法访问端口

 

转载于:https://www.cnblogs.com/tangkaixin/p/6655299.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值