最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Docker: Error while dialing: dial unix AppDataLocalDockerrunuserAnalyticsOtlpHttp.sock: connect: A socket operation encountered

programmeradmin5浏览0评论

I am new to Docker using Docker desktop on Windows 10. Docker "Hello World" works. I am trying to dockerize a Django/Postgres project using a yml file. The containers are created, can be stopped and started. But don't work, as I get "Connection refused". The error I get with docker compose up is

level=debug msg="otel error" error="failed to upload metrics: context deadline exceeded: rpc error: code = Unavailable desc = connecti on error: desc = "transport: Error while dialing: dial unix //./c:/Users/.../AppData/Local/Docker/run/userAnalyticsOtlpHttp.sock: connect: A socket operation encountered a dead network.""

Docker hangs up after the containers are created, need to stop it with Ctrl + C. It seems not to be related to the Django project since I get the same error even if the I have a wrong project path and no yml file is found (though it dosen't hang up then). It looks like a general error.

Here is my yml file:

version: '3'
services:
    web:
      build: .
      container_name: dcp
      command: python manage.py runserver 0.0.0.0:8000
      volumes:
        - .:/dcpProject
      ports:
        - "8080:8080"
      depends_on:
        - db
    db:
      image: postgres:17
      container_name: postgrescontainer
      environment:
        POSTGRES_DB: dbName
        POSTGRES_USER: postgres
        POSTGRES_PASSWORD: pw
        PGPORT: 5434
      ports:
        - "5434:5434"
      volumes:
        - ./data:/docker-entrypoint-initdb.d

requirement.txt

asgiref==3.8.1
certifi==2024.2.2
charset-normalizer==3.3.2
defusedxml==0.7.1
Django==5.1.4
django-bootstrap-icons==0.8.7
django-extensions==3.2.3
django-tables2==2.7.0
et-xmlfile==1.1.0
idna==3.7
numpy==1.26.4
openpyxl==3.1.5
pillow==10.2.0
psycopg==3.1.20
psycopg-binary==3.1.20
rdkit==2023.9.5
requests==2.31.0
sqlparse==0.4.4
tk==0.1.0
typing_extensions==4.9.0
tzdata==2023.4
urllib3==2.2.1
XlsxWriter==3.2.0

I tried this link, but I couldn't fix it. I would be glad for help. Let me know if you need more information. Thanks!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论