Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclipse/che-ip returns 2 IP addresses as CHE_HOST #3564

Closed
ghost opened this issue Dec 28, 2016 · 8 comments
Closed

eclipse/che-ip returns 2 IP addresses as CHE_HOST #3564

ghost opened this issue Dec 28, 2016 · 8 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template.

Comments

@ghost
Copy link

ghost commented Dec 28, 2016

I started an Ubuntu instance on digital ocean and ran cli:

INFO: (che init): CHE_HOST=138.68.77.169 10.19.0.8

root@ubuntu-2gb-fra1-01:~# ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:58:be:fd:01  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:58ff:febe:fd01/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:401 errors:0 dropped:0 overruns:0 frame:0
          TX packets:303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:35748 (35.7 KB)  TX bytes:54238 (54.2 KB)

eth0      Link encap:Ethernet  HWaddr ca:18:b8:42:99:90  
          inet addr:138.68.77.169  Bcast:138.68.79.255  Mask:255.255.240.0
          inet6 addr: fe80::c818:b8ff:fe42:9990/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:329732 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24948 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:483680037 (483.6 MB)  TX bytes:2256880 (2.2 MB)

eth0:1    Link encap:Ethernet  HWaddr ca:18:b8:42:99:90  
          inet addr:10.19.0.8  Bcast:10.19.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)

veth445c798 Link encap:Ethernet  HWaddr 26:de:70:50:08:eb  
          inet6 addr: fe80::24de:70ff:fe50:8eb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3075 (3.0 KB)  TX bytes:7880 (7.8 KB)

@ghost ghost added the kind/bug Outline of a bug - must adhere to the bug report template. label Dec 28, 2016
@TylerJewell TylerJewell changed the title che-cli grabs 2 IP addresses as CHE_HOST eclipse/che-ip returns 2 IP addresses as CHE_HOST Dec 28, 2016
@TylerJewell
Copy link

It looks like the eclipse/che-ip:nightly utility is returning more than one IP address on your Ubuntu node because there was multiple eth0* interfaces. Do you recall the type of configuration that you setup on Digital Ocean that would have triggered the second ethernet interface?

@ghost
Copy link
Author

ghost commented Dec 29, 2016

Just a normal Ubuntu droplet.

Yes, it is because of two eth0* interfaces.

@TylerJewell
Copy link

It's super interesting to me as I had tested this on ubuntu with digital ocean a couple weeks ago, and I didn't get multiple interfaces like this.

What should we do in this situation:

  1. Take the first ethernet address, or:
  2. Return two IP addresses - and then have the Che CLI interrupt, print out both IP addresses and ask the user to set CHE_HOST or CODENVY_HOST with the IP address they deem appropriate?

@ghost
Copy link
Author

ghost commented Jan 2, 2017

Yes, we need to be ready for several eth interfaces here : https://github.com/eclipse/che/blob/master/dockerfiles/ip/entrypoint.sh#L20-L24

@TylerJewell
Copy link

In speaking with @benoitf about this, he suggests that these IP addresses are all just aliases, and that it may be better to just pick the first one from within eclipse/che-ip:nightly. I was thinking that this would be a CLI issue, but seems we will start with trying to fix it on the che-ip first.

@ghost
Copy link
Author

ghost commented Jan 2, 2017

@TylerJewell are you certain that 10.x IP will work for the client code when browser connects to a workspace? It may not be publicly accessible.

I do not think this is a critical issue, by the way.

@TylerJewell
Copy link

I just did a test on ubuntu - and that 10.x IP address is not externally reachable. So it seems that it's a bug in che-ip that it should not treat that IP address as something that it returns.

@TylerJewell
Copy link

Ok - have a prototype that solves the problem on Ubuntu - tested with a clean installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants