gpt4 book ai didi

c++ - 如何处理柯南服务器连接被拒绝?

转载 作者:行者123 更新时间:2023-12-02 10:34:41 24 4
gpt4 key购买 nike

我有一个作为柯南服务器运行的 docker 容器。我正在尝试将一些柯南包从另一个 docker 容器上传到柯南服务器。输入用户名和密码后,我收到以下错误

 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 refusedPS:从我的主机到服务器,它工作得很好。当我想从容器上传到容器时出现错误

最佳答案

我通过将自定义配置文件复制到 docker 容器来解决它。否则我无法覆盖默认配置文件。

1. Write custom config file
2. COPY or ADD to image (in Dockerfile)
3. mv custom.conf /path/to/directory/ (from entrypoint)

关于c++ - 如何处理柯南服务器连接被拒绝?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60908644/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com