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

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?