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

Improve IP/hostname detection on EC2 #488

Open
yeban opened this issue Oct 6, 2020 · 6 comments
Open

Improve IP/hostname detection on EC2 #488

yeban opened this issue Oct 6, 2020 · 6 comments

Comments

@yeban
Copy link
Collaborator

yeban commented Oct 6, 2020

SequenceServer shows private IP and URL of an EC2 instance on startup. I wonder if it is possible for it to be more accurate here.

@yeban
Copy link
Collaborator Author

yeban commented Oct 15, 2020

AWS free tier can be used to debug this

@tuxinaut
Copy link

I wonder if it is possible for it to be more accurate here.

Would you mind to elaborate a bit further on this?

@yeban
Copy link
Collaborator Author

yeban commented Oct 25, 2020

SequenceServer tries to detect the IP of the computer it is running on and constructs a URL from it for sharing, like "to share the setup with your colleagues, try using http://abc.def.ghi.jkl:4567". For this to be helpful, the IP SequenceServer detects should be the public IP.

AWS EC2 instances have both a public and private IP. Public IP is the one we use to ssh to the instance, etc. When running SequenceServer on an EC2 instance, we would like SequenceServer to detect the public IP and use that for showing the sharing URL, but it only detects the private IP.

Does that help?

@tuxinaut
Copy link

Does that help?

Thanks, it makes no more sense.

@yeban
Copy link
Collaborator Author

yeban commented Oct 26, 2020

Well, the issue refers to a message displayed by SequenceServer on startup:

** SequenceServer is ready.
   Go to http://localhost:4570 in your browser and start BLASTing!
   To share your setup, try one of the following addresses. These
   may only work within your home, office, or university network.
     -  http://192.168.1.104:4570

We want the URL in the line http://192.168.1.104:4570 to use the public IP of the computer. IP detection code is here: https://github.com/wurmlab/sequenceserver/blob/master/lib/sequenceserver.rb#L253. I suppose if it is not possible to differentiate between public and private IP, we can display both.

@tuxinaut
Copy link

I'll give it a try :)

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

No branches or pull requests

2 participants