Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6301

FIWARE.Question.Tech.Cloud.Docker.Internet connection not working from within docker container

    Details

    • Type: Monitor
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:

      Description

      Created question in FIWARE Q/A platform on 31-03-2016 at 17:03
      Please, ANSWER this question AT https://ask.fiware.org/question/459/internet-connection-not-working-from-within-docker-container/

      Question:
      Internet connection not working from within docker container

      Description:
      Hello everyone,

      we have problems building docker images on Fiware instance. The problem is, that from within a docker container, we can't download any data from internet. Commands like wget, composer, apt-get don't work. Strangely ping to any live address works fine from within containers.

      My Dockerfile starts like this:

      FROM php:7.0.4-apache
      RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
      ...
      ADD entrypoint.sh /
      RUN chmod +x /entrypoint.sh
      ENTRYPOINT ["/entrypoint.sh"]

      but the build fails...

      Building web
      Step 1 : FROM php:7.0.4-apache
      ---> ce68d55b8d56
      Step 2 : RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
      ---> Running in 9108f4c9afcc
      Ign http://httpredir.debian.org jessie InRelease
      Ign http://security.debian.org jessie/updates InRelease
      Ign http://httpredir.debian.org jessie-updates InRelease
      Get:1 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
      Get:2 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
      Err http://security.debian.org jessie/updates Release.gpg
      Connection failed [IP: 195.20.242.89 80]
      Err http://httpredir.debian.org jessie Release.gpg
      Connection failed
      Get:3 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]

      Same problems occurred when we uploaded existing container that works on different machines (Linode) to Fiware instance.

      Internet connection from Instance itself works, just not from within a docker container.

      Has anyone had the same issues with connectivity?

      Thank you

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2d 3h 33m 1 Kenneth Nagin 06/Apr/16 1:35 PM
        In Progress In Progress Closed Closed
        7d 20h 17m 1 Manuel Escriche 14/Apr/16 9:53 AM
        Closed Closed In Progress In Progress
        2s 1 Manuel Escriche 14/Apr/16 9:53 AM
        In Progress In Progress Answered Answered
        7d 7h 8m 1 Backlog Manager 21/Apr/16 5:02 PM
        Answered Answered Closed Closed
        3d 17h 12m 1 Kenneth Nagin 25/Apr/16 10:14 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-askbot] Internet connection not working from within docker container FIWARE.Question.Tech.Cloud.Docker.Internet connection not working from within docker container
        knagin Kenneth Nagin made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        Hide
        knagin Kenneth Nagin added a comment -

        Have you tried checking the DNS configuration of the container? http://odino.org/cannot-connect-to-the-internet-from-your-docker-containers/
        Eddy gravatar imageEddy (Apr 4 '16)

        Thanks. We have tried changing DNS provider before and now again following your tip. Didn't help, pinging works but nothing else. When we deploy the same docker container to Linode, it works. So we think it's something Fiware related. Thanks.
        borgo gravatar imageborgo (Apr 5 '16)

        I tried to reproduce on a FIWARE instance with a docker engine, but it had no problem with the apt-get install. What happens when you do the same apt-get on the docker host? --Ken
        knagin gravatar imageknagin (Apr 6 '16)

        This fixed it for us: https://rahulait.wordpress.com/2016/02/28/modifying-default-mtu-for-docker-containers/ That's for debian 8 image, we had to switch from ubuntu.
        borgo gravatar imageborgo (Apr 19 '16)

        Show
        knagin Kenneth Nagin added a comment - Have you tried checking the DNS configuration of the container? http://odino.org/cannot-connect-to-the-internet-from-your-docker-containers/ Eddy gravatar imageEddy (Apr 4 '16) Thanks. We have tried changing DNS provider before and now again following your tip. Didn't help, pinging works but nothing else. When we deploy the same docker container to Linode, it works. So we think it's something Fiware related. Thanks. borgo gravatar imageborgo (Apr 5 '16) I tried to reproduce on a FIWARE instance with a docker engine, but it had no problem with the apt-get install. What happens when you do the same apt-get on the docker host? --Ken knagin gravatar imageknagin (Apr 6 '16) This fixed it for us: https://rahulait.wordpress.com/2016/02/28/modifying-default-mtu-for-docker-containers/ That's for debian 8 image, we had to switch from ubuntu. borgo gravatar imageborgo (Apr 19 '16)
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-04-21 17:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-04-21 17:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        knagin Kenneth Nagin added a comment -

        It is not clear what you want me to do with this. I could not reproduce
        and answered a question. They never responded.

        Best Regards,

        Kenneth Nagin
        Ph: +972-4-8296227
        Cell: 054-6976227
        Fx: +972-4- 8296114
        http://researcher.ibm.com/view.php?person=il-NAGIN

        Show
        knagin Kenneth Nagin added a comment - It is not clear what you want me to do with this. I could not reproduce and answered a question. They never responded. Best Regards, Kenneth Nagin Ph: +972-4-8296227 Cell: 054-6976227 Fx: +972-4- 8296114 http://researcher.ibm.com/view.php?person=il-NAGIN
        Hide
        mev Manuel Escriche added a comment -

        closed and reopen because of unconsistent status of resolution field

        Show
        mev Manuel Escriche added a comment - closed and reopen because of unconsistent status of resolution field
        mev Manuel Escriche made changes -
        Resolution Done [ 10000 ]
        Status Closed [ 6 ] In Progress [ 3 ]
        mev Manuel Escriche made changes -
        Resolution Fixed [ 1 ] Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        mev Manuel Escriche made changes -
        HD-Chapter Cloud [ 10837 ]
        backlogmanager Backlog Manager made changes -
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Component/s FIWARE-LAB-HELP [ 10279 ]
        mev Manuel Escriche made changes -
        Description
        Created question in FIWARE Q/A platform on 31-03-2016 at 17:03
        {color: red}Please, ANSWER this question AT{color} https://ask.fiware.org/question/459/internet-connection-not-working-from-within-docker-container/


        +Question:+
        Internet connection not working from within docker container

        +Description:+
        Hello everyone,

        we have problems building docker images on Fiware instance. The problem is, that from within a docker container, we can't download any data from internet. Commands like wget, composer, apt-get don't work. Strangely ping to any live address works fine from within containers.

        My Dockerfile starts like this:


        FROM php:7.0.4-apache
        RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
        ...
        ADD entrypoint.sh /
        RUN chmod +x /entrypoint.sh
        ENTRYPOINT ["/entrypoint.sh"]


        but the build fails...


        Building web
        Step 1 : FROM php:7.0.4-apache
        ---> ce68d55b8d56
        Step 2 : RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
        ---> Running in 9108f4c9afcc
        Ign http://httpredir.debian.org jessie InRelease
        Ign http://security.debian.org jessie/updates InRelease
        Ign http://httpredir.debian.org jessie-updates InRelease
        Get:1 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
        Get:2 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
        Err http://security.debian.org jessie/updates Release.gpg
        Connection failed [IP: 195.20.242.89 80]
        Err http://httpredir.debian.org jessie Release.gpg
        Connection failed
        Get:3 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]


        Same problems occurred when we uploaded existing container that works on different machines (Linode) to Fiware instance.

        Internet connection from Instance itself works, just not from within a docker container.

        Has anyone had the same issues with connectivity?

        Thank you
        Created question in FIWARE Q/A platform on 31-03-2016 at 17:03
        {color: red}Please, ANSWER this question AT{color} https://ask.fiware.org/question/459/internet-connection-not-working-from-within-docker-container/


        +Question:+
        Internet connection not working from within docker container

        +Description:+
        Hello everyone,

        we have problems building docker images on Fiware instance. The problem is, that from within a docker container, we can't download any data from internet. Commands like wget, composer, apt-get don't work. Strangely ping to any live address works fine from within containers.

        My Dockerfile starts like this:


        FROM php:7.0.4-apache
        RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
        ...
        ADD entrypoint.sh /
        RUN chmod +x /entrypoint.sh
        ENTRYPOINT ["/entrypoint.sh"]


        but the build fails...


        Building web
        Step 1 : FROM php:7.0.4-apache
        ---> ce68d55b8d56
        Step 2 : RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++
        ---> Running in 9108f4c9afcc
        Ign http://httpredir.debian.org jessie InRelease
        Ign http://security.debian.org jessie/updates InRelease
        Ign http://httpredir.debian.org jessie-updates InRelease
        Get:1 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
        Get:2 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
        Err http://security.debian.org jessie/updates Release.gpg
        Connection failed [IP: 195.20.242.89 80]
        Err http://httpredir.debian.org jessie Release.gpg
        Connection failed
        Get:3 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]


        Same problems occurred when we uploaded existing container that works on different machines (Linode) to Fiware instance.

        Internet connection from Instance itself works, just not from within a docker container.

        Has anyone had the same issues with connectivity?

        Thank you
        Resolution Fixed [ 1 ]
        HD-Enabler Docker [ 10868 ]
        Hide
        knagin Kenneth Nagin added a comment -

        Answered with:
        I tried to reproduce on a FIWARE instance with a docker engine, but it had no problem with the apt-get install. What happens when you do the same apt-get on the docker host?
        --Ken

        Show
        knagin Kenneth Nagin added a comment - Answered with: I tried to reproduce on a FIWARE instance with a docker engine, but it had no problem with the apt-get install. What happens when you do the same apt-get on the docker host? --Ken
        knagin Kenneth Nagin made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        alfopietro Pietropaolo Alfonso made changes -
        Assignee Pietropaolo Alfonso [ alfopietro ] Kenneth Nagin [ knagin ]
        mev Manuel Escriche made changes -
        Assignee Pietropaolo Alfonso [ alfopietro ]
        mev Manuel Escriche made changes -
        Field Original Value New Value
        Component/s FIWARE-LAB-HELP [ 10279 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-04-04 10:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-04-04 10:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            knagin Kenneth Nagin
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: