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

getip.sh isn't reliable enough #31

Open
jakebiesinger opened this issue Oct 23, 2013 · 8 comments
Open

getip.sh isn't reliable enough #31

jakebiesinger opened this issue Oct 23, 2013 · 8 comments
Assignees
Labels

Comments

@jakebiesinger
Copy link
Contributor

@JavierJia @Nan-Zhang

We've seen from #29 and #26 that java returns a different value than getip.sh. getip.sh is just a hack that reads out the IP address from ifconfig for eth0.

In other words, it's a hack. Users may not have their setup on eth0-- I imagine that's the error you saw, @JavierJia ? your laptop is probably connecting over wifi and therefore doesn't use eth0? We're seeing this on travis, where some machines aren't connected on eth0 and others are...

I think the solution is probably a very small java program that uses the java API rather than parsing from eth0.

Any volunteers to implement such a program?

@JavierJia
Copy link
Collaborator

eth0 is not necessarily a wired port. My machine also have eth0. Let me fix it. The previous Java solution only not work because it return an 127.0.0.1, which not recognized by Hyracks 😢 . Let me fix it.

@ghost ghost assigned JavierJia Oct 23, 2013
@jakebiesinger
Copy link
Contributor Author

But it's not guaranteed that it will be there, as I pointed out in the travis builds. For example, https://travis-ci.org/uci-cbcl/genomix/jobs/12915715#L1678

@jakebiesinger
Copy link
Contributor Author

I thought the problem wasn't so much 127.0.0.1 as it was that the CC was set to the proper address, while the driver was trying to connect via 127.0.0.1. I think it's the discrepancy, not the value that's wrong.

The startCC.sh and startNC.sh scripts all use getip.sh... Seems like we should try to be consistent about this...

@JavierJia
Copy link
Collaborator

well, that's actually need we to change getip.sh.

@jakebiesinger
Copy link
Contributor Author

Yep. and getip.sh is annoying 'cause it means you can't run anything without being inside of a mvn built package-- those scripts must be present and must be executable to even get your own IP address...

@JavierJia
Copy link
Collaborator

You are the python expert, do you think this line will sufficient enough? (using bash script will inevitably jump into endless hardware issues)

python -c 'import socket; print socket.gethostbyname(socket.getfqdn())'

@jakebiesinger
Copy link
Contributor Author

hmm.. I guess we really don't want the 127.0.0.1 address at all. The slaves can't connect to that address and expect to reach the CC. googling around tells me that eth0 really is the place to look, at least in most cases where NAT isn't involved (which it is on the amazon server travis is running on).

The python script will also get the loopback interface, yes?

@jakebiesinger
Copy link
Contributor Author

see http://www.if-not-true-then-false.com/2010/linux-get-ip-address/ for more examples, using either eth0 or some external website (which wouldn't work for most of our cases-- the nodes are generally not publicly available).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants