[英]How do deal with conan server connection refused?
我有一個作為 Conan 服務器運行的 docker 容器。 我正在嘗試將一些 Conan 包從另一個 docker 容器上傳到 conan 服務器。 輸入用戶名和密碼后,我收到以下錯誤
Error uploading file: conanmanifest.txt,
'HTTPConnectionPool(host='localhost', port=9300): Max retries exceeded with url: /v1/files/hello/0.1/demo/testing/0/export/conanmanifest.txt?signature=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZV9wYXRoIjoiaGVsbG8vMC4xL2RlbW8vdGVzdGluZy8wL2V4cG9ydC9jb25hbm1hbmlmZXN0LnR4dCIsInVzZXJuYW1lIjoiZGVtbyIsImZpbGVzaXplIjo1OCwiZXhwIjoxNTg1NDQyMjYyfQ.7sHncjZ7J8gV5HENMqCIwLe7b483QfrGJ2PVyolvjC4
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99c84d2e50>:
Failed to establish a new connection: [Errno 111] Connection refused'))'
ERROR: hello/0.1@demo/testing: Upload recipe to 'my_server' failed: Execute upload again to retry upload the failed files: conanfile.py, conanmanifest.txt. [Remote: my_server]
ERROR: Errors uploading some packages
我運行了以下命令docker run -t -p 9300:9999 --name mycont my_conan
然后相應地編輯了server.conf
文件
port:9300
public_port:9999
host_name: containerIP
從現在開始,我希望通過curl http://localhost:9999
到達但得到
Failed to connect to localhost port 9999: Connection refused
PS:從我的主機到服務器,它工作得很好。 但是當我想從容器上傳到容器時出現錯誤
我通過將自定義配置文件復制到 docker 容器來解決它。 否則我無法覆蓋默認配置文件。
1. Write custom config file
2. COPY or ADD to image (in Dockerfile)
3. mv custom.conf /path/to/directory/ (from entrypoint)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.