Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1637 Discussions

Containers cannot communicate with container names

Huashu
Employee
604 Views

 

5.png

In DevCloud For the Edge, for inter-container communication, there is a way to access it by Container Name in DevCloud documentation, i.e., use Container Name and replace : with - as address to connect.

 

But I failed to ping each other in a project with 2 containers.

1.png

2.png

3.png

4.png


In another way, it works well when I ping each other with IP addresses. So I think maybe there is a bug about DNS.

0 Kudos
4 Replies
JesusE_Intel
Moderator
576 Views

Hi Huashu,


Could you please provide additional information about your project setup and container? Could you provide all steps and files to reproduce?


I created a basic Dockerfile with Ubuntu to include ping but am running into an "operation not permitted" message. Let me look into it and get back to you, in the meantime, any information that you can share will be helpful.


Regards,

Jesus


0 Kudos
Huashu
Employee
548 Views

Yes. Let me show you a few key steps of reproducing this issue.

 

1. Create two containers with JupyterLabe or other methods.

Enable "ifconfig" and "ping" by add commands in Dockerfile:

RUN apt-get update && apt-get -y net-tools inetutils-ping

 

2. Add these two container into one project, launch

 

3.After the project running successfully, open a terminal of a container to get its IP address by "ifconfig"

Huashu_0-1682213171084.png

Huashu_1-1682213265858.png

 

4. Open the terminal of another container and ping this IP address.

Huashu_2-1682213426588.png

 

If you still fail, tell me more details please.

 

0 Kudos
Huashu
Employee
546 Views

I have found the solution.

I came to this issue because my container name contains "1.0", while it's "latest" in documentation samples. For "1.0", it should be replaced to "1-0". 

Another point it that ping is blocked although DNS works normal. But I found it available for other protocols such as http/https.

Huashu_3-1682215037659.png

So, you can close this issue.

0 Kudos
JesusE_Intel
Moderator
513 Views

Hi Huashu,


Thanks for providing the additional information, the operation not permitted error was due to importing a different ping package in the Dockerfile. I'm seeing the same behavior you are describing but glad you were able to figure it out!


If you need any additional information, please submit a new question as this thread will no longer be monitored.


Regards,

Jesus


0 Kudos
Reply