Why is AWS ECS Fargate not showing any files in my Jupyter Notebook server container?












2















I have a Jupyter Notebook docker container with an alpine linux base OS for the image that when built and ran locally works just fine. It will show the contents of the OS and the folder I copied data into the image as expected. However, when the image is pushed up to AWS ECR and pulled down to be setup as a task in AWS ECS Fargate, it shows no files.



I've updated my 'jupyter_notebook_config.py' file in the following way:



from IPython.lib import passwd

c.NotebookApp.ip = "*"
c.NotebookApp.open_browser = False
c.NotebookApp.allow_origin = "*"
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = passwd("place_your_passwd_here")


Via the AWS ALB, I'm able to successfully log into the Jupyter Notebook server container on Fargate, but when viewing, it shows nothing but 'server: Forbidden':



enter image description here



I've looked around a lot of docs and forums about this but when getting into containers, there's not as much clear recommendations for debugging this. Any links or tips would be appreciated!










share|improve this question

























  • Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

    – Imran
    Jan 6 at 13:45











  • Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

    – Byrdann Fox
    Jan 11 at 17:22
















2















I have a Jupyter Notebook docker container with an alpine linux base OS for the image that when built and ran locally works just fine. It will show the contents of the OS and the folder I copied data into the image as expected. However, when the image is pushed up to AWS ECR and pulled down to be setup as a task in AWS ECS Fargate, it shows no files.



I've updated my 'jupyter_notebook_config.py' file in the following way:



from IPython.lib import passwd

c.NotebookApp.ip = "*"
c.NotebookApp.open_browser = False
c.NotebookApp.allow_origin = "*"
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = passwd("place_your_passwd_here")


Via the AWS ALB, I'm able to successfully log into the Jupyter Notebook server container on Fargate, but when viewing, it shows nothing but 'server: Forbidden':



enter image description here



I've looked around a lot of docs and forums about this but when getting into containers, there's not as much clear recommendations for debugging this. Any links or tips would be appreciated!










share|improve this question

























  • Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

    – Imran
    Jan 6 at 13:45











  • Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

    – Byrdann Fox
    Jan 11 at 17:22














2












2








2








I have a Jupyter Notebook docker container with an alpine linux base OS for the image that when built and ran locally works just fine. It will show the contents of the OS and the folder I copied data into the image as expected. However, when the image is pushed up to AWS ECR and pulled down to be setup as a task in AWS ECS Fargate, it shows no files.



I've updated my 'jupyter_notebook_config.py' file in the following way:



from IPython.lib import passwd

c.NotebookApp.ip = "*"
c.NotebookApp.open_browser = False
c.NotebookApp.allow_origin = "*"
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = passwd("place_your_passwd_here")


Via the AWS ALB, I'm able to successfully log into the Jupyter Notebook server container on Fargate, but when viewing, it shows nothing but 'server: Forbidden':



enter image description here



I've looked around a lot of docs and forums about this but when getting into containers, there's not as much clear recommendations for debugging this. Any links or tips would be appreciated!










share|improve this question
















I have a Jupyter Notebook docker container with an alpine linux base OS for the image that when built and ran locally works just fine. It will show the contents of the OS and the folder I copied data into the image as expected. However, when the image is pushed up to AWS ECR and pulled down to be setup as a task in AWS ECS Fargate, it shows no files.



I've updated my 'jupyter_notebook_config.py' file in the following way:



from IPython.lib import passwd

c.NotebookApp.ip = "*"
c.NotebookApp.open_browser = False
c.NotebookApp.allow_origin = "*"
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = passwd("place_your_passwd_here")


Via the AWS ALB, I'm able to successfully log into the Jupyter Notebook server container on Fargate, but when viewing, it shows nothing but 'server: Forbidden':



enter image description here



I've looked around a lot of docs and forums about this but when getting into containers, there's not as much clear recommendations for debugging this. Any links or tips would be appreciated!







docker jupyter-notebook amazon-ecs alpine aws-fargate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 5:20







Byrdann Fox

















asked Jan 3 at 1:23









Byrdann FoxByrdann Fox

3316




3316













  • Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

    – Imran
    Jan 6 at 13:45











  • Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

    – Byrdann Fox
    Jan 11 at 17:22



















  • Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

    – Imran
    Jan 6 at 13:45











  • Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

    – Byrdann Fox
    Jan 11 at 17:22

















Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

– Imran
Jan 6 at 13:45





Are you using any volumes with your docker image?. Can you please share a snippet of Dockerfile/compose and task definition details?.

– Imran
Jan 6 at 13:45













Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

– Byrdann Fox
Jan 11 at 17:22





Thanks @Imran but it turned out to be a networking issue with AWS' ALB service in conjunction with the AWS ECS Fargate service.

– Byrdann Fox
Jan 11 at 17:22












1 Answer
1






active

oldest

votes


















0














Enable 'sticky sessions' on you're ALB using Terraform. If you spin up with CloudFormation stack, it'll most likely already be enabled. This fixes the problem!






share|improve this answer


























    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/3.0/"u003ecc by-sa 3.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%2f54015221%2fwhy-is-aws-ecs-fargate-not-showing-any-files-in-my-jupyter-notebook-server-conta%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Enable 'sticky sessions' on you're ALB using Terraform. If you spin up with CloudFormation stack, it'll most likely already be enabled. This fixes the problem!






    share|improve this answer






























      0














      Enable 'sticky sessions' on you're ALB using Terraform. If you spin up with CloudFormation stack, it'll most likely already be enabled. This fixes the problem!






      share|improve this answer




























        0












        0








        0







        Enable 'sticky sessions' on you're ALB using Terraform. If you spin up with CloudFormation stack, it'll most likely already be enabled. This fixes the problem!






        share|improve this answer















        Enable 'sticky sessions' on you're ALB using Terraform. If you spin up with CloudFormation stack, it'll most likely already be enabled. This fixes the problem!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 13 at 0:56

























        answered Jan 11 at 17:21









        Byrdann FoxByrdann Fox

        3316




        3316
































            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%2f54015221%2fwhy-is-aws-ecs-fargate-not-showing-any-files-in-my-jupyter-notebook-server-conta%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

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith