Can't access pdb prompt when attaching to a docker container I need to debugAttaching Python debuggerExposing a port on a live Docker containerCannot access tomcat8 server running in docker container from host machineDebug Nodejs inside Docker containerOpening Port in Docker ContainerDjango docker container failed to connect to mysql container with error “Can't connect to MySQL server on 'db' (111)”)Running Rails App in Docker Container using Non-Default PortExposing localhost ports in several local servicesCan't connect to MongoDB container from other Docker containerDocker-compose cannot find Flask configuration file

Heat-shrink tubing available as a roll like adhesive tape?

Is 写真 an onomatopoeia?

RX vs TX operation in Software UART

What's the lifetime of WIcked Wolf's +1/+1 counters?

Why would shrinking TEMPDB log lead to slowness?

Twelve Labours - #02 Lernaean Hydration

Length-terminated sequences

You may need me after too many

Are countries other than the US concerned about preferred pronouns and how they relate to gender?

Can a company prevent a co-author of a paper to put his name on it?

What can I wear to avoid getting frisked and crotch searched by TSA at the airport?

What kind of mathematical disciplines would be most useful for physics?

At what point can you walk out of a restaurant if they make you wait to pay the bill?

Why is a 737 Original speed-restricted below 10,000 ft with inoperative windscreen heating?

Why can java not infer a supertype

Implement the 2D Hadamard Transform

"Push chord". What's that?

Copying files: Does Windows write to disk if files are identical

Translate "loyal animal" into classical Latin

should I include offer letter from a different institution in my application for a faculty position

Would fantasy dwarves be able to invent and/or manufacture the radio?

Articles at the beginning of sentences in scientific writing

Is there a name for the phenomenon of false positives counterintuitively outstripping true positives

Why didn't Petunia know that Harry wasn't supposed to use magic out of school?



Can't access pdb prompt when attaching to a docker container I need to debug


Attaching Python debuggerExposing a port on a live Docker containerCannot access tomcat8 server running in docker container from host machineDebug Nodejs inside Docker containerOpening Port in Docker ContainerDjango docker container failed to connect to mysql container with error “Can't connect to MySQL server on 'db' (111)”)Running Rails App in Docker Container using Non-Default PortExposing localhost ports in several local servicesCan't connect to MongoDB container from other Docker containerDocker-compose cannot find Flask configuration file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0

















I debug the dockerized python-flask app I'm working on by adding stdin_open: true and tty: true to the end of the web service in the docker-compose.yml. Then, I run docker attach in a terminal and use the resulting pdb prompt.



This always worked in the past. Today when I type docker attach <web_container_id> in the terminal, the terminal stays blank and the pdb prompt doesn't open. Additionally, the website hangs and doesn't load. When I run docker logs <web_container_id>, the logs shows that the debugger was active. But I can't access the pdb prompt. Any idea what I'm doing wrong?



TLDR: Why can't I interact with the pdb prompt in the terminal when I attach to the docker container?



version: "3"

services:
db:
restart: always
image: postgres:latest
environment:
POSTGRES_USER: fake_user
POSTGRES_PASSWORD: fakepassword
POSTGRES_DB: fake-db
volumes:
- ./container_data/postgres:/var/lib/postgresql/data
ports:
- "8080:8080"

web:
restart: always
build:
context: .
dockerfile: ./dockerfiles/web/Dockerfile
environment:
AWS_ACCESS_KEY_ID: "$AWS_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY: "$AWS_SECRET_ACCESS_KEY"
AWS_DEFAULT_REGION: "$AWS_DEFAULT_REGION"
S3_BUCKET_NAME: "$S3_BUCKET_NAME"
FLASK_APP: app
FLASK_ENV: "$FLASK_ENV:-development"
volumes:
- ./FakeApp/:/usr/src/app/FakeApp/:z
links:
- postgres:postgres
expose:
- "3000"
command: flask run --host=0.0.0.0 --port=3000
ports:
- "3000:3000"
tty: true
stdin_open: true


Here are some resources I already read online:
- https://blog.lucasferreira.org/howto/2017/06/03/running-pdb-with-docker-and-gunicorn.html
- Attaching Python debugger










share|improve this question
































    0

















    I debug the dockerized python-flask app I'm working on by adding stdin_open: true and tty: true to the end of the web service in the docker-compose.yml. Then, I run docker attach in a terminal and use the resulting pdb prompt.



    This always worked in the past. Today when I type docker attach <web_container_id> in the terminal, the terminal stays blank and the pdb prompt doesn't open. Additionally, the website hangs and doesn't load. When I run docker logs <web_container_id>, the logs shows that the debugger was active. But I can't access the pdb prompt. Any idea what I'm doing wrong?



    TLDR: Why can't I interact with the pdb prompt in the terminal when I attach to the docker container?



    version: "3"

    services:
    db:
    restart: always
    image: postgres:latest
    environment:
    POSTGRES_USER: fake_user
    POSTGRES_PASSWORD: fakepassword
    POSTGRES_DB: fake-db
    volumes:
    - ./container_data/postgres:/var/lib/postgresql/data
    ports:
    - "8080:8080"

    web:
    restart: always
    build:
    context: .
    dockerfile: ./dockerfiles/web/Dockerfile
    environment:
    AWS_ACCESS_KEY_ID: "$AWS_ACCESS_KEY_ID"
    AWS_SECRET_ACCESS_KEY: "$AWS_SECRET_ACCESS_KEY"
    AWS_DEFAULT_REGION: "$AWS_DEFAULT_REGION"
    S3_BUCKET_NAME: "$S3_BUCKET_NAME"
    FLASK_APP: app
    FLASK_ENV: "$FLASK_ENV:-development"
    volumes:
    - ./FakeApp/:/usr/src/app/FakeApp/:z
    links:
    - postgres:postgres
    expose:
    - "3000"
    command: flask run --host=0.0.0.0 --port=3000
    ports:
    - "3000:3000"
    tty: true
    stdin_open: true


    Here are some resources I already read online:
    - https://blog.lucasferreira.org/howto/2017/06/03/running-pdb-with-docker-and-gunicorn.html
    - Attaching Python debugger










    share|improve this question




























      0












      0








      0








      I debug the dockerized python-flask app I'm working on by adding stdin_open: true and tty: true to the end of the web service in the docker-compose.yml. Then, I run docker attach in a terminal and use the resulting pdb prompt.



      This always worked in the past. Today when I type docker attach <web_container_id> in the terminal, the terminal stays blank and the pdb prompt doesn't open. Additionally, the website hangs and doesn't load. When I run docker logs <web_container_id>, the logs shows that the debugger was active. But I can't access the pdb prompt. Any idea what I'm doing wrong?



      TLDR: Why can't I interact with the pdb prompt in the terminal when I attach to the docker container?



      version: "3"

      services:
      db:
      restart: always
      image: postgres:latest
      environment:
      POSTGRES_USER: fake_user
      POSTGRES_PASSWORD: fakepassword
      POSTGRES_DB: fake-db
      volumes:
      - ./container_data/postgres:/var/lib/postgresql/data
      ports:
      - "8080:8080"

      web:
      restart: always
      build:
      context: .
      dockerfile: ./dockerfiles/web/Dockerfile
      environment:
      AWS_ACCESS_KEY_ID: "$AWS_ACCESS_KEY_ID"
      AWS_SECRET_ACCESS_KEY: "$AWS_SECRET_ACCESS_KEY"
      AWS_DEFAULT_REGION: "$AWS_DEFAULT_REGION"
      S3_BUCKET_NAME: "$S3_BUCKET_NAME"
      FLASK_APP: app
      FLASK_ENV: "$FLASK_ENV:-development"
      volumes:
      - ./FakeApp/:/usr/src/app/FakeApp/:z
      links:
      - postgres:postgres
      expose:
      - "3000"
      command: flask run --host=0.0.0.0 --port=3000
      ports:
      - "3000:3000"
      tty: true
      stdin_open: true


      Here are some resources I already read online:
      - https://blog.lucasferreira.org/howto/2017/06/03/running-pdb-with-docker-and-gunicorn.html
      - Attaching Python debugger










      share|improve this question















      I debug the dockerized python-flask app I'm working on by adding stdin_open: true and tty: true to the end of the web service in the docker-compose.yml. Then, I run docker attach in a terminal and use the resulting pdb prompt.



      This always worked in the past. Today when I type docker attach <web_container_id> in the terminal, the terminal stays blank and the pdb prompt doesn't open. Additionally, the website hangs and doesn't load. When I run docker logs <web_container_id>, the logs shows that the debugger was active. But I can't access the pdb prompt. Any idea what I'm doing wrong?



      TLDR: Why can't I interact with the pdb prompt in the terminal when I attach to the docker container?



      version: "3"

      services:
      db:
      restart: always
      image: postgres:latest
      environment:
      POSTGRES_USER: fake_user
      POSTGRES_PASSWORD: fakepassword
      POSTGRES_DB: fake-db
      volumes:
      - ./container_data/postgres:/var/lib/postgresql/data
      ports:
      - "8080:8080"

      web:
      restart: always
      build:
      context: .
      dockerfile: ./dockerfiles/web/Dockerfile
      environment:
      AWS_ACCESS_KEY_ID: "$AWS_ACCESS_KEY_ID"
      AWS_SECRET_ACCESS_KEY: "$AWS_SECRET_ACCESS_KEY"
      AWS_DEFAULT_REGION: "$AWS_DEFAULT_REGION"
      S3_BUCKET_NAME: "$S3_BUCKET_NAME"
      FLASK_APP: app
      FLASK_ENV: "$FLASK_ENV:-development"
      volumes:
      - ./FakeApp/:/usr/src/app/FakeApp/:z
      links:
      - postgres:postgres
      expose:
      - "3000"
      command: flask run --host=0.0.0.0 --port=3000
      ports:
      - "3000:3000"
      tty: true
      stdin_open: true


      Here are some resources I already read online:
      - https://blog.lucasferreira.org/howto/2017/06/03/running-pdb-with-docker-and-gunicorn.html
      - Attaching Python debugger







      python docker debugging flask pdb






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 21:40









      ByteByByteByteByByte

      236 bronze badges




      236 bronze badges

























          0






          active

          oldest

          votes













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407255%2fcant-access-pdb-prompt-when-attaching-to-a-docker-container-i-need-to-debug%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407255%2fcant-access-pdb-prompt-when-attaching-to-a-docker-container-i-need-to-debug%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현